aws / sagemaker-experiments

Experiment tracking and metric logging for Amazon SageMaker notebooks and model training.
Apache License 2.0
125 stars 36 forks source link

Parameterize trial_component_name in Tracker.py Create Function #164

Closed alex6499cat closed 1 year ago

alex6499cat commented 2 years ago

Issue #, if available: No Issue Created

Description of changes:

Updated the create function in the Tracker.py file. Previously, this function hardcoded the trial_component_name as "TrialComponent". This can cause issues for users calling this function that have IAM policies in place that require them give specific names to experiment-trial-component resources. I parameterized trial_component_name as a function parameter and gave it a default of "TrialComponent". This way, the change should not be breaking to anyone.

The unit test test_log_pr_curve in test_tracker.py was failing on Python 3.8 but not other versions of Python. This was because sklearn automatically upgraded to 1.1.1 in python 3.8. I fixed this by forcing all unit tests to use sklearn==0.24.2 because that's the latest version that supports python 36, 37, and 38. I updated tox.ini to do this.

Testing done:

I added an additional assertion on test_create in test_tracker.py to validate the new trial_component_name parameter on Tracker.create.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

alex6499cat commented 1 year ago

@danabens Hello Dana! Sorry to bug you, but I see that you're the top contributor to this project. Will you or someone else at Amazon be able to review my pull request this week or early next week?

Thanks!

Alex Ginglen