Skip to content

Commit aaad13c

Browse files
committed
fix import
1 parent f732f74 commit aaad13c

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

_doc/examples/plot_failing_model_extract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import onnxruntime
2828
from onnx_diagnostic import doc
2929
from onnx_diagnostic.helpers.onnx_helper import from_array_extended
30-
from onnx_diagnostic.ort_session import investigate_onnxruntime_issue
30+
from onnx_diagnostic.helpers.ort_session import investigate_onnxruntime_issue
3131

3232
TFLOAT = onnx.TensorProto.FLOAT
3333

_doc/examples/plot_failing_onnxruntime_evaluator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
It splits the model into node and runs them independently until it succeeds
1212
or fails. This class converts every node into model based on the types
1313
discovered during the execution. It relies on :class:`InferenceSessionForTorch
14-
<onnx_diagnostic.ort_session.InferenceSessionForTorch>` or
14+
<onnx_diagnostic.helpers.ort_session.InferenceSessionForTorch>` or
1515
:class:`InferenceSessionForNumpy
16-
<onnx_diagnostic.ort_session.InferenceSessionForNumpy>`
16+
<onnx_diagnostic.helpers.ort_session.InferenceSessionForNumpy>`
1717
for the execution. This example uses torch tensor and
1818
bfloat16.
1919

_unittests/ut_torch_onnx/test_sbs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import unittest
2-
from onnx_diagnostic.ext_test_case import ExtTestCase, hide_stdout
2+
from onnx_diagnostic.ext_test_case import ExtTestCase, hide_stdout, ignore_warnings
33
from onnx_diagnostic.reference import ExtendedReferenceEvaluator
44
from onnx_diagnostic.torch_onnx.sbs import run_aligned
55

@@ -13,6 +13,7 @@ class TestSideBySide(ExtTestCase):
1313

1414
@hide_stdout()
1515
@unittest.skipIf(to_onnx is None, "to_onnx not installed")
16+
@ignore_warnings((UserWarning,))
1617
def test_ep_onnx_sync_exp(self):
1718
import torch
1819

@@ -44,8 +45,9 @@ def forward(self, x):
4445
self.assertEqual(len(results), 4)
4546

4647
@hide_stdout()
48+
@ignore_warnings((DeprecationWarning, FutureWarning, UserWarning))
4749
@unittest.skipIf(to_onnx is None, "to_onnx not installed")
48-
def test_ep_onnx_sync(self):
50+
def test_ep_onnx_sync_a(self):
4951
import torch
5052

5153
class Model(torch.nn.Module):

onnx_diagnostic/ext_test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ def assert_onnx_disc(
10441044
:param atol: absolute tolerance
10451045
:param rtol: relative tolerance
10461046
:param kwargs: arguments sent to
1047-
:class:`onnx_diagnostic.ort_session.InferenceSessionForTorch`
1047+
:class:`onnx_diagnostic.helpers.ort_session.InferenceSessionForTorch`
10481048
"""
10491049
import torch.utils._pytree as py_pytree
10501050
from .helper import string_type, string_diff, max_diff

onnx_diagnostic/helpers/ort_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def investigate_onnxruntime_issue(
522522
import numpy as np
523523
import onnx
524524
import onnx.helper as oh
525-
from onnx_diagnostic.ort_session import investigate_onnxruntime_issue
525+
from onnx_diagnostic.helpers.ort_session import investigate_onnxruntime_issue
526526
527527
TFLOAT = onnx.TensorProto.FLOAT
528528
model = oh.make_model(

0 commit comments

Comments
 (0)