fit_map: unknown/misspelled keys in params are silently ignored (e.g. m_disk vs mdisk)
还没有人认领这个 Issue。
评估
调研方向
Start in eddy/rotationmap.py at verify_params_dictionary (around line 1231), where the loop over default_parameters pops known keys and leaves everything else in params untouched. Reproduce with a misspelled key such as m_disk in a fit_map call and confirm that no warning is raised. Done when unknown keys produce a warning or error, internal flags like vfunc and vortex still pass, and a close-match hint such as mdisk appears where practical. Settle warn-versus-raise with the maintainer first.
由索引模型根据 Issue 内容生成。
描述
Summary
verify_params_dictionary fills in defaults for the keys listed in default_parameters.yml and silently keeps any other key in params. A misspelled parameter name is therefore ignored rather than flagged. If that key is also mapped to a p0 index, the sampler walks a dimension the likelihood never sees.
Example
Writing m_disk where eddy expects mdisk:
params['r_in'] = 4
params['r_out'] = 4.0
params['m_disk'] = 5 # typo: should be 'mdisk'
params['gamma'] = 6
p0 += [1.0, 0.0, 1.0]
samples = cube.fit_map(p0=p0, params=params, ...)
mdiskgets its default (None), so_calc_mdiskreturns 0 and the model is purely Keplerian.m_disktakes slot 5 ofp0but never reaches the model, so it random-walks inside the walker spread.r_inandgammaare also unconstrained, because they are only used in_calc_mdisk.- The only output is the
Assuming: p0 = [x0, y0, mstar, vlsr, r_in, m_disk, gamma]echo, which reads as if the fit is correct. The optimizer returns these three parameters unchanged from their starting values.
Nothing errors, and the fitted map looks plausible.
Where
eddy/rotationmap.py, verify_params_dictionary (~L1231):
for p in self.default_parameters.keys():
params[p] = params.pop(p, self.default_parameters[p]['default'])
Suggested fix
After populating the defaults, warn (or raise) on any key that is not in default_parameters and is not an internal flag (vfunc, vortex, beam, ...). Raising is probably right whenever an unknown key is mapped to a p0 index, since that dimension can never be constrained. A difflib close-match suggestion ("did you mean mdisk?") would make the message more useful.
- 主要语言
- Python
- 星标
- 23
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PlanetFormationLab/eddy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
PlanetFormationLab/eddy#36 ·
-
难度 3/5 半天 新手友好度 62/100
PlanetFormationLab/eddy#43 ·
-
难度 3/5 1-2 天 新手友好度 78/100
PlanetFormationLab/eddy#39 ·
-
难度 4/5 3-5 天 新手友好度 48/100
PlanetFormationLab/eddy#35 ·
-
难度 5/5 一周以上 新手友好度 35/100
PlanetFormationLab/eddy#34 ·
查看 PlanetFormationLab/eddy 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from git可能已有人在做 @MohabMohie 今天认领。 未关闭agentic
难度 2/5 1-3 小时 新手友好度 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 87/100
huggingface/smolagents#3045 ·
维护者通常 1 天内回复