Skip to content

Commit

Permalink
Make convert_to_onnx runable as script again (huggingface#20009)
Browse files Browse the repository at this point in the history
* Make convert_to_onnx runable as script again

Fix `convert_graph_to_onnx.py` relative import so it can be run as a script again.

* Trigger CI
  • Loading branch information
mcernusca authored and amyeroberts committed Dec 7, 2022
1 parent a904c13 commit dcf3c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/convert_graph_to_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def convert_pytorch(nlp: Pipeline, opset: int, output: Path, use_external_format
import torch
from torch.onnx import export

from .pytorch_utils import is_torch_less_than_1_11
from transformers.pytorch_utils import is_torch_less_than_1_11

print(f"Using framework PyTorch: {torch.__version__}")

Expand Down

0 comments on commit dcf3c21

Please sign in to comment.