Add MBART to models exportable with ONNX (#13049)
* Add MBART to models exportable with ONNX * unittest mock * Add tests * Misc fixes
This commit is contained in:
@@ -25,6 +25,7 @@ from distutils.util import strtobool
|
||||
from io import StringIO
|
||||
from pathlib import Path
|
||||
from typing import Iterator, Union
|
||||
from unittest import mock
|
||||
|
||||
from transformers import logging as transformers_logging
|
||||
|
||||
@@ -1007,7 +1008,7 @@ def mockenv(**kwargs):
|
||||
use_tf = os.getenv("USE_TF", False)
|
||||
|
||||
"""
|
||||
return unittest.mock.patch.dict(os.environ, kwargs)
|
||||
return mock.patch.dict(os.environ, kwargs)
|
||||
|
||||
|
||||
# from https://stackoverflow.com/a/34333710/9201239
|
||||
|
||||
Reference in New Issue
Block a user