A constraint's suffix.observable reference is resolved only once simulations run: an ambiguous suffix is accepted at load, and a gradient fit names a different cause
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start with Constraint variable lookup in pybnf/constraint.py and gradient_base.scored_suffixes, then trace when constraint references are resolved during configuration loading. Use the two-model reproduction with duplicate q outputs and a dotted reference such as q.A_tot to check the behavior. Done means loading rejects references that match zero or multiple models and names the suffix and producing models.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What you do. Fit two models that both write an output with the same suffix, say q. Attach a constraint to one of them that reads that output by name, for example a tc.prop on model m1 containing q.A_tot < 50 at q.time=2 weight 1.
What you see. The configuration loads and the fit is set up. Then it depends on the fit type:
job_type = destops at its first simulation with "Suffix 'q' in your constraint file appears in multiple model files. Please change your suffix names so it isn't ambiguous".job_type = gntr, wherem2'sqis anssarun, is refused as it is set up. The message is that it "cannot differentiate the scored output 'q' of model 'm2': it is written by a simulate run with method 'ssa'". It does not mention the ambiguity, which is the actual problem. Both models'qcount as read by the constraint, because asuffix.observablereference is matched against every model's outputs.
Both runs stop, so no wrong result is reported. But the name is resolved only against the simulated output, after the configuration has been accepted. Under refine_method = gntr or refine_method = ms, a refusal that depends on this would come after the whole search.
What should happen. When the configuration loads, each suffix.observable reference in a constraint file should resolve to exactly one model's output. If it resolves to none or to more than one, the configuration should be refused, naming the suffix and the models that produce it.
Where. Constraint's variable lookup in pybnf/constraint.py (the "appears in multiple model files" check) runs against the simulation data dictionary at evaluation time. gradient_base.scored_suffixes (from #1057) adds a dotted reference's suffix to every model that can produce it.
Reproduction. Two copies of a decay model, each with simulate({method=>...,suffix=>"q"}) and then resetConcentrations() and an ODE simulate(...suffix=>"tc"). The q run is ode in m1.bngl and ssa in m2.bngl. The job:
edition = 2
bngl_backend = bngsim
model = m1.bngl : a/tc.exp, a/tc.prop
model = m2.bngl : b/tc.exp
objective = sos
uniform_var = k_deg 0.1 10
job_type = de
a/tc.prop holds q.A_tot < 50 at q.time=2 weight 1.
Found during review of the multiple-shooting batch (fix/ms-batch). The de behaviour is the same on main.
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 25
- Merge medio
- 4h 25m
- PR unite (30g)
- 9
Preparare l'ambiente
- Include un Dockerfile o un 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 lanl/PyBNF
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug minor
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno