Add new daemons and debug scripts for Sigenergy and Oracle functionalities

- Implement `sigen_daemon.py` to poll Sigenergy plant metrics and store snapshots.
- Create `web_daemon.py` for serving a web interface with various endpoints.
- Add debug scripts:
  - `debug_duplicates.py` to find duplicate target times in forecast data.
  - `debug_energy_forecast.py` to print baseline energy forecast curves.
  - `debug_oracle_evaluations.py` to run the oracle evaluator.
  - `debug_sigen.py` to inspect stored Sigenergy plant snapshots.
  - `debug_weather.py` to trace resolved truth data.
  - `modbus_test.py` for exploring Sigenergy plants or inverters over Modbus TCP.
- Introduce `oracle_evaluator.py` for evaluating stored oracle predictions against actuals.
- Add TCN training scripts in `tcn` directory for training usage sequence models.
This commit is contained in:
rpotter6298
2026-04-28 08:14:00 +02:00
parent ff0c65a794
commit c8e3016fd6
55 changed files with 6385 additions and 633 deletions
@@ -0,0 +1,35 @@
from __future__ import annotations
from dataclasses import dataclass
from gibil.classes.predictors.usage_sequence_dataset import (
UsageSequenceDatasetBuilder,
UsageSequenceScaleConfig,
)
@dataclass(frozen=True)
class UsageHybridModelShape:
"""Describes the fixed-plus-token sequence model input contract."""
past_scales: tuple[UsageSequenceScaleConfig, ...]
past_fixed_features: tuple[str, ...]
future_fixed_features: tuple[str, ...]
future_steps: int
quantiles: tuple[float, ...] = (0.10, 0.50, 0.90)
@classmethod
def from_dataset_builder(
cls,
builder: UsageSequenceDatasetBuilder,
) -> "UsageHybridModelShape":
return cls(
past_scales=builder.config.past_scales,
past_fixed_features=tuple(builder.past_feature_names),
future_fixed_features=tuple(builder.future_feature_names),
future_steps=builder.future_steps,
)
@property
def output_width(self) -> int:
return self.future_steps * len(self.quantiles)