Skip to content

Make the metric_names list optional in TrainingJobAnalytics object. #274

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

Merged
merged 3 commits into from
Jul 5, 2018

Conversation

leopd
Copy link
Contributor

@leopd leopd commented Jul 2, 2018

Issue #273

Description of changes: When TrainingJobAnalytics object, the metric_names list is now optional. If not specified, it will use all configured metrics. To discover them, it looks for a hyperparameter tuning job associated with the training job, and finds the metric definitions there.

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.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

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

@leopd leopd requested review from laurenyu and nadiaya July 2, 2018 22:46
Copy link
Contributor

@laurenyu laurenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. just a couple small suggestions.

if metric_names:
self._metric_names = metric_names
else:
self._metric_names = self._metric_names_for_training_job()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be done in one line:

self._metric_names = metric_names or self._metric_names_for_training_job()

tuning_job_arn = training_description.get('TuningJobArn', None)
if not tuning_job_arn:
raise ValueError(
"No metrics available. Training Job Analytics only available through Hyperparameter Tuning Jobs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single quotes

@codecov-io
Copy link

codecov-io commented Jul 2, 2018

Codecov Report

Merging #274 into master will increase coverage by 0.07%.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #274      +/-   ##
=========================================
+ Coverage   92.43%   92.5%   +0.07%     
=========================================
  Files          49      49              
  Lines        3279    3297      +18     
=========================================
+ Hits         3031    3050      +19     
+ Misses        248     247       -1
Impacted Files Coverage Δ
src/sagemaker/estimator.py 87.39% <100%> (+1.3%) ⬆️
src/sagemaker/utils.py 89.79% <80%> (-1.12%) ⬇️
src/sagemaker/analytics.py 91.94% <93.75%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1824610...2d97389. Read the comment docs.

@nadiaya nadiaya changed the title Issue 273 Make the metric_names list optional in TrainingJobAnalytics object. Jul 5, 2018
@nadiaya nadiaya merged commit 68dea63 into aws:master Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants