Gradient fits reject an experiment whose only data file is a .prop: 'no routing was supplied'

Đang mở
#977 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Reproduce the failure with repro_function_heavy.py and prop_only.conf, then compare it with lbfgs.conf, which adds an .exp file and succeeds. Trace the ExperimentRouting mentioned in the error for constraint-only experiments, and confirm the behavior with parallel and default worker counts. Done means the constraint-only gradient fit either runs without the late routing error or is rejected during configuration, with the spurious parameter warning addressed if it is in scope.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

Gradient fits fail for an experiment whose only data file is a BPSL .prop file.

Environment: PyBNF 1.8.1 (5ecb1f69), bngsim 0.15.0, Python 3.12, macOS arm64.

Reproduce

Use the script from #976, then run:

python repro_function_heavy.py repro 300 30
cd repro && pybnf -c prop_only.conf -o

prop_only.conf declares the experiment as experiment: e1, data: calls.prop, t_end: 1, n_steps: 1, with objective = sos, qualitative_scale = fit s, and job_type = lbfgs.

Observed

After about 11–13 s, the run fails:

Error: Gradient-based fitting (job_type = lbfgs) cannot differentiate this fit's objective: Constraint reads observable 'f0' from model 'model' suffix 'e1', but no routing was supplied for it; provide an ExperimentRouting for every (model, suffix) a constraint reads (routings[(model, suffix)]).
  -> Use a metaheuristic job_type instead (e.g. job_type = de, the default, or pso / ss / cmaes), which needs no gradient.

This happens with parallel_count = 2 and with the default worker count, at verbosity = 1 and verbosity = 2.

Workaround: add any .exp file to the same experiment (experiment: e1, data: reps/r1.exp, …, calls.prop). The routing is then built, and the gradient fit runs and uses the constraint gradients (see lbfgs.conf in the repro).

Expected

Constraint-only experiments should get a routing, since the constraint gradient is otherwise available. Failing that, the refusal should come at configuration time.

As it is, the refusal comes only after the first model evaluations. In a larger model with about 20 s per evaluation (#976), a run printed nothing beyond the version line for 45 minutes before I stopped it. I didn't establish whether it would have reached this error.

Minor (same runs)

Every evaluation logs WARNING … could not set free parameter s=… (not found in this model) for the parameter named in qualitative_scale = fit s. That parameter is correctly not a model parameter, so the warning is noise.

Ngôn ngữ chính
Python
Star
25
Fork
25
Merge trung bình
4 giờ 5 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lanl/PyBNF

Tất cả issue của lanl/PyBNF

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.