Skip to content

Support to override model_data when calling Estimator.create_model #2988

@jonsnowseven

Description

@jonsnowseven

Describe the feature you'd like
Support to override a model data S3 URI when creating a model:

return Model(
image_uri or self.training_image_uri(),
self.model_data,

How would this feature be used? Please describe.
It is useful to call create_model from an estimator, when we are using a tuner job, specially for SageMaker Pipelines.

...
estimator = ...
tuner = ...
step_tuning = ...

model = estimator.create_model(
    model_data=step_tuning.get_top_model_s3_uri(
            top_k=0,
            s3_bucket=default_bucket,
            prefix=prefix,
    ),
    ...
)

instead of

...
estimator = ...
tuner = ...
step_tuning = ...

model_class = <specific estimator model class (e.g., TensorFlowModel)>

model = model_class(
    model_data=step_tuning.get_top_model_s3_uri(
            top_k=0,
            s3_bucket=default_bucket,
            prefix=prefix,
    ),
    ...
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions