Skip to content

Update CI dependencies and fix tests; generate opset 20 #1335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 2, 2024

Conversation

thiagocrepaldi
Copy link
Contributor

@thiagocrepaldi thiagocrepaldi commented Apr 2, 2024

  1. Update ONNX, ORT version in CI
  2. Pin IR version in run_converter_test to 9 because ONNX runtime does not support IRv10 yet. Need a better mechanism to handle the IR version change in tests.
  3. Generate opset 20 for onnxscript
  4. Skip opset 21 tests
  5. Fixes [Broken CI] torch-nightly and onnx-weekly are failing #1318

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 87.96992% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 75.58%. Comparing base (d96dcf2) to head (ff8b193).

Files Patch % Lines
onnxscript/onnx_opset/_impl/opset20.py 89.53% 9 Missing ⚠️
onnxscript/_internal/utils.py 40.00% 3 Missing ⚠️
onnxscript/onnx_opset/_impl/opset_ai_onnx_ml4.py 82.35% 3 Missing ⚠️
onnxscript/tests/common/onnx_script_test_case.py 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1335      +/-   ##
==========================================
- Coverage   75.61%   75.58%   -0.04%     
==========================================
  Files         132      134       +2     
  Lines       17666    17773     +107     
  Branches     2928     2927       -1     
==========================================
+ Hits        13358    13433      +75     
- Misses       3865     3898      +33     
+ Partials      443      442       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thiagocrepaldi thiagocrepaldi force-pushed the thiagofc/update-onnx-weekly branch from e0c15eb to 3172fe8 Compare April 2, 2024 16:22
Copy link

github-actions bot commented Apr 2, 2024

Test Results

     24 files  +     6      24 suites  +6   2h 17m 50s ⏱️ + 31m 28s
 13 016 tests + 4 263   9 311 ✅ + 2 806    3 698 💤 + 1 452   7 ❌ + 5 
377 529 runs  +79 998  88 657 ✅ +17 118  288 821 💤 +62 859  51 ❌ +21 

For more details on these failures, see this check.

Results for commit c951bf3. ± Comparison against base commit d96dcf2.

♻️ This comment has been updated with latest results.

@thiagocrepaldi
Copy link
Contributor Author

Unexpected error:

2024-04-02T16:33:59.5097958Z �[31m�[1m_ TestModelSaving.test_input_output_and_initializer_are_not_stored_in_value_info _�[0m
2024-04-02T16:33:59.5099409Z [gw1] linux -- Python 3.10.14 /home/runner/work/onnxscript/onnxscript/.nox/test/bin/python
2024-04-02T16:33:59.5101242Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/exporter.py�[0m:1195: in dynamo_export
2024-04-02T16:33:59.5102596Z     ).export()
2024-04-02T16:33:59.5103515Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/exporter.py�[0m:950: in export
2024-04-02T16:33:59.5104359Z     graph_module = pre_export_passes(
2024-04-02T16:33:59.5105339Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/exporter.py�[0m:1261: in pre_export_passes
2024-04-02T16:33:59.5106358Z     module = passes.Modularize(diagnostic_context, module).run()
2024-04-02T16:33:59.5107521Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/diagnostics/infra/decorator.py�[0m:151: in wrapper
2024-04-02T16:33:59.5108450Z     ctx.log_and_raise_if_error(diag)
2024-04-02T16:33:59.5109567Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/diagnostics/infra/context.py�[0m:366: in log_and_raise_if_error
2024-04-02T16:33:59.5110608Z     raise diagnostic.source_exception
2024-04-02T16:33:59.5111642Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/diagnostics/infra/decorator.py�[0m:135: in wrapper
2024-04-02T16:33:59.5112589Z     return_values = fn(*args, **kwargs)
2024-04-02T16:33:59.5113319Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/fx/_pass.py�[0m:267: in run
2024-04-02T16:33:59.5113915Z     module = self._run(*args, **kwargs)
2024-04-02T16:33:59.5114655Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/modularization.py�[0m:831: in _run
2024-04-02T16:33:59.5115379Z     root_module_node.add_leaf_node(_LeafNode(fx_node))
2024-04-02T16:33:59.5116218Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/modularization.py�[0m:701: in __init__
2024-04-02T16:33:59.5116975Z     self._stack_meta = _module_stack_meta_from_node(node)
2024-04-02T16:33:59.5117924Z �[1m�[31m.nox/test/lib/python3.10/site-packages/torch/onnx/_internal/fx/passes/modularization.py�[0m:330: in _module_stack_meta_from_node
2024-04-02T16:33:59.5118806Z     return _ModuleStackMeta(node.meta.get("nn_module_stack"))
2024-04-02T16:33:59.5121524Z �[1m�[31mE   beartype.roar.BeartypeCallHintParamViolation: Method torch.onnx._internal.fx.passes.modularization._ModuleStackMeta.__init__() parameter nn_module_stack_meta={'L__self___fc1': ("L['self'].fc1", <class 'torch.nn.modules.linear.Linear'>)} violates type hint typing.Union[collections.OrderedDict, typing.Dict[str, typing.Tuple[str, typing.Tuple[str, type]]], NoneType], as dict {'L__self___fc1': ("L['self'].fc1", <class 'torch.nn.modules.linear.Linear'>)}:�[0m
2024-04-02T16:33:59.5123841Z �[1m�[31mE   * Not <class "builtins.NoneType"> or <class "collections.OrderedDict">.�[0m
2024-04-02T16:33:59.5124832Z �[1m�[31mE   * dict key str 'L__self___fc1' value tuple index 1 item type <class 'torch.nn.modules.linear.Linear'> not instance of tuple.�[0m

@justinchuby
Copy link
Collaborator

Updated failing tests

@@ -138,6 +140,7 @@ def test_add_initializer_allows_adding_the_same_tensor_twice_using_same_name(sel
graph.add_initializer("x", x_tensor)


@unittest.skipIf(IS_WINDOWS, "dynamo_export not supported in Windows")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dynamo is supposed to be supported on windows on pytorch nightly. if something is failing, we need to track and fix

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not pulling the latest pytorch. I will add additional pytorch version check for this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know since which version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinchuby
Copy link
Collaborator

I will work on this pr and get the rest of the stuff green

@justinchuby justinchuby changed the title Update onnx weekly to 1.17.0.dev20240325 Update CI dependencies and fix tests Apr 2, 2024
@justinchuby justinchuby changed the title Update CI dependencies and fix tests Update CI dependencies and fix tests; generate opset 20 Apr 2, 2024
@justinchuby justinchuby merged commit e87e05d into main Apr 2, 2024
@justinchuby justinchuby deleted the thiagofc/update-onnx-weekly branch April 2, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[Broken CI] torch-nightly and onnx-weekly are failing
2 participants