Skip to content

feat: Add experiment_config and tags arguments to TrainingStep and ProcessingStep classes #2017

Closed

Description

@brightsparc

Describe the feature you'd like
Extend the constructors for the TrainingStep and ProcessingStep classes to include an optional experiment_config dictionary which is passed down when creating the job args.

eg: https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/workflow/steps.py#L136

How would this feature be used? Please describe.
This feature would allow the caller to pass down an experiment and trial name to a step that is part of a pipeline.

from sagemaker.inputs import TrainingInput
from sagemaker.workflow.steps import TrainingStep

step_train = TrainingStep(
    name="AbaloneTrain",
    estimator=xgb_train,
    inputs={
        "train": TrainingInput(
            s3_data=step_process.properties.ProcessingOutputConfig.Outputs[
                "train"
            ].S3Output.S3Uri,
            content_type="text/csv"
        ),
        "validation": TrainingInput(
            s3_data=step_process.properties.ProcessingOutputConfig.Outputs[
                "validation"
            ].S3Output.S3Uri,
            content_type="text/csv"
        )
    },
    experiment_config={
        'ExperimentName': 'my-project', 
        'TrialName': 'my-commit-hash',
        'TrialComponentDisplayName': "Training",
    },
)

Describe alternatives you've considered
An alternative would be to attach these trial components and tags after the fact, but this would require an additional call.

Additional context
This would provide feature parity with AWS DataScience Step functions SDK.
https://aws-step-functions-data-science-sdk.readthedocs.io/en/stable/sagemaker.html

Activity

  1. changed the title [-]Add `experiment_config` and `tags` argument to `TrainingStep` and `ProcessingStep` classes[/-] [+]Add experiment_config and tags arguments to `TrainingStep` and `ProcessingStep` classes[/+] on Dec 8, 2020
  2. changed the title [-]Add experiment_config and tags arguments to `TrainingStep` and `ProcessingStep` classes[/-] [+]Add experiment_config and tags arguments to TrainingStep and ProcessingStep classes[/+] on Dec 8, 2020
  3. changed the title [-]Add experiment_config and tags arguments to TrainingStep and ProcessingStep classes[/-] [+]feat: Add experiment_config and tags arguments to TrainingStep and ProcessingStep classes[/+] on Dec 8, 2020
  4. ajaykarpur commented on Dec 8, 2020

    @ajaykarpur
    Contributor

    Hi @brightsparc, thank you for the suggestion!

  5. brightsparc commented on Jan 11, 2021

    @brightsparc
    Author

    @ajaykarpur This PR #2082 has passed tests and ready for review/merge.

  6. added
    component: experiments
    on Apr 1, 2021
  7. liujiaorr commented on Mar 26, 2024

    @liujiaorr
    Contributor

    Can I get an update if this request still needed?

  8. mollyheamazon commented on Feb 4, 2025

    @mollyheamazon
    Contributor

    Closing this issue since the feature request is fulfilled.

  9. added a commit that references this issue on Jun 3, 2026
  10. added a commit that references this issue on Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component: experimentscontributions welcometype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions