From da0e81268a891c85c6855c42f289bb13bdb654b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Fourrier?= <22726840+clefourrier@users.noreply.github.com> Date: Tue, 9 Jul 2024 09:54:59 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Nathan Habib <30601243+NathanHB@users.noreply.github.com> --- src/lighteval/logging/evaluation_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lighteval/logging/evaluation_tracker.py b/src/lighteval/logging/evaluation_tracker.py index b0425348a..2a14c1f55 100644 --- a/src/lighteval/logging/evaluation_tracker.py +++ b/src/lighteval/logging/evaluation_tracker.py @@ -319,7 +319,7 @@ def recreate_metadata_card(self, repo_id: str) -> None: # noqa: C901 # to be able to parse the filename as iso dates, we need to re-replace the `-` with `:` # iso_date[13] = iso_date[16] = ':' dir_name = os.path.dirname(sub_file) - iso_date = dir_name[:13] + ":" + dir_name[14:16] + ":" + dir_name[17:] + iso_date = ':'.join(dir_name.rsplit('-', 2)) eval_date = datetime.fromisoformat(iso_date) last_eval_date_results[task_name] = (