Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
davidt0x committed Jan 15, 2025
1 parent 63ee3cf commit 7c3129c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/modeci_mdf/interfaces/pytorch/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Mike He, "From Models to Computation Graphs (Part I)", https://ad1024.space/articles/22
"""

import inspect
import logging

Expand All @@ -13,6 +14,7 @@

import torch


# We need to monkey patch the torch._C.Node class to add a __getitem__ method
# This is for torch 2.0
# From https://github.com/openai/CLIP/issues/79#issuecomment-1624202950
Expand Down Expand Up @@ -528,8 +530,10 @@ def pytorch_to_mdf(
try:
from torch.onnx.symbolic_helper import _set_opset_version
except ImportError:

def _set_opset_version(version):
from torch.onnx._globals import GLOBALS

GLOBALS.export_onnx_opset_version = version

try:
Expand Down

0 comments on commit 7c3129c

Please sign in to comment.