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

Better error message when world size and rank are set as strings #8316

Merged
merged 7 commits into from Oct 12, 2022

Conversation

rongou
Copy link
Contributor

@rongou rongou commented Oct 6, 2022

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.

@rongou
Copy link
Contributor Author

rongou commented Oct 6, 2022

@trivialfis @hcho3

Copy link
Member

@trivialfis trivialfis left a 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.

@rongou
Copy link
Contributor Author

rongou commented Oct 10, 2022

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.

@rongou rongou changed the title Allow world size and rank to be specified as strings Better error message when world size and rank are set as strings Oct 10, 2022
@rongou
Copy link
Contributor Author

rongou commented Oct 10, 2022

@trivialfis please take another look.

Copy link
Member

@trivialfis trivialfis left a 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_) {
Copy link
Member

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?

Copy link
Contributor Author

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.

@trivialfis trivialfis added this to In progress in 1.7 Roadmap via automation Oct 12, 2022
@trivialfis trivialfis moved this from In progress to Reviewer approved in 1.7 Roadmap Oct 12, 2022
@trivialfis trivialfis merged commit 39afdac into dmlc:master Oct 12, 2022
1.7 Roadmap automation moved this from Reviewer approved to Done Oct 12, 2022
@rongou rongou deleted the federated-world-size-rank branch November 18, 2022 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants