Skip to content

Enable known_covariates in TimeSeriesCloudPredictor.predict_real_time #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

shchur
Copy link
Contributor

@shchur shchur commented Apr 28, 2025

Issue #, if available: Fixes #116, #70

Description of changes:

  • Forward the known_covariates kwarg to TimeSeriesCloudPredictor.predict_real_time via the inference_kwargs to the TimeSeriesSagemakerBackend.predict_real_time method.
  • Add a comment explaining that currently known_covariates cannot be used during batch prediction (only real-time inference supported)
  • Updated stale pointers to the AutoGluon documentation.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@shchur shchur requested a review from suzhoum April 28, 2025 12:18
@@ -198,6 +204,7 @@ def predict_real_time(
target=self.target_column,
static_features=static_features,
accept=accept,
inference_kwargs=dict(known_covariates=known_covariates, **kwargs),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I validated that this works locally but couldn't update the unit tests because currently known_covariates can only work with real-time prediction (and not batch prediction). One possible solution would be to train two predictors: one that expects known_covariates and one that doesn't, but I think that would be too much of an overhead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to revisit this PR #113 for batch prediction support.

Copy link
Contributor

@suzhoum suzhoum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -198,6 +204,7 @@ def predict_real_time(
target=self.target_column,
static_features=static_features,
accept=accept,
inference_kwargs=dict(known_covariates=known_covariates, **kwargs),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to revisit this PR #113 for batch prediction support.

@shchur shchur merged commit 47be7d9 into master Apr 28, 2025
33 of 35 checks passed
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.

Allow passing future values of known_covariates to TimeSeriesCloudPredictor.predict
2 participants