fit_map: unknown/misspelled keys in params are silently ignored (e.g. m_disk vs mdisk)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 23
- Fork
- 11
- Merge medio
- 28m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanetFormationLab/eddy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
PlanetFormationLab/eddy#36 ·
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 62/100
PlanetFormationLab/eddy#43 ·
-
StructureFunction2DStack.fit_spiral / calculate_modal_power has no per-annulus fault toleranceAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
PlanetFormationLab/eddy#39 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PlanetFormationLab/eddy#35 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PlanetFormationLab/eddy#34 ·
Tutte le issue di PlanetFormationLab/eddy
Issue simili
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Forse già presa @ericz7900 l’ha presa oggi. Apertallm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rheeloaded/paperpull#117 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
agenda-tech-brasil/agenda-tech-brasil#1619 · 1 commento ·
-
process
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
pyrite-wiki/pyrite#1036 ·
I maintainer di solito rispondono entro 1 giorno