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

Provide the timeout value in useful places #2436

Merged
merged 2 commits into from Nov 12, 2020

Conversation

EnricoMi
Copy link
Collaborator

@EnricoMi EnricoMi commented Nov 11, 2020

Providing the timeout value in logging and exceptions helps to identify which timeout is actually being used and causes the exception.

Also adds spark_require_list to dev_require_list so that pip install -e .[dev] also installs spark packages.
Further sets h5py<3 in spark_require_list.

Improves resolving issues like #2419.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@EnricoMi
Copy link
Collaborator Author

EnricoMi commented Nov 11, 2020

The failing test_colocator test is handled in #2438 and disabled in #2439.

@github-actions

This comment has been minimized.

- Also adds spark_require_list to dev_require_list so that: pip install -e .[dev]
  also installs spark packages.
- Further sets h5py<3 in spark_require_list.

Signed-off-by: Enrico Minack <github@enrico.minack.dev>
@@ -49,8 +49,9 @@ void HTTPStore::wait(const std::vector<std::string>& keys,
const auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::steady_clock::now() - start);
if (timeout != gloo::kNoTimeout && elapsed > timeout) {
GLOO_THROW_IO_EXCEPTION(GLOO_ERROR_MSG("Wait timeout for key(s): ",
::gloo::MakeString(keys)));
auto timeout_seconds = std::chrono::duration_cast<std::chrono::seconds>(timeout);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice! Can you also add a suggestion here to try increasing HOROVOD_GLOO_TIMEOUT_SECONDS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ideally, that should be in the exception message, but this part of the code does not know (and should not make this assumption) where the timeout value is coming from, it is just an argument to this method. The env var is defined and read in gloo_context.cc.

Ideally, the timeout exception should be caught there and re-thrown with an enhanced message saying where to set the timeout. For that, the exception must be of a very specific type, like gloo timeout exception for that to work.

My hope is seeing the timeout at all in the logs helps to realize that whatever timeout knob you used is the wrong one. Not ideal but better than nothing.

Any better idea?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We could move the reading of HOROVOD_GLOO_TIMEOUT_SECONDS into this class. It's never set to anything else in practice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no gloo:TimeoutException, that would have been too good... Then I would rather add the env var to the error message, though it is bad practise, but moving the env var in this code would be worse I think.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think having the env variable in the error is very useful. Otherwise users will not know how to resolve the issue, and will ask questions on GitHub that could be answered by the error message (this has happened a few times). I agree it's making an assumption that isn't guaranteed by the interface, but I think it's worth it. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the information is more useful for users than clean code separation for developers in this case, I will go for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to move the constants into gloo_context.h: 6cd9213

@github-actions

This comment has been minimized.

Signed-off-by: Enrico Minack <github@enrico.minack.dev>
@github-actions

This comment has been minimized.

Copy link
Collaborator

@tgaddair tgaddair left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for putting this together.

@tgaddair tgaddair merged commit 5ee1d45 into horovod:master Nov 12, 2020
@EnricoMi EnricoMi deleted the branch-verbose-timeout branch November 12, 2020 18:10
@github-actions

This comment has been minimized.

@github-actions
Copy link

Unit Test Results

     522 files   -   13     522 suites   - 13   4h 27m 12s ⏱️ - 3m 0s
     521 tests ±    0     494 ✔️ ±    0       26 💤 ±  0  1 ❌ ±0 
10 128 runs   - 190  8 120 ✔️  - 161  2 007 💤  - 28  1 ❌  - 1 

For more details on these failures, see this check.

Results for commit 6cd9213. ± Comparison against base commit 108d3a6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants