openstef package

Subpackages

Submodules

openstef.app_settings module

class openstef.app_settings.AppSettings(_case_sensitive=None, _nested_model_default_partial_update=None, _env_prefix=None, _env_file=PosixPath('.'), _env_file_encoding=None, _env_ignore_empty=None, _env_nested_delimiter=None, _env_parse_none_str=None, _env_parse_enums=None, _cli_prog_name=None, _cli_parse_args=None, _cli_settings_source=None, _cli_parse_none_str=None, _cli_hide_none_type=None, _cli_avoid_json=None, _cli_enforce_required=None, _cli_use_class_docs_for_groups=None, _cli_exit_on_error=None, _cli_prefix=None, _cli_flag_prefix_char=None, _cli_implicit_flags=None, _cli_ignore_unknown_args=None, _cli_kebab_case=None, _secrets_dir=None, **values)

Bases: BaseSettings

Global app settings.

log_level: str
model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_kebab_case': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'enable_decoding': True, 'env_file': '.env', 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': 'openstef_', 'extra': 'ignore', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_validate', 'model_dump', 'settings_customise_sources'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

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

post_teams_messages: bool

openstef.enums module

class openstef.enums.BiddingZone(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AL = 'AL'
AT = 'AT'
BA = 'BA'
BE = 'BE'
BG = 'BG'
BY = 'BY'
CH = 'CH'
CWE = 'CWE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_2A = 'NO_2A'
NO_2_NSL = 'NO_2_NSL'
NO_3 = 'NO_3'
NO_4 = 'NO_4'
NO_5 = 'NO_5'
PL = 'PL'
PL_CZ = 'PL_CZ'
PT = 'PT'
RO = 'RO'
RS = 'RS'
RU = 'RU'
RU_KGD = 'RU_KGD'
SE = 'SE'
SE_1 = 'SE_1'
SE_2 = 'SE_2'
SE_3 = 'SE_3'
SE_4 = 'SE_4'
SI = 'SI'
SK = 'SK'
TR = 'TR'
UA = 'UA'
UA_BEI = 'UA_BEI'
UA_DOBTPP = 'UA_DOBTPP'
UA_IPS = 'UA_IPS'
UK = 'UK'
XK = 'XK'
class openstef.enums.ForecastType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

BASECASE = 'basecase'
DEMAND = 'demand'
SOLAR = 'solar'
WIND = 'wind'
class openstef.enums.ModelType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ARIMA = 'arima'
FLATLINER = 'flatliner'
LGB = 'lgb'
LINEAR = 'linear'
LINEAR_QUANTILE = 'linear_quantile'
XGB = 'xgb'
XGB_MULTIOUTPUT_QUANTILE = 'xgb_multioutput_quantile'
XGB_QUANTILE = 'xgb_quantile'
class openstef.enums.PipelineType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

FORECAST = 'forecast'
HYPER_PARMATERS = 'hyper_parameters'
TRAIN = 'train'

openstef.exceptions module

Openstef custom exceptions.

exception openstef.exceptions.ComponentForecastTooShortHorizonError

Bases: Exception

Component forecasts should be available for at least 30 hours in advance.

exception openstef.exceptions.InputDataInsufficientError

Bases: InputDataInvalidError

Insufficient input data.

exception openstef.exceptions.InputDataInvalidError

Bases: Exception

Invalid input data.

exception openstef.exceptions.InputDataOngoingZeroFlatlinerError

Bases: InputDataInvalidError

All recent load measurements are zero.

exception openstef.exceptions.InputDataWrongColumnOrderError

Bases: InputDataInvalidError

Wrong column order input data.

exception openstef.exceptions.ModelWithoutStDev

Bases: Exception

A machine learning model should have a valid standard deviation.

exception openstef.exceptions.NoPredictedLoadError(pid, message='No predicted load found')

Bases: Exception

No predicted load for given datatime range.

exception openstef.exceptions.NoRealisedLoadError(pid, message='No realised load found')

Bases: Exception

No realised load for given datetime range.

exception openstef.exceptions.OldModelHigherScoreError

Bases: Exception

Old model has a higher score then new model.

exception openstef.exceptions.PredictionJobException(metrics=None)

Bases: Exception

One or more prediction jobs raised an exception.

exception openstef.exceptions.SkipSaveTrainingForecasts

Bases: Exception

If old model is better or too young, you don’t need to save the traing forcast.

openstef.settings module

Module contents