Skip to content
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

[torchlib] Mark more functions as traceable #1569

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

justinchuby
Copy link
Contributor

@justinchuby justinchuby commented May 24, 2024

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.52%. Comparing base (19f4e26) to head (8cf951c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1569      +/-   ##
==========================================
- Coverage   77.54%   77.52%   -0.02%     
==========================================
  Files         216      216              
  Lines       23340    23337       -3     
  Branches     4023     4022       -1     
==========================================
- Hits        18098    18092       -6     
- Misses       4462     4464       +2     
- Partials      780      781       +1     

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

Copy link

github-actions bot commented May 24, 2024

Test Results

     29 files  ±    0       29 suites  ±0   2h 55m 16s ⏱️ - 7m 29s
 12 839 tests +1 409    9 878 ✅ +1 040    2 908 💤 +   324      47 ❌ +    46   6 🔥  - 1 
537 387 runs   - 4 639  109 627 ✅  - 2 805  414 142 💤  - 15 438  13 606 ❌ +13 605  12 🔥  - 1 

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

Results for commit 8cf951c. ± Comparison against base commit 19f4e26.

This pull request removes 5 and adds 1414 tests. Note that renamed tests count towards both.
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function_aten_concatenate
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function_aten_index_put
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function_aten_tile
tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_function_has_op_schema_067_aten_concatenate
tests.function_libs.torch_lib.ops_test.TestFunctionValidity ‑ test_script_function_passes_checker_056_aten_concatenate
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0000_test_abs
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0001_test_acos
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0002_test_acosh
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0003_test_acosh_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0004_test_acos_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0005_test_adagrad
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0006_test_adagrad_multiple
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0007_test_adam
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0008_test_adam_multiple
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0009_test_add
…
This pull request removes 1 skipped test and adds 335 skipped tests. Note that renamed tests count towards both.
onnxscript.function_libs.tools.torch_lib.deduce_type_constraints_test.TestDeduceTypeConstraints ‑ test_deduce_type_constraints_does_not_crash_for_onnx_function_aten_tile
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0005_test_adagrad
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0006_test_adagrad_multiple
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0007_test_adam
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0008_test_adam_multiple
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0011_test_add_uint8
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0020_test_ai_onnx_ml_array_feature_extractor
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0021_test_ai_onnx_ml_binarizer
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0022_test_ai_onnx_ml_label_encoder_string_int
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0023_test_ai_onnx_ml_label_encoder_string_int_no_default
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0024_test_ai_onnx_ml_label_encoder_tensor_mapping
…

♻️ This comment has been updated with latest results.

@justinchuby justinchuby marked this pull request as draft May 24, 2024 23:43
@@ -60,15 +60,15 @@
Rank = common_ops.Rank


@torch_op("aten::_local_scalar_dense")
@torch_op("aten::_local_scalar_dense", traceable=True)
Copy link
Member

Choose a reason for hiding this comment

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

Just to check, is there any logic in the unit tests to check the conversion when trace only is enabled/disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It is tested with experimental-torchlib-tracing. Now that tracing is default I needed to set the non-trace flag and configure the pipeline to test the scripted versions.

@justinchuby
Copy link
Contributor Author

@shubhambhokare1 The next step would be simply find out which ones are not traceable from the test results. Either remove the traceable tag or rewrite the functions as trace_only.

@justinchuby justinchuby added the topic: torch_lib Related to the torch/aten function lib in development label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: torch_lib Related to the torch/aten function lib in development
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants