"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "5177dca634c7b4b6e3e585ae45938e4f043a7348"
Unverified Commit 9618cd69 authored by Doug Blank's avatar Doug Blank Committed by GitHub
Browse files

Import integration libraries first (#7650)

* Import intergration libraries first

* isort and black happiness

* flake8 happiness

* Add a test

* Black reformat

* Ignore import order in tests

* A heavy-handed method of disabling comet for tests

* Remove comet_ml tests

* Run black on setup.py
parent 4dcc424d
......@@ -134,9 +134,7 @@ setup(
"sacremoses",
],
extras_require=extras,
entry_points={
"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]
},
entry_points={"console_scripts": ["transformers-cli=transformers.commands.transformers_cli:main"]},
python_requires=">=3.6.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
......
......@@ -2,13 +2,11 @@
import math
import os
from .file_utils import is_torch_tpu_available
from .trainer_callback import TrainerCallback
from .trainer_utils import PREFIX_CHECKPOINT_DIR, BestRun
from .utils import logging
# Import 3rd-party integrations first:
try:
# Comet needs to be imported before any ML frameworks
import comet_ml # noqa: F401
_has_comet = True
......@@ -53,6 +51,14 @@ except ImportError:
except ImportError:
_has_tensorboard = False
# No transformer imports above this point
from .file_utils import is_torch_tpu_available
from .trainer_callback import TrainerCallback
from .trainer_utils import PREFIX_CHECKPOINT_DIR, BestRun
from .utils import logging
logger = logging.get_logger(__name__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment