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
Better error message when world size and rank are set as strings #8316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not entirely sure whether this is necessary. I personally prefer concise parameters instead of the javascript tradition, the string parameters in XGBoost are more of a legacy from dmlc::Parameter.
I think it's just a little surprising to a user that even though she has specified the world rank and size, and happen to use strings, we complain about them not being set. Maybe we should enforce the rule that they should be integers? That'll give a more meaningful error message. |
@trivialfis please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some changes to use existing functions for checking arguments, could you please take a look?
The call to sleep seems weird?
@@ -40,6 +40,9 @@ class FederatedCommunicatorTest : public ::testing::Test { | |||
} | |||
|
|||
void TearDown() override { | |||
while (!server_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd, could you please share when it helps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was somehow needed to get the create test to work. Seems more trouble than its worth. Removed.
When configuring the federated communicator, only allow world size and rank to be set as integers, and provide a more meaningful error message when they are set as strings.