Skip to content

Commit de84c11

Browse files
authored
lazy import of evaluate (#1957)
Signed-off-by: Assaf Toledo <assaf.toledo@ibm.com>
1 parent 7a6f68e commit de84c11

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/unitxt/metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
Union,
2929
)
3030

31-
import evaluate
3231
import numpy
3332
import numpy as np
3433
import pandas as pd
@@ -82,6 +81,8 @@
8281

8382
@retry_connection_with_exponential_backoff(backoff_factor=2)
8483
def hf_evaluate_load(path: str, *args, **kwargs):
84+
import evaluate
85+
8586
if settings.hf_offline_metrics_path is not None:
8687
path = os.path.join(settings.hf_offline_metrics_path, path)
8788
return evaluate.load(

0 commit comments

Comments
 (0)