Skip to content

Commit

Permalink
Fix CI for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Aug 13, 2024
1 parent af818af commit ac0b9a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"jiwer",
"langdetect",
"mauve-text",
"nltk",
"nltk<3.8.2",
"rouge_score",
"sacrebleu",
"sacremoses",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_inspect_dataset(path, tmp_path):
@pytest.mark.filterwarnings("ignore:metric_module_factory is deprecated:FutureWarning")
@pytest.mark.parametrize("path", ["accuracy"])
def test_inspect_metric(path, tmp_path):
inspect_metric(path, tmp_path, trust_remote_code=True)
inspect_metric(path, tmp_path, trust_remote_code=True, revision="2.21")
script_name = path + ".py"
assert script_name in os.listdir(tmp_path)
assert "__pycache__" not in os.listdir(tmp_path)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ def test_GithubMetricModuleFactory_with_internal_import(self):
# "squad_v2" requires additional imports (internal)
factory = GithubMetricModuleFactory(
"squad_v2",
revision="2.21",
download_config=self.download_config,
dynamic_modules_path=self.dynamic_modules_path,
trust_remote_code=True,
Expand All @@ -464,6 +465,7 @@ def test_GithubMetricModuleFactory_with_external_import(self):
# "bleu" requires additional imports (external from github)
factory = GithubMetricModuleFactory(
"bleu",
revision="2.21",
download_config=self.download_config,
dynamic_modules_path=self.dynamic_modules_path,
trust_remote_code=True,
Expand Down

0 comments on commit ac0b9a8

Please sign in to comment.