Skip to content

Commit

Permalink
some minor logging nits (#2609)
Browse files Browse the repository at this point in the history
* remove yaml extension from phraes_va_common

* remove yaml extension from winogenerated

* remove yaml extension from phrases_es

* no cache debug logging when not used
  • Loading branch information
baberabb authored Jan 4, 2025
1 parent 1044db9 commit 888ac29
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lm_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def build_all_requests(
)
cache_key += f"-tokenizer{tokenizer_name}"

cached_instances = load_from_cache(file_name=cache_key)
cached_instances = load_from_cache(file_name=cache_key, cache=cache_requests)

if cache_requests and cached_instances and not rewrite_requests_cache:
cached_instances = cached_instances[:limit]
Expand Down
4 changes: 3 additions & 1 deletion lm_eval/caching/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
FILE_SUFFIX = f".{HASH_PREFIX}.pickle"


def load_from_cache(file_name):
def load_from_cache(file_name: str, cache: bool = False):
if not cache:
return
try:
path = f"{PATH}/{file_name}{FILE_SUFFIX}"

Expand Down
2 changes: 1 addition & 1 deletion lm_eval/tasks/catalan_bench/phrases_va/phrases_ca-va.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File generated by `create-yamls.py`
include: _phrases_va_common.yaml
include: _phrases_va_common
task: phrases_ca-va
doc_to_text: 'Oració en català: {{ca}}
Expand Down
2 changes: 1 addition & 1 deletion lm_eval/tasks/catalan_bench/phrases_va/phrases_va-ca.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File generated by `create-yamls.py`
include: _phrases_va_common.yaml
include: _phrases_va_common
task: phrases_va-ca
doc_to_text: 'Oració en valencià: {{va}}
Expand Down
2 changes: 1 addition & 1 deletion lm_eval/tasks/spanish_bench/phrases_es/phrases_es-va.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File generated by `create-yamls.py`
include: _phrases_es_common.yaml
include: _phrases_es_common
task: phrases_es-va
doc_to_text: 'Oració en espanyol: {{es}}
Expand Down
2 changes: 1 addition & 1 deletion lm_eval/tasks/spanish_bench/phrases_es/phrases_va-es.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File generated by `create-yamls.py`
include: _phrases_es_common.yaml
include: _phrases_es_common
task: phrases_va-es
doc_to_text: 'Oració en valencià: {{va}}
Expand Down

0 comments on commit 888ac29

Please sign in to comment.