Skip to content

Conversation

justinchuby
Copy link
Collaborator

@justinchuby justinchuby commented Aug 27, 2024

Create stable APIs for PyTorch 2.5 so that it does not need to use any internal ONNX Script APIs. Created APIs are

"check_model",
"convert_version",
"get_torchlib_ops",
"optimize",
"save_model_with_external_data",

In pytorch, it is expected to write:

import onnxscript._framework_apis.torch_2_5

Fixes #1827

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 38.33333% with 37 lines in your changes missing coverage. Please review.

Project coverage is 75.04%. Comparing base (e037aa0) to head (014c676).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
onnxscript/_framework_apis/torch_2_5.py 38.33% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1832      +/-   ##
==========================================
- Coverage   75.13%   75.04%   -0.09%     
==========================================
  Files         248      249       +1     
  Lines       26977    27037      +60     
  Branches     4926     4937      +11     
==========================================
+ Hits        20268    20291      +23     
- Misses       5762     5800      +38     
+ Partials      947      946       -1     

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

def check_model(model: ir.Model) -> None:
"""Check the model."""

del model # Unused yet

Check warning

Code scanning / CodeQL

Unnecessary delete statement in function

Unnecessary deletion of local variable [model](1) in function [check_model](2).
Copy link

github-actions bot commented Aug 27, 2024

Test Results

     24 files  ±0      24 suites  ±0   2h 41m 36s ⏱️ - 10m 28s
 14 119 tests ±0  11 748 ✅ +1    2 333 💤 ±0   32 ❌  - 1   6 🔥 ±0 
354 880 runs  ±0  81 040 ✅ +1  273 586 💤 ±0  212 ❌  - 1  42 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit 014c676. ± Comparison against base commit e037aa0.

♻️ This comment has been updated with latest results.

@justinchuby justinchuby enabled auto-merge (squash) August 30, 2024 19:29
@justinchuby justinchuby disabled auto-merge August 30, 2024 19:29
@justinchuby justinchuby enabled auto-merge (squash) August 30, 2024 19:29
@justinchuby justinchuby merged commit 540696c into main Aug 30, 2024
@justinchuby justinchuby deleted the justinchu/stable-torch branch August 30, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

[RFC] Create APIs for pytorch

4 participants