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

[typing] Make the runtime_typing.checked always typed #1738

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

justinchuby
Copy link
Collaborator

Otherwise mypy raises

  Error (MYPY) misc
    Untyped decorator makes function "to_model_proto" untyped
    
    To disable, use `  # type: ignore[misc]`

        1001  |        )
        1002  |        return onnx_function
        1003  |
    >>> 1004  |    @runtime_typing.checked
        1005  |    def to_model_proto(
        1006  |        self, opset_version: int, include_initializers: bool = True
        1007  |    ) -> onnx.ModelProto:

Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.74%. Comparing base (842f38d) to head (89f65f3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1738   +/-   ##
=======================================
  Coverage   74.74%   74.74%           
=======================================
  Files         245      245           
  Lines       26369    26370    +1     
  Branches     4795     4795           
=======================================
+ Hits        19709    19710    +1     
  Misses       5740     5740           
  Partials      920      920           

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

Copy link

Test Results

     23 files   -      1      23 suites   - 1   1h 53m 47s ⏱️ + 5m 56s
 12 940 tests  -    990   9 805 ✅  - 804    3 133 💤  -    179   2 ❌  - 7 
291 603 runs  +15 407  69 792 ✅ +836  221 801 💤 +14 579  10 ❌  - 8 

For more details on these failures, see this check.

Results for commit 234858f. ± Comparison against base commit 2401de4.

This pull request removes 990 tests.
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0289_test_convtranspose_kernel_shape
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0290_test_convtranspose_output_shape
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0291_test_convtranspose_pad
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0292_test_convtranspose_pads
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0293_test_conv_with_autopad_same
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0294_test_conv_with_strides_and_asymmetric_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0295_test_conv_with_strides_no_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0296_test_conv_with_strides_padding
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0297_test_cos
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0298_test_cosh
…
This pull request skips 44 tests.
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_0068_test_asin
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0069_test_asinh
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0070_test_asinh_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0071_test_asin_example
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0072_test_atan
onnxscript.backend.onnx_export_test.TestOnnxBackEnd ‑ test_export2python_produces_correct_onnx_script_model_0073_test_atanh
…

@justinchuby justinchuby merged commit 3fc6ead into main Jul 22, 2024
27 of 41 checks passed
@justinchuby justinchuby deleted the justinchu/typed-decorator branch July 22, 2024 19:56
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.

2 participants