phlower.settings.PhlowerSetting

class phlower.settings.PhlowerSetting(*, version='0.2.2-dev1', data=<factory>, training=None, model=None, scaling=None, prediction=None)[source]

Bases: BaseModel

Methods

check_version(version)

read_dictionary(data)

Read dictionary and parse to PhlowerSetting object.

read_yaml(file_path[, decrypt_key])

Read yaml file and parse to PhlowerSetting object.

Attributes

model_computed_fields

model_config

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.

version

version of setting file.

data

Data seting.

training

training setting.

model

model setting.

scaling

scaling setting.

prediction

prediction setting.

Parameters:
data: PhlowerDataSetting

Data seting. Defaults to None.

model: PhlowerModelSetting | None

model setting. Defaults to None.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

prediction: PhlowerPredictorSetting | None

prediction setting. Defaults to None.

classmethod read_dictionary(data)[source]

Read dictionary and parse to PhlowerSetting object.

Parameters:

data (dict)

Return type:

PhlowerSetting

classmethod read_yaml(file_path, decrypt_key=None)[source]

Read yaml file and parse to PhlowerSetting object.

Parameters:
  • file_path (pathlib.Path | str | PhlowerYamlFile) – path to yaml file

  • decrypt_key (bytes | None, optional) – key to decrypt file. Defaults to None.

Returns:

PhlowerSetting object

Return type:

Self

scaling: PhlowerScalingSetting | None

scaling setting. Defaults to None.

training: PhlowerTrainerSetting | None

training setting. Defaults to None.

version: str

version of setting file.