Skip to content

Wrap training timeout for integ tests #339

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 5 commits into from
Aug 14, 2018
Merged

Wrap training timeout for integ tests #339

merged 5 commits into from
Aug 14, 2018

Conversation

yangaws
Copy link
Contributor

@yangaws yangaws commented Aug 7, 2018

Issue #, if available:

Description of changes:

Some training takes about 16-18 minutes and the tests failed several times a week. So I want to increase the timeout to 20 minutes. But for special tests like async or local mode, I did not change the timeout since it worked fine so far.

And to make it easier for future change, I create timeout wrappers for training and tuning.

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.

@yangaws yangaws requested a review from icywang86rui August 7, 2018 23:26
@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #339 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #339   +/-   ##
=======================================
  Coverage   92.93%   92.93%           
=======================================
  Files          51       51           
  Lines        3552     3552           
=======================================
  Hits         3301     3301           
  Misses        251      251

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 fa88325...b08eff5. Read the comment docs.

@@ -59,6 +59,18 @@ def handler(signum, frame):
signal.alarm(0)


@contextmanager
def timeout_training(seconds=0, minutes=20, hours=0):
Copy link
Contributor

Choose a reason for hiding this comment

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

If the purpose of these two wrappers is to set a default timeout period I would just do something like this:

TRAINING_JOB_DEFAULT_TIMEOUT_MINUTES = 20

with timeout(minutes=TRAINING_JOB_DEFAULT_TIMEOUT_MINUTES)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated! Thanks!

@yangaws yangaws merged commit e3dc3b5 into aws:master Aug 14, 2018
@yangaws yangaws deleted the tto branch August 14, 2018 01:24
pdasamzn pushed a commit to pdasamzn/sagemaker-python-sdk that referenced this pull request Nov 1, 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.

3 participants