-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feature: emit estimator transformer tags to model #815
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
Changes from 3 commits
87904c4
8feff4a
e3cfb25
ec3fa49
95674c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -620,7 +620,8 @@ def create_model(self, name, role, container_defs, vpc_config=None, | |
return name | ||
|
||
def create_model_from_job(self, training_job_name, name=None, role=None, primary_container_image=None, | ||
model_data_url=None, env=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT): | ||
model_data_url=None, env=None, vpc_config_override=vpc_utils.VPC_CONFIG_DEFAULT, | ||
tags=None): | ||
"""Create an Amazon SageMaker ``Model`` from a SageMaker Training Job. | ||
|
||
Args: | ||
|
@@ -638,6 +639,8 @@ def create_model_from_job(self, training_job_name, name=None, role=None, primary | |
Default: use VpcConfig from training job. | ||
* 'Subnets' (list[str]): List of subnet ids. | ||
* 'SecurityGroupIds' (list[str]): List of security group ids. | ||
tags(List[dict[str, str]]): Optional. The list of tags to add to the model. For more, see | ||
https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add that this defaults to the job's tags. (might also need to be updated in other docstrings.) alternatively, you could default to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the second option 👌🏽 |
||
|
||
Returns: | ||
str: The name of the created ``Model``. | ||
|
@@ -651,7 +654,7 @@ def create_model_from_job(self, training_job_name, name=None, role=None, primary | |
model_data_url=model_data_url or training_job['ModelArtifacts']['S3ModelArtifacts'], | ||
env=env) | ||
vpc_config = _vpc_config_from_training_job(training_job, vpc_config_override) | ||
return self.create_model(name, role, primary_container, vpc_config=vpc_config) | ||
return self.create_model(name, role, primary_container, vpc_config=vpc_config, tags=tags) | ||
|
||
def create_model_package_from_algorithm(self, name, description, algorithm_arn, model_data): | ||
"""Create a SageMaker Model Package from the results of training with an Algorithm Package | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about defaulting to
self.tags
iftags
isNone
? I think bothtransformer()
implementations should have the same behavior around which tags are propagated.