Repository navigation
Return an endpoint from CloudPredictor.deploy() - #290
Merged
Merged
Conversation
CloudPredictor.deploy() now returns a TabularEndpoint / TimeSeriesEndpoint / MultiModalEndpoint, matching FoundationModel.deploy(). The predictor-level endpoint methods (predict_real_time, predict_proba_real_time, attach_endpoint, detach_endpoint, cleanup_deployment) are deprecated with a FutureWarning.
The serve script now raises if a request sets prediction_length, quantile_levels, or target to a value different from the one the predictor was fit with, instead of silently ignoring it. TimeSeriesEndpoint docstrings state the effective defaults for both endpoint types.
The serve scripts always pass as_pandas=True, so forwarding it raised a duplicate-keyword TypeError. Matches the normalization the deprecated predict_real_time did.
|
Job PR-290-3ed9e84 is done. |
|
Job PR-290-e97f91a is done. |
|
Job PR-290-d65b901 is done. |
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
CloudPredictor.deploy()now returns an endpoint handle, just likeFoundationModel.deploy(), so FM and CP use the same real-time workflow:TabularCloudPredictor.deploy()returns aTabularEndpoint,TimeSeriesCloudPredictor.deploy()returns aTimeSeriesEndpoint, andMultiModalCloudPredictor.deploy()returns the newMultiModalEndpoint.Endpointbase class withendpoint_nameanddelete_endpoint().TabularEndpoint:train_dataandlabelare now optional. FM endpoints need both; trained-predictor endpoints take neither. Passing just one of them raises an error.image_column(trained predictors with an image feature) goes through**kwargs, so FM signatures don't change.TimeSeriesEndpoint:prediction_length,target,id_column,timestamp_columnnow default toNoneand are only sent when set. FM behavior doesn't change, because the FM serve script has the same defaults. CP endpoints keep using the fit-timeid_column/timestamp_column(before, the client-side defaults would have overridden them).predict_real_time,predict_proba_real_time,attach_endpoint,detach_endpoint, andcleanup_deploymentstill work, but emit aFutureWarningpointing to the returned endpoint.SagemakerBackend.deploy()no longer asserts that no endpoint is attached, so the same predictor or FM can deploy more than once (for example, afterendpoint.delete_endpoint()).Tests
predict_real_timestill works and warns.TabularEndpointrequestsTimeSeriesEndpointsending only the kwargs that are setNo tests were run locally; CI will validate.