From b9447ae6ce55f678ad4564c8d57ef677f803597c Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:23:49 +0100 Subject: [PATCH 1/2] Remove unnecessary deepcopy in evaluation_tracker --- src/lighteval/logging/evaluation_tracker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lighteval/logging/evaluation_tracker.py b/src/lighteval/logging/evaluation_tracker.py index 017055348..6a0b940f8 100644 --- a/src/lighteval/logging/evaluation_tracker.py +++ b/src/lighteval/logging/evaluation_tracker.py @@ -153,8 +153,7 @@ def save(self) -> None: date_id = datetime.now().isoformat().replace(":", "-") # We first prepare data to save - config_general = copy.deepcopy(self.general_config_logger) - config_general = asdict(config_general) + config_general = asdict(self.general_config_logger) # We remove the config from logging, which contains context/accelerator objects config_general.pop("config") From eb5353dd03a5fbe72c76cc43dae31310a8449769 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:20:24 +0100 Subject: [PATCH 2/2] Fix style --- src/lighteval/logging/evaluation_tracker.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lighteval/logging/evaluation_tracker.py b/src/lighteval/logging/evaluation_tracker.py index 6a0b940f8..79c886b2b 100644 --- a/src/lighteval/logging/evaluation_tracker.py +++ b/src/lighteval/logging/evaluation_tracker.py @@ -20,7 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import copy import json import logging import os