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

Make job fail when partial tasks' pre-dependent tasks finished and exceeds the waiting timeout #621

Merged
merged 4 commits into from
Nov 30, 2021

Conversation

zuston
Copy link
Member

@zuston zuston commented Nov 25, 2021

This PR is to solve the problems of tf workers hang when chief has been finished and other bugs.

For example, tensorflow estimator training job will include some roles of ps/worker/evaluator/chief. Actually, due to the bug of tensorflow or misusing the estimator api, sometimes evaluator will hang. So if we use the configuration as follows, when evaluator is still running after timeout and chief and workers are all finished, the mechanism of dependency group timeout will make job failed.

Conf as follows, the evaluator will be alive 3600(sec) after workers and chief are all finished.

tony.application.group.A = worker,chief
tony.application.dependency.evaluator.timeout.after.A = 3600

So, this PR introduce the conf of tony.application.group.{GROUP_NAME}={JOB_TYPES} and tony.application.dependency.{JOB_TYPE}.timeout.after.{GROUP_NAME} = 3600

Besides, due to tensorflow bug, sometimes the workers will hang after the chief finished. We could use above conf to solve it. The worker will be alive 3600(sec) after chief finished.

tony.application.group.A = chief
tony.application.dependency.worker.timeout.after.A = 3600

@zuston
Copy link
Member Author

zuston commented Nov 25, 2021

Refer to #610

@oliverhu
Copy link
Member

@zuston thanks.. can you update READ.me as well? also provide some examples and context in description?

…ceeds the waiting timeout

Signed-off-by: zhangjunfan <junfan.zhang@outlook.com>
Signed-off-by: zhangjunfan <junfan.zhang@outlook.com>
Signed-off-by: zhangjunfan <junfan.zhang@outlook.com>
@zuston
Copy link
Member Author

zuston commented Nov 28, 2021

@oliverhu Updated.

Copy link
Member

@oliverhu oliverhu left a comment

Choose a reason for hiding this comment

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

pls also update configurations in the wiki

* tony.application.group.a = worker,chief
* tony.application.group.b = evaluator
*
* tony.application.dependency.b.timeout.after.a = 3600
Copy link
Member

Choose a reason for hiding this comment

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

does b have to be a group? I think worker.timeout.after.a also works from conversations. Can you clarify here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Mistake for code comment, i will fix it.
And tony.application.dependency.evaluator.timeout.after.a is best practise.

Comment on lines +345 to +347
public static final String GROUP_REGEX = TONY_APPLICATION_PREFIX + "group\\.([A-Za-z]+)$";
public static final String GROUP_DEPEND_TIMEOUT_REGEX =
TONY_APPLICATION_PREFIX + "dependency\\.([A-Za-z]+)\\.timeout\\.after\\.([A-Za-z]+)$";
Copy link
Member

Choose a reason for hiding this comment

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

also add some unit tests for these regex..

Copy link
Member Author

Choose a reason for hiding this comment

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

Got it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It has been tested in Utils.getAllGroupJobTypes and Utils.getJobTypeDependentGrps

@zuston
Copy link
Member Author

zuston commented Nov 30, 2021

Updating configurations in wiki will be done after this PR merged @oliverhu

@zuston zuston merged commit 1b7cc36 into tony-framework:master Nov 30, 2021
@zuston zuston mentioned this pull request Dec 15, 2021
zuston added a commit to zuston/TonY that referenced this pull request Feb 9, 2022
…hed and exceeds the waiting timeout (tony-framework#621)

PR: tony-framework#621

* Make job fail when partial tasks' pre-dependent tasks finished and exceeds the waiting timeout
* Modify the config
* Fix compile error
* Correct the code comment

Signed-off-by: zhangjunfan <junfan.zhang@outlook.com>
zuston pushed a commit to zuston/TonY that referenced this pull request Feb 9, 2022
Backport: Make job fail when partial tasks' pre-dependent tasks finished and exceeds the waiting timeout (tony-framework#621)

See merge request !72
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.

None yet

2 participants