Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Commit

Permalink
remove try_import for optional imports
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Jul 5, 2021
1 parent 3daa4d4 commit fe31845
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions hpoflow/optuna_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@
import logging
import os

from hpoflow.optuna_mlflow import OptunaMLflow
from optuna._imports import try_import

with try_import() as _imports:
import mlflow
import transformers
import mlflow
import transformers

# do the check eagerly and not in the constructor
# because OptunaMLflowCallback inherits from transformers.TrainerCallback
_imports.check()
from hpoflow.optuna_mlflow import OptunaMLflow

_logger = logging.getLogger(__name__)

Expand Down

0 comments on commit fe31845

Please sign in to comment.