Skip to content

JSONLogger bug in Basic Tour example  #438

@darryl34

Description

@darryl34

As seen in the example, we can save and load our progress with a logger file.

logger = JSONLogger(path="./logs.log")
load_logs(new_optimizer, logs=["./logs.log"])

As the specified file does not have the .json extension, it will be appended to it as seen in logger.py line 138.

class JSONLogger(_Tracker):
    def __init__(self, path, reset=True):
        self._path = path if path[-5:] == ".json" else path + ".json"

However, this causes a FileNotFoundError as the file is now "logs.log.json" instead. Perhaps a fix would be to edit the notebook and a note saying that the given file will have the .json extension added to it if its not already one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions