Skip to content

Commit cffc140

Browse files
committed
no dynamic import needed for hugging face - download
1 parent 955ab83 commit cffc140

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

chebifier/ensemble/base_ensemble.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
import torch
55
import tqdm
6-
from chebifier.inconsistency_resolution import PredictionSmoother
7-
from chebifier.utils import load_chebi_graph, get_disjoint_files
86

97
from chebifier.check_env import check_package_installed
8+
from chebifier.hugging_face import download_model_files
9+
from chebifier.inconsistency_resolution import PredictionSmoother
1010
from chebifier.prediction_models.base_predictor import BasePredictor
11+
from chebifier.utils import get_disjoint_files, load_chebi_graph
1112

1213

1314
class BaseEnsemble:
14-
1515
def __init__(
1616
self,
1717
model_configs: dict,
@@ -29,8 +29,6 @@ def __init__(
2929
for model_name, model_config in model_configs.items():
3030
model_cls = MODEL_TYPES[model_config["type"]]
3131
if "hugging_face" in model_config:
32-
from chebifier.hugging_face import download_model_files
33-
3432
hugging_face_kwargs = download_model_files(model_config["hugging_face"])
3533
else:
3634
hugging_face_kwargs = {}

0 commit comments

Comments
 (0)