Existing project using v0.5.x fails due to functions in the model
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
調査の方向性
torch~=2.9.0 と onnxscript~=0.5.6 を使い、torch.nn.Linear と torch.onnx.export のみで失敗を再現します。依存関係の仕様と _ConvertVersionPassRequiresInline の失敗を調査し、解決された依存関係によって予期しないモデル関数なしでエクスポートできることを確認します。
索引モデルが issue の本文から書いたものです。
説明
New deployment of a project with dependencies torch~=2.9.0, onnxscript~=0.5.6 ran into errors on torch.onnx.export. The error is not correlated to the exporting module (exporting a sole torch.nn.Linear still causes error). Example output:
[torch.onnx] Translate the graph into ONNX...
[torch.onnx] Translate the graph into ONNX... ✅
Traceback (most recent call last):
File "D:\Workspaces\Playgrounds\.venv\Lib\site-packages\onnx_ir\passes\_pass_infra.py", line 250, in call
pass_result = pass_(model)
^^^^^^^^^^^^
File "D:\Workspaces\Playgrounds\.venv\Lib\site-packages\onnx_ir\passes\_pass_infra.py", line 127, in __call__
result = self.call(model)
^^^^^^^^^^^^^^^^
File "D:\Workspaces\Playgrounds\.venv\Lib\site-packages\onnxscript\version_converter\__init__.py", line 77, in call
raise ValueError(
ValueError: The model contains functions. The version conversion pass does not support functions. Please use `common_passes.InlinePass` to inline the functions before applying this pass (_ConvertVersionPassRequiresInline).
The above exception was the direct cause of the following exception:
……
onnx_ir.passes.PassError: An error occurred when running the '<onnxscript.version_converter._ConvertVersionPassRequiresInline object at 0x00000194E90F6E70>' pass after the following passes: ['<onnx_ir.passes.common.inliner.InlinePass object at 0x00000194E2E0C770>']
Breaking into where the error is raised, inspecting pass_result.model.functions gives {('pkg.onnxscript.torch_lib.common', 'Rank', ''): Function('pkg.onnxscript.torch_lib.common', 'Rank', '', inputs=[Value(name='input')], attributes={}), outputs=[Value(name='return_val', producer='n1', index=0)]), ('pkg.onnxscript.torch_lib.common', 'IsScalar', ''): Function('pkg.onnxscript.torch_lib.common', 'IsScalar', '', inputs=[Value(name='input')], attributes={}), outputs=[Value(name='return_val', producer='n3', index=0)])}, which is not empty as expected.
It looks like a problem with the dependency specifications of onnxscript, as previous deployments with the same requirements.txt did not encounter such error.
Updating the package seems to clear the error but I guess it would be better if the dependencies could be fixed.
EDIT: Seems to be related to https://github.com/microsoft/onnxscript/issues/2790
- 主要言語
- Python
- スター
- 457
- フォーク
- 149
- 平均マージ
- 3日 15時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/onnxscript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/onnxscript#3003 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
CI : Pin github actions to full commit SHA対応中かも @Aniketsy が 183 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/onnxscript#2903 · コメント 6 件 ·
メンテナーはふだん 3 日以内に返信
-
optimize() crashes when constant folding produces a string tensor対応中かも @nniiovoo が 8 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
microsoft/onnxscript#3129 ·
メンテナーはふだん 3 日以内に返信
-
bug module: torchlib
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
microsoft/onnxscript#3124 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 3 日以内に返信
-
[torchlib] Float remainder is off by the divisor when the quotient rounds up, and nan for an infinite divisor対応中かも @usmanmateen が 13 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/onnxscript#3116 ·
メンテナーはふだん 3 日以内に返信
microsoft/onnxscript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
521xueweihan/HelloGitHub#4237 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jejjohnson/gaussx#721 ·
メンテナーはふだん 1 日以内に返信
-
mock-core-configs/etc/mock/rocky-10-riscv64.cfg contains the wrong architecture in config_opts['root']対応中かも @jasonmontleon が 4 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
rpm-software-management/mock#1834 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
elastic/elastic-otel-python#683 ·
メンテナーはふだん 1 日以内に返信
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retriesオープンfollow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信