Skip to content

[ENH] Add exog_handle support to fit_predict for multivariate forecasting#436

Closed
SHIVANSH-ux-ys wants to merge 1 commit into
sktime:mainfrom
SHIVANSH-ux-ys:feat-exog-variables
Closed

[ENH] Add exog_handle support to fit_predict for multivariate forecasting#436
SHIVANSH-ux-ys wants to merge 1 commit into
sktime:mainfrom
SHIVANSH-ux-ys:feat-exog-variables

Conversation

@SHIVANSH-ux-ys
Copy link
Copy Markdown

Reference Issues/PRs

Fixes #336

What does this implement/fix? Explain your changes.

The fit_predict tool previously accepted only a single data_handle for the target series y. This made multivariate forecasting (where exogenous covariates like promotions or holidays are needed) impossible without manually merging datasets into a single handle.

This PR adds an optional exog_handle parameter to fit_predict and fit_predict_async (both the tool wrappers and the core executor). When provided, the covariates are resolved from _data_handles and passed as X to both estimator.fit() and estimator.predict().

Changes:

  • executor.py: fit_predict and fit_predict_async now accept exog_handle and resolve it to X before fitting.
  • tools/fit_predict.py: Updated fit_predict_tool and fit_predict_async_tool signatures and docstrings.
  • server.py: Updated the JSON schema for both fit_predict and fit_predict_async tools to expose exog_handle to LLM agents.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

The exog_handle resolution logic in executor.py and whether the fallback (X = exog_info.get("y") when no explicit X column is set) is the correct behavior.

PR checklist

  • I have read the CONTRIBUTING guide.
  • I have checked that my PR does not duplicate an existing PR.
  • I have checked that there is an existing issue for this PR, if applicable.
  • My code follows the project's coding standards.

@SHIVANSH-ux-ys
Copy link
Copy Markdown
Author

Closing this — I just noticed Omc12 had already committed a fix for this issue 3 days ago via PR #338. Apologies for the overlap, I should have checked the issue timeline more carefully before submitting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH] Support for exogenous variables (X) in high-level fit_predict tool

1 participant