Skip to content

Commit 326da02

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2dd7af6 commit 326da02

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tests/model_explainability/lm_eval/test_lm_eval.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
TIER1_LMEVAL_TASKS: List[str] = get_lmeval_tasks(min_downloads=10000)
1313

14-
TIER_2_LMEVAL_TASKS: List[str] = get_lmeval_tasks(min_downloads=.70, max_downloads=10000) - set(TIER1_LMEVAL_TASKS)
14+
TIER_2_LMEVAL_TASKS: List[str] = get_lmeval_tasks(min_downloads=0.70, max_downloads=10000) - set(TIER1_LMEVAL_TASKS)
15+
1516

1617
@pytest.mark.parametrize(
1718
"model_namespace, lmevaljob_hf",

tests/model_explainability/lm_eval/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List,Union
1+
from typing import List, Union
22

33
from kubernetes.dynamic import DynamicClient
44
from ocp_resources.lm_eval_job import LMEvalJob
@@ -66,7 +66,7 @@ def get_lmeval_tasks(min_downloads: Union[int, float], max_downloads: Union[int,
6666
# if max_downloads is provided, filter for tasks that have less than
6767
# or equal to the maximum number of downloads
6868
if max_downloads is not None:
69-
if (max_downloads <= 0 | max_downloads > max(lmeval_tasks["HF dataset downloads"])):
69+
if max_downloads <= 0 | max_downloads > max(lmeval_tasks["HF dataset downloads"]):
7070
raise ValueError("Maximum downloads must be greater than 0 and less than the maximum number of downloads")
7171
if isinstance(max_downloads, float):
7272
max_downloads = lmeval_tasks["HF dataset downloads"].quantile(max_downloads)

0 commit comments

Comments
 (0)