Skip to content

test: skip export2python backend tests with optional_type inputs - #3078

Open
Mohammed Alkindi (MohammedAlkindi) wants to merge 1 commit into
microsoft:mainfrom
MohammedAlkindi:test/skip-optional-type-export-tests
Open

Mohammed Alkindi (MohammedAlkindi) wants to merge 1 commit into
microsoft:mainfrom
MohammedAlkindi:test/skip-optional-type-export-tests

Conversation

@MohammedAlkindi

Copy link
Copy Markdown
Contributor

The onnx-weekly and torch-nightly jobs on main fail four backend export tests (run 37558713688). With the new onnx, these node tests now load in onnxruntime, so the test reaches export2python, which sits outside the NotImplementedError guard. _translate_type has no mapping for optional_type inputs:

FAILED ...1215_test_optional_has_element_empty_optional_input - NotImplementedError: Unable to translate type optional_type {

Same for 1207, 1211 and 1212. This adds two SKIP_TESTS entries for those four tests, next to the existing test_optional_get_element_tensor skip. The empty_no_input variants still run.

Locally with onnx 1.23.0.dev20260831 (the weekly pin), running the non-win32 skip list: before, 4 errors; after, all 11 test_optional* tests give OK (skipped=7), with 1213, 1214, 1216 and 1217 passing. ruff check and ruff format --check are clean.

With onnx-weekly, ORT now loads and runs the optional_has_element and
optional_get_element_optional_tensor node tests, so the test reaches the
export2python call, which sits outside the NotImplementedError guard.
onnx_type_to_onnxscript_repr has no translation for optional_type, so
four tests fail on the onnx-weekly and torch-nightly jobs instead of
skipping. Skip those four explicitly, like the existing
test_optional_get_element_tensor entry.

This branch has not been deployed

No deployments
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.

1 participant