Configurable.load¶
- classmethod Configurable.load(path)[source]¶
Loads the module's configurations and parameters from files in the specified directory at first. Then, it initializes the model with the stored configurations and loads the parameters. This method is typically used after calling
save()
on the model.- Parameters
path (
Union
[str
,PathLike
[str
]]) -- The directory which contains theconfig.json
andparameters.pt
files to load.- Return type
TypeVar
(M
, bound= ConfigurableModule)- Returns
The loaded model.
Note
You can load modules even after you changed their configuration class. The only requirement is that any new configuration options have a default value.