JsonFileStore#
- class scikitplot.agent.JsonFileStore(directory)[source]#
Keep each run’s state in
<directory>/<run_id>.json.- Parameters:
- directorystr or os.PathLike
Created if missing.
- Parameters:
directory (str | os.PathLike[str])
Notes
A save writes a temporary file in the same directory, syncs it, renames it over the old one (
os.replace) and syncs the directory, so a reader sees the old state or the new one, never a partial file, and the new one survives a power loss oncesavereturns. The run id is checked to be 64 hexadecimal digits before it names a file, so it cannot name one outsidedirectory.