feat(STEF-2702): openstef-meta cleanup & release pipeline fixes#822
Merged
egordm merged 9 commits intorelease/v4.0.0from Mar 5, 2026
Merged
feat(STEF-2702): openstef-meta cleanup & release pipeline fixes#822egordm merged 9 commits intorelease/v4.0.0from
egordm merged 9 commits intorelease/v4.0.0from
Conversation
…nce protocols - SubsetMetric.to_flat_dict() for metrics self-serialization - ModelFitResult.metrics_to_flat_dict() with component_fit_results override - BaseForecastingModel: component_hyperparams, get_explainable_components() - ForecastCombiner extends ExplainableForecaster (gains plot_feature_importances) - EnsembleForecastingModel/EnsembleModelFitResult override all polymorphic methods - MLflow callback: delete 3 protocols, 5 isinstance checks -> polymorphic calls - Fix penalty bug: lower_is_better now multiplies (was dividing)
…ortances - Add normalize_to_unit_sum() pipe-compatible utility in openstef_core.utils.pandas - Replace duplicated normalization logic in 4 forecasters (xgboost, gblinear, lgbm, lgbmlinear) - All now use weights_df.pipe(normalize_to_unit_sum)
Change DnTHH:MM format to DnTHHMM (e.g. D-1T0600 instead of D-1T06:00). Colons are illegal in Windows file paths, breaking benchmark output directories. from_string() now accepts both formats for backward compatibility.
- Replace workflow_factory Callable with workflow_template field - Add with_run_name() method for type-safe deep copy - Add kind discriminator to ForecastingWorkflowConfig (single) and EnsembleForecastingWorkflowConfig (ensemble) - Simplify factory: use kind-based narrowing, raise MissingExtraError - Delete WorkflowCreationContext (no longer needed) - Remove both pyright: ignore[reportArgumentType] suppressions
…stForecaster - test_fit_does_not_mutate_template: verifies template immutability after fit - test_fit_then_predict_returns_forecast: e2e smoke test for fit→predict path
- Add missing [build-system] section to openstef-meta pyproject.toml - Add openstef-meta to poe version task (version bump + root pinning) - Fix baselines extra version range: >=4.0.0.dev0,<5 (was >=0.0.1,<1) - Add openstef-meta to root [all] optional extra - Add openstef-meta to licensecheck ignore_packages
…F-2702-cleanup-iteration-2 # Conflicts: # pyproject.toml # uv.lock
bartpleiter
previously approved these changes
Mar 5, 2026
packages/openstef-beam/tests/unit/benchmarking/baselines/test_openstef4.py
Outdated
Show resolved
Hide resolved
packages/openstef-meta/src/openstef_meta/models/ensemble_forecasting_model.py
Outdated
Show resolved
Hide resolved
packages/openstef-models/src/openstef_models/integrations/mlflow/mlflow_storage_callback.py
Outdated
Show resolved
Hide resolved
packages/openstef-models/src/openstef_models/integrations/mlflow/mlflow_storage_callback.py
Outdated
Show resolved
Hide resolved
packages/openstef-models/src/openstef_models/integrations/mlflow/mlflow_storage_callback.py
Outdated
Show resolved
Hide resolved
packages/openstef-models/src/openstef_models/integrations/mlflow/mlflow_storage_callback.py
Show resolved
Hide resolved
- Add include_atmosphere/price/available_at options to create_synthetic_forecasting_dataset for realistic test data - Simplify test fixture to use the shared utility - Remove verbose parenthetical comments per review feedback
|
bartpleiter
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Cleanup Iteration 2 — STEF-2702
Second round of code quality improvements for the v4.0.0 release.
Changes
1. Polymorphic refactoring
isinstancepatterns from MLflow callbackBaseForecastingModel/EnsembleModelFitResultvia polymorphic methods2. Extract
normalize_to_unit_sum()openstef-core3. AvailableAt Windows-safe fix
AvailableAt.__str__()for Windows path safety4. Make openstef-models/meta optional for beam baselines
DataSaveCallbackwith 5 boolean toggles to extract debug/contributions save logic[baselines]optional extra to openstef-beambaselines/__init__.py; import models at top level inopenstef4.py5. Replace workflow factory with template +
model_copyworkflow_factory: Callablewithworkflow_template: CustomForecastingWorkflowwith_run_name()method for type-safe deep copykinddiscriminator field:Literal["single"]onForecastingWorkflowConfig,Literal["ensemble"]onEnsembleForecastingWorkflowConfigpyright: ignoresuppressionsWorkflowCreationContextclass (no longer needed)6. Smoke tests for template pattern
test_fit_does_not_mutate_template— verifies template immutability after fittest_fit_then_predict_returns_forecast— e2e smoke test for fit→predict path7. Add openstef-meta to release pipeline
[build-system]section to openstef-meta pyproject.tomlpoe versiontask (version bump + root pinning)>=4.0.0.dev0,<5(was>=0.0.1,<1)[all]optional extra andlicensecheckignore list8. Extend test utility + review feedback
include_atmosphere,include_price,include_available_atoptions tocreate_synthetic_forecasting_dataset