phlower.settings.PhlowerPredictorSetting¶
- class phlower.settings.PhlowerPredictorSetting(*, selection_mode, device='cpu', log_file_name='log', saved_setting_filename='model', batch_size=1, num_workers=0, non_blocking=False, random_seed=0, target_epoch=None, inverse_scaling=False)[source]¶
Bases:
BaseModel
Methods
check_valid_selection_mode
(name)check_valid_target_epoch
()Attributes
model_computed_fields
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
model_extra
Get extra fields set during validation.
model_fields
model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Define method to select checkpoint file.
device name.
name of log file.
file name of pretrained model setting.
batch size.
the number of cores.
non_blocking
random seed.
target_epoch specifies the number of snapshot.
target_epoch specifies the number of snapshot.
- Parameters:
selection_mode (str)
device (str)
log_file_name (str)
saved_setting_filename (str)
batch_size (int)
num_workers (int)
non_blocking (bool)
random_seed (int)
target_epoch (int | None)
inverse_scaling (bool)
- batch_size: int¶
batch size. Defaults to 1
- device: str¶
device name. Defaults to cpu
- inverse_scaling: bool¶
target_epoch specifies the number of snapshot. Defaults to None.
- log_file_name: str¶
name of log file. Defaults to “log”
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- num_workers: int¶
the number of cores. Defaults to 0
- random_seed: int¶
random seed. Defaults to 0
- saved_setting_filename: str¶
file name of pretrained model setting. Defaults to “model”
- selection_mode: str¶
Define method to select checkpoint file. Choose from “best”, “latest”, “train_best”, “specified”
- target_epoch: int | None¶
target_epoch specifies the number of snapshot. Defaults to None.