Add preprocessing, fit, and prediction reports - #719
Open
janrth wants to merge 4 commits into
Open
Conversation
janrth
marked this pull request as ready for review
August 19, 2026 08:12
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1898b42f37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Summary
Adds lightweight, inspectable reports to show what happens at MLForecast's preprocessing and model-execution boundaries.
feature_preparation_report_records input/output backend, shape, dtypes, memory, row drops, MLForecast-owned conversions, and preprocessing duration.model_fit_report_records estimator fit-call count and elapsed time per configured model, including direct-model horizon fits.fit_report_records end-to-endMLForecast.fit()elapsed time and process RSS change, with the nested model-fit report.predict_report_records end-to-endMLForecast.predict()elapsed time, process RSS change, and requested horizon.The reports are created after successful operations and provide both dataclass attributes and
to_dict()for logging/benchmarking.Scope and interpretation
RSS measurements use
psutilwhen available. They measure process-level resident-memory change at the operation boundary, so they are useful for comparing configurations such as pandas vs. Polars oras_numpy=Truevs.False. They do not attribute memory to a specific native LightGBM/XGBoost/CatBoost allocation, nor do they represent temporary peak memory that was released before the measurement ended.Estimator timing is measured around the actual cloned estimator
.fit()call. It therefore captures model-side work and MLForecast conversions that happen immediately at that boundary, whilefit_report_retains the complete MLForecast fit duration.