Skip to content
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

Allow specifying metric_definitions on ModelTrainer #5018

Open
straygar opened this issue Feb 6, 2025 · 0 comments
Open

Allow specifying metric_definitions on ModelTrainer #5018

straygar opened this issue Feb 6, 2025 · 0 comments
Labels
component: pysdk-team Related to SageMaker Python SDK Core Issues

Comments

@straygar
Copy link

straygar commented Feb 6, 2025

Describe the feature you'd like
Similar to the Estimator abstraction, I would like to make use of SageMaker's CloudWatch metrics, based on job logs.

How would this feature be used? Please describe.
Not sure. Either an explicit argument in model_trainer or allowing the user to specify a create_job_args dictionary, to work around the abstraction if some API feature is not exposed:

trainer = ModelTrainer(
  ...,
  metric_definitions={
    {"Name": "training_iteration", "Regex": "Iteration (.+), Loss .+,"},
  }
)

(we could also just get rid of Name and Regex and just have a dict[MetricName, Pattern] there)

Describe alternatives you've considered
Using the Estimator class. I recently moved away from it, as the ModelTrainer abstraction makes more sense to me and other scientists/engineers on my team.

Additional context
n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pysdk-team Related to SageMaker Python SDK Core Issues
Projects
None yet
Development

No branches or pull requests

2 participants