From 37a090d4f41c3bdbcd2e21d9f65fa335b72c6f99 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 20 Mar 2024 23:07:10 +0100 Subject: [PATCH] fix --- lollms/config.py | 1 + lollms/main_config.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lollms/config.py b/lollms/config.py index 90d937a..3f16a59 100644 --- a/lollms/config.py +++ b/lollms/config.py @@ -275,6 +275,7 @@ class BaseConfig: return self.config[key] def copy(self): + return BaseConfig(self.exceptional_keys, self.config.copy(), self.file_path) def __getattr__(self, key): diff --git a/lollms/main_config.py b/lollms/main_config.py index b423890..fea1c4c 100644 --- a/lollms/main_config.py +++ b/lollms/main_config.py @@ -64,7 +64,10 @@ class LOLLMSConfig(BaseConfig): else: self.lollms_paths = lollms_paths - + def copy(self): + cfg = LOLLMSConfig(self.file_path, self.lollms_paths) + cfg.config = self.config.copy() + return cfg @staticmethod def autoload(lollms_paths:LollmsPaths, config_path:str=None): # Configuration loading part