Skip to content

adding tags to a Sagemaker estimator in the training step does not seem to be supported #200

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

Open
evaie opened this issue Dec 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@evaie
Copy link

evaie commented Dec 8, 2023

Extract from the workbook "machine_learning_workflow_abalone.ipynb"
When adding tags in the following estimator :

mes_tags = [{'key': 'cart', 'value': 'dataengineering'}]

xgb = sagemaker.estimator.Estimator(
image_uris.retrieve("xgboost", region, "1.2-1"),
sagemaker_execution_role,
train_instance_count=1,
train_instance_type="ml.m4.4xlarge",
train_volume_size=5,
output_path=bucket_path + "/" + prefix + "/single-xgboost",
base_job_name=base_job_name,
tags=mes_tags,
sagemaker_session=session,
)
No error when creating the sagemaker.estimator object

The workflow creation fails
When running the command (later in the notebook):
workflow.create()
I got the exception :
"InvalidDefinition: An error occurred (InvalidDefinition) when calling the CreateStateMachine operation: Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: The field "key" is not supported by Step Functions at /States/Train Step/Parameters"

Which is clearly related to the tags I previously added.
Apparently, adding tags to a Sagemaker estimator in the training step does not seem to be supported by the current version of the SDK.

To reproduce
You can comment "tags=mes_tags" and re-rerun the notebook and the state machine is created without any errors.

Logs
Only the stack trace in the notebook

@evaie evaie added the bug Something isn't working label Dec 8, 2023
@evaie evaie changed the title short issue descriptiadding tags to a Sagemaker estimator in the training step does not seem to be supported adding tags to a Sagemaker estimator in the training step does not seem to be supported Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant