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, output_to_scaler_name=<factory>)[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.
output_to_scaler_name is a dictionary to define the scaler
- 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)
output_to_scaler_name (dict[str, str])
- batch_size: int¶
batch size. Defaults to 1
- device: str¶
device name. Defaults to cpu
- 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
- output_to_scaler_name: dict[str, str]¶
- output_to_scaler_name is a dictionary to define the scaler
for each output variable. The key is the name of the output variable
and the value is the name of variable which has the scaler to use. Defaults to empty dictionary, relationship between output variable
and scaler is assumed to be the same as that of label variables.
- 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.