Serializer#
- class Serializer[source]#
Bases:
ABCInterface for any class that can read and write configurations to a persistent format, e.g. a file.
This can be used for the state of an optimization or the setup of the layers.
- __init__()#
Methods
__init__()load()Load and return data that was previously saved.
Load and return the comment, if any, that was previously saved with the data.
save(data[, comment])Saves data to a persistent format.
- abstract load_comment()[source]#
Load and return the comment, if any, that was previously saved with the data.
Returns None if no comment was saved.
- Returns:
The comment, or None if no comment was saved.
- Return type:
str | None