fix: file_handler issue (#869)

* fix: file_handler issue

* fix: add logic for the trained_agent data
This commit is contained in:
Eduardo Chiarotti
2024-07-04 16:34:43 -03:00
committed by GitHub
parent 4bcd1df6bb
commit 81ed6f177e
3 changed files with 13 additions and 7 deletions

View File

@@ -31,9 +31,8 @@ class PickleHandler:
- file_name (str): The name of the file for saving and loading data.
"""
self.file_path = os.path.join(os.getcwd(), file_name)
self._initialize_file()
def _initialize_file(self) -> None:
def initialize_file(self) -> None:
"""
Initialize the file with an empty dictionary if it does not exist or is empty.
"""