Skip to content

Commit 7e4ce98

Browse files
Jammy2211claude
andcommitted
docs: correct the config-fallback comments on the NNLS warm-start settings (#506)
The `except KeyError` comments on `nnls_warm_start_memo` and `nnls_warm_start_error_tolerance` claimed a workspace `general.yaml` shadows autoarray's, making the hard-coded fallback the production default. In practice a workspace `general.yaml` omits these keys and autoconf's config-path list falls through to autoarray's packaged value (measured `True` / `1.5` from autolens_workspace). The fallback fires only when the workspace config is the sole config path (isolated test configs push one dir) and returns the same packaged value, so both routes resolve identically. Comments only; no code, behaviour or test changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XySQZP6Npj4adZMkYZ96Bo
1 parent e7e3e3c commit 7e4ce98

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎autoarray/settings.py‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,11 @@ def nnls_warm_start_memo(self) -> bool:
239239
try:
240240
return conf.instance["general"]["inversion"]["nnls_warm_start_memo"]
241241
except KeyError:
242-
# Workspaces ship their own general.yaml that shadows autoarray's
243-
# and will not carry this key, so in practice this fallback *is*
244-
# the production default: on, matching the packaged value.
242+
# A workspace `general.yaml` normally omits this key, so autoconf's
243+
# config-path list falls through to autoarray's packaged value (`true`).
244+
# This fallback fires only when the workspace config is the sole config
245+
# path (isolated test configs push one dir) and returns that same value,
246+
# so both routes resolve identically.
245247
return True
246248

247249
return self._nnls_warm_start_memo
@@ -261,9 +263,11 @@ def nnls_warm_start_error_tolerance(self) -> float:
261263
"nnls_warm_start_error_tolerance"
262264
]
263265
except KeyError:
264-
# Workspaces ship their own general.yaml that shadows autoarray's
265-
# and will not carry this key, so in practice this fallback *is*
266-
# the production default, matching the packaged value.
266+
# A workspace `general.yaml` normally omits this key, so autoconf's
267+
# config-path list falls through to autoarray's packaged value (`1.5`).
268+
# This fallback fires only when the workspace config is the sole config
269+
# path (isolated test configs push one dir) and returns that same value,
270+
# so both routes resolve identically.
267271
return 1.5
268272

269273
return self._nnls_warm_start_error_tolerance

0 commit comments

Comments
 (0)