preprocessing.exog_providers.build_providers_from_config(
config,
*,
data_home=None,
provider_window=None,
)
Construct providers by reading the registry flags off a config object.
Parameters
| config |
Union['ConfigEntsoe', 'ConfigMulti', object] |
A config object (e.g. ConfigEntsoe / ConfigMulti) whose attributes include the EXOG_PROVIDER_REGISTRY flag names. |
required |
| data_home |
DataHome |
Root data directory forwarded to each provider. |
None |
| provider_window |
Optional[pd.DatetimeIndex] |
Validation index forwarded to each provider. Overrides the per-provider window; None uses the full request index. |
None |
Examples
from spotforecast2_safe.preprocessing.exog_providers import (
build_providers_from_config,
)
class SimpleConfig:
include_covid_infection_rate = True
include_entsoe_forecast_load = False
include_entsoe_renewable_forecast = False
include_entsoe_net_load = False
include_entsoe_day_ahead_price = False
exog_max_gap_hours = 0
exog_max_tail_gap_hours = 0
providers = build_providers_from_config(SimpleConfig())
print([p.name for p in providers])
assert len(providers) == 1
assert providers[0].name == "covid_infection_rate"