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

Use AbnormalExitCodeWarning for nonzero exitcode warnings #378

Merged
merged 4 commits into from
Jan 8, 2019

Conversation

muupan
Copy link
Member

@muupan muupan commented Jan 8, 2019

When subprocesses exit with nonzero exitcode, run_async raise warnings. Some tests check the number of warnings, but they do not work when there is another code that raises warnings, leading to failure in CI of current master.

This PR specifies a warning category for nonzero exitcode, AbnormalExitCodeWarning, and the tests will check warnings of that category.

@toslunar toslunar self-assigned this Jan 8, 2019
Copy link
Member

@toslunar toslunar left a comment

Choose a reason for hiding this comment

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

LGTM except for the name of the custom warning class.

@@ -15,6 +15,11 @@
from chainerrl.misc import random_seed


class AbnormalExitCodeWarning(Warning):
Copy link
Member

Choose a reason for hiding this comment

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

How about AbnormalExitWarning or AbnormalTerminationWarning? A nonzero Process.exitcode represents either an exitcode or a signal.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. I renamed it to AbnormalExitWarning which is shorter.

@toslunar toslunar added this to the v0.6 milestone Jan 8, 2019
@toslunar toslunar merged commit c262ab9 into chainer:master Jan 8, 2019
@muupan muupan modified the milestone: v0.6 Feb 26, 2019
@muupan muupan added the test label Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants