Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby committed Nov 23, 2024
1 parent c8d27e8 commit 6f4d694
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions onnxscript/_framework_apis/torch_2_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)

if TYPE_CHECKING:
from onnxscript.values import Opset
from onnxscript.onnx_opset._impl.opset18 import Opset18


def optimize(model: ir.Model) -> ir.Model:
Expand All @@ -32,8 +32,14 @@ def optimize(model: ir.Model) -> ir.Model:
return model


def torchlib_opset() -> Opset:
def torchlib_opset() -> Opset18:
"""Return the default opset for torchlib."""
from onnxscript import opset18 # pylint: disable=import-outside-toplevel
import onnxscript # pylint: disable=import-outside-toplevel

return opset18
return onnxscript.opset18 # type: ignore


def torchlib_opset_version() -> int:
"""Return the default opset version for torchlib."""

return torchlib_opset().version

0 comments on commit 6f4d694

Please sign in to comment.