Existing project using v0.5.x fails due to functions in the model
Maintainer thường phản hồi trong vòng 4 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
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Tái hiện lỗi với torch~=2.9.0 và onnxscript~=0.5.6 bằng cách chỉ sử dụng torch.nn.Linear và torch.onnx.export. Kiểm tra các đặc tả dependency và lỗi _ConvertVersionPassRequiresInline, sau đó xác minh rằng các dependency đã được phân giải cho phép export mà không có các hàm model ngoài dự kiến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 457
- Fork
- 149
- Merge trung bình
- 3 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Không có Dockerfile hay 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 microsoft/onnxscript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/onnxscript#3155 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/onnxscript#3003 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
CI : Pin github actions to full commit SHACó thể đã có người làm @Aniketsy đã nhận 184 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/onnxscript#2903 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
microsoft/onnxscript#3156 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
microsoft/onnxscript#3154 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của microsoft/onnxscript
Issue tương tự
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged inCó thể đã có người làm @Rarasinhoo đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
pgadmin-org/pgadmin4#10733 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws-samples/sample-per-model-bedrock#752 ·
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 66/100
int-brain-lab/mpci#32 ·
-
docs(api): add sesmax-core as a layer below radtrax and sesmax-ocean in the dependency graphĐang mởarea:docs priority:p2 type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jejjohnson/geostack#120 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
sublimelsp/LSP-vue#203 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày