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
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 26
- Fork
- 25
- Merge trung bình
- 4 giờ 25 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lanl/PyBNF
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
bug minor
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
-
bug minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Issue tương tự
-
docs(contributing): the two things that silently block a PRCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởavailable documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 95/100
Nixitov/Riptide-Native#944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
JTHCode/secretguard#24 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainer thường phản hồi trong vòng 1 ngày