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

Add fault tolerance support for trial failure #424

Merged
merged 7 commits into from
Mar 14, 2019

Conversation

jinan-zhou
Copy link
Contributor

@jinan-zhou jinan-zhou commented Mar 8, 2019

In practice, even the training container is correctly implemented, trials may fail due to a variety of reasons such as insufficient GPU memories. If trials fail, GetEvaluationResult() will return None. The suggestion should be able to handle that exception. My solution is:

  • If not all the trials failed, use the metrics of the successful ones to do the update
  • If all the trials failed:
    1. Firstly, try to respawn the previous trials after sleeping for RESPAWN_SLEEP seconds.
    2. If respawning the trials for RESPAWN_LIMIT times still cannot collect valid results, then fail the task because it may indicate that the training container has errors.

Besides, this PR also fixes some small bugs and adds some important TODOs.

An example of fault handling output

---------------------------------------------------------------------------
Suggestion Step 1 for StudyJob nas-example-1 (ID: e9850c4a885acb19)
---------------------------------------------------------------------------
>>> 2 Trials succeeded, 1 Trials failed:
p55d6ef3720fec95: Failed
n8f94938e123b38d: 0.6475
g30851e3c259d07a: 0.6709
The average is 0.6592

>>> Suggestion updated. LSTM Controller Reward: 44.43968200683594

This change is Reviewable

@jinan-zhou
Copy link
Contributor Author

/assign @hougangliu

@andreyvelich
Copy link
Member

@hougangliu @YujiOshima @johnugeorge
Do we have any way to make StudyJob Failed from Suggestion ?

@andreyvelich
Copy link
Member

/lgtm

@jinan-zhou
Copy link
Contributor Author

@hougangliu This PR is well tested and ready to merge. Please take a look.

@hougangliu
Copy link
Member

/lgtm

@jinan-zhou
Copy link
Contributor Author

Could you approve it so that I can go on @hougangliu

@hougangliu
Copy link
Member

/approve
thanks!

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hougangliu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 06f955b into kubeflow:master Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants