Unverified Commit 314f7176 authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

remove trust-remote-code in configs; fix escape sequences (#3180)

* remove trust-remote-code

* add W605 rule
parent 8c6fde08
......@@ -23,5 +23,3 @@ metric_list:
higher_is_better: false
metadata:
version: 1.0
dataset_kwargs:
trust_remote_code: true
......@@ -7,7 +7,7 @@ dataset_name: algebra
output_type: generate_until
training_split: train
test_split: test
doc_to_text: !function utils.doc_to_text
doc_to_text: !function utils.doc_to_text
process_results: !function utils.process_results
doc_to_target: "{{answer if few_shot is undefined else solution}}"
generation_kwargs:
......@@ -25,8 +25,6 @@ metric_list:
num_fewshot: 4
metadata:
version: 2.0
dataset_kwargs:
trust_remote_code: true
fewshot_config:
sampler: first_n
samples: !function utils.list_fewshot_samples
dataset_path: facebook/mlqa
dataset_kwargs:
trust_remote_code: true
test_split: test
validation_split: validation
output_type: generate_until
......
......@@ -9,5 +9,3 @@ doc_to_choice: "{{choices}}"
doc_to_target: "{{answer}}"
metadata:
version: 1.0
dataset_kwargs:
trust_remote_code: true
......@@ -13,5 +13,3 @@ metric_list:
higher_is_better: true
metadata:
version: 1.0
dataset_kwargs:
trust_remote_code: true
......@@ -26,5 +26,3 @@ metric_list:
ignore_punctuation: true
metadata:
version: 2.0
dataset_kwargs:
trust_remote_code: true
......@@ -34,5 +34,3 @@ metric_list:
ignore_punctuation: true
metadata:
version: 3.0
dataset_kwargs:
trust_remote_code: true
......@@ -17,7 +17,7 @@ class MultiChoiceRegexFilter(RegexFilter):
ignore_punctuation=False,
regexes_to_ignore=None,
) -> None:
"""
r"""
regex_pattern: The basic regex pattern to use. If fails to match, we will use the customized match procedure
- step 1 : We parse the choices between ([A-Z])s then try to find these choices in the response.
- step 2 : We parse the choice with regex :[\s]*([A-?]), where ? varies by number of choices.
......@@ -90,7 +90,7 @@ class MultiChoiceRegexFilter(RegexFilter):
fallback_regex = re.compile("|".join(fallback_regexes))
without_paren_fallback_regex = "|".join(without_paren_fallback_regexes)
without_paren_fallback_regex = re.compile(
f":[\s]*({without_paren_fallback_regex})"
rf":[\s]*({without_paren_fallback_regex})"
)
filtered = []
......
......@@ -30,5 +30,3 @@ metric_list:
higher_is_better: true
metadata:
version: 3.0
dataset_kwargs:
trust_remote_code: true
......@@ -17,7 +17,7 @@ class MultiChoiceRegexFilter(RegexFilter):
ignore_punctuation=False,
regexes_to_ignore=None,
) -> None:
"""
r"""
regex_pattern: The basic regex pattern to use. If fails to match, we will use the customized match procedure
- step 1 : We parse the choices between ([A-Z])s then try to find these choices in the response.
- step 2 : We parse the choice with regex :[\s]*([A-?]), where ? varies by number of choices.
......@@ -90,7 +90,7 @@ class MultiChoiceRegexFilter(RegexFilter):
fallback_regex = re.compile("|".join(fallback_regexes))
without_paren_fallback_regex = "|".join(without_paren_fallback_regexes)
without_paren_fallback_regex = re.compile(
f":[\s]*({without_paren_fallback_regex})"
rf":[\s]*({without_paren_fallback_regex})"
)
filtered = []
......
......@@ -13,5 +13,3 @@ metric_list:
higher_is_better: true
metadata:
version: 2.0
dataset_kwargs:
trust_remote_code: true
......@@ -30,5 +30,3 @@ filter_list:
- function: take_first
metadata:
version: 3.0
dataset_kwargs:
trust_remote_code: true
......@@ -44,7 +44,7 @@ if __name__ == "__main__":
line = line.format(lang=lang_abbr)
if "{ans_regex}" in line:
ans_regex = lang_lib_list[-1].replace(
"({})", "\(?([ABCDEFGHIJ])\)?"
"({})", r"\(?([ABCDEFGHIJ])\)?"
)
if lang_abbr == "en":
ans_regex = ans_regex.lstrip("the").strip()
......
......@@ -12,5 +12,3 @@ metric_list:
- metric: acc
metadata:
version: 0.0
dataset_kwargs:
trust_remote_code: true
......@@ -12,5 +12,3 @@ metric_list:
- metric: acc
metadata:
version: 0.0
dataset_kwargs:
trust_remote_code: true
......@@ -12,5 +12,3 @@ metric_list:
- metric: acc
metadata:
version: 0.0
dataset_kwargs:
trust_remote_code: true
......@@ -23,5 +23,3 @@ metric_list:
higher_is_better: true
metadata:
version: 2.0
dataset_kwargs:
trust_remote_code: true
......@@ -2,8 +2,6 @@ dataset_path: Helsinki-NLP/tatoeba_mt
training_split: validation
test_split: test
output_type: generate_until
dataset_kwargs:
trust_remote_code: true
metric_list:
- metric: bleu
higher_is_better: true
......
......@@ -19,5 +19,3 @@ metric_list:
higher_is_better: true
metadata:
version: 1.0
dataset_kwargs:
trust_remote_code: true
......@@ -23,5 +23,3 @@ metric_list:
higher_is_better: true
metadata:
version: 1.0
dataset_kwargs:
trust_remote_code: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment