ConfigurableBaseEstimator¶
- class lightkit.ConfigurableBaseEstimator(*, default_params=None, user_params=None, overwrite_params=None)[source]¶
Bases:
lightkit.estimator.base.BaseEstimator
,Generic
[lightkit.estimator.configurable.M
]Extension of the base estimator which allows to manage a single model that uses the
lightkit.nn.Configurable
mixin.- Parameters
default_params (dict[str, Any] | None) -- Estimator-specific parameters that provide defaults for configuring the PyTorch Lightning trainer. An example might be setting
max_epochs
. Overwrites the default parameters established by the base estimator.user_params (dict[str, Any] | None) -- User-specific parameters that configure the PyTorch Lightning trainer. This dictionary should be passed through from a
trainer_params
init argument in subclasses. Overwrites any of the default parameters.overwrite_params (dict[str, Any] | None) -- PyTorch Lightning trainer flags that need to be ensured independently of user-provided parameters. For example,
max_epochs
could be fixed to a certain value.
Methods
Loads the fitted attributes that are stored at the fitted path. |
|
Saves the fitted attributes of this estimator. |
Inherited Methods
Clones the estimator without copying any fitted attributes. |
|
Returns the estimator's parameters as passed to the initializer. |
|
Loads the estimator and (if available) the fitted model. |
|
Initializes this estimator by loading its parameters. |
|
Saves the estimator to the provided directory. |
|
Saves the parameters of this estimator. |
|
Sets the provided values on the estimator. |
|
Returns the trainer as configured by the estimator. |
Attributes
|
Returns the list of fitted attributes that ought to be saved and loaded. |
|