figure
sgp.figure.FigureProperties
Bases: HashableBaseModelIO
sgp.figure.HashableBaseModelIO
Bases: BaseModel
Input/output utilities for the models with support for the following features:
- Hashing of the model
- Conversion to and from dictionaries, json, toml, and yaml files
- Compatibility with pydantic v1 and v2
sgp.figure.HashableBaseModelIO.exclude
property
Fields to exclude from the model, typically used to exclude arbitrary types when it is allowed in the pydantic model to avoid hashing issues.
sgp.figure.HashableBaseModelIO.fromBytes
classmethod
Load the model from a binary string or file if a path is provided.
sgp.figure.HashableBaseModelIO.fromCryptography
classmethod
Decrypt the model using the key.
sgp.figure.HashableBaseModelIO.fromDict
classmethod
fromDict(*, data: dict, **kwargs) -> Self
Load the model from a dictionary.
sgp.figure.HashableBaseModelIO.fromJson
classmethod
Load the model from a json string or file if a path is provided.
sgp.figure.HashableBaseModelIO.fromToml
classmethod
Load the model from a toml string or file if a path is provided.
sgp.figure.HashableBaseModelIO.fromYaml
classmethod
Load the model from a yaml string or file if a path is provided.
sgp.figure.HashableBaseModelIO.toBytes
Convert the model to a binary string or save it to a file if a path is provided.
sgp.figure.HashableBaseModelIO.toCryptography
Encrypt the model using the key.
sgp.figure.HashableBaseModelIO.toJson
Convert the model to a json string or save it to a file if a path is provided.
sgp.figure.HashableBaseModelIO.toToml
Convert the model to a toml string or save it to a file if a path is provided.
sgp.figure.HashableBaseModelIO.toYaml
Convert the model to a yaml string or save it to a file if a path is provided.
sgp.figure.HashableBaseModelIO.update
update(data: dict = None, **kwargs) -> Self
Update the options of the optimizer