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

オープン
#977 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
25
フォーク
25
平均マージ
4時間 5分
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

lanl/PyBNF のほかの issue

lanl/PyBNF の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。