BenchmarkTarget#
- class openstef_beam.benchmarking.models.benchmark_target.BenchmarkTarget(**data: Any) None[source]
Bases:
BaseConfigBase class for benchmark targets with common properties.
Defines the core properties that all benchmark targets must have, ensuring a consistent interface across different benchmark implementations.
- Raises:
ValueError – When benchmark_end <= benchmark_start, train_start >= benchmark_start, or when limit constraints are not met (either ‘limit’ alone or both ‘upper_limit’ and ‘lower_limit’ must be specified).
- Parameters:
data (
Any)
-
name:
str
-
description:
str
-
group_name:
str
-
latitude:
Latitude
-
longitude:
Longitude
-
benchmark_start:
datetime
-
benchmark_end:
datetime
-
train_start:
datetime
- validate_limits() BenchmarkTarget[source]
Validate that either limit or both upper_limit and lower_limit are provided.
- Return type:
- Returns:
The validated BenchmarkTarget instance.
- Raises:
ValueError – If neither limit nor (upper_limit and lower_limit) are provided, or if both limit and (upper_limit or lower_limit) are provided.
- classmethod validate_benchmark_end(v: datetime, info: ValidationInfo) datetime[source]
Validate that benchmark_end occurs after benchmark_start.
- Parameters:
v (
datetime) – The benchmark_end value to validate.info (
ValidationInfo) – Validation context containing other field values.v
info
- Returns:
The validated benchmark_end datetime.
- Raises:
ValueError – If benchmark_end is not after benchmark_start.
- Return type:
- classmethod validate_train_start(v: datetime, info: ValidationInfo) datetime[source]
Validate that train_start occurs before benchmark_start.
- Parameters:
v (
datetime) – The train_start value to validate.info (
ValidationInfo) – Validation context containing other field values.v
info
- Returns:
The validated train_start datetime.
- Raises:
ValueError – If train_start is not before benchmark_start.
- Return type:
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': False, 'extra': 'ignore', 'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].