-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[fed] Provide the initial federated plugin interface. #10540
[fed] Provide the initial federated plugin interface. #10540
Conversation
cc @rongou . |
grad_.resize(data.size_bytes()); | ||
auto casted = | ||
common::Span{reinterpret_cast<std::uint8_t const *>(data.data()), data.size_bytes()}; | ||
std::copy_n(casted.data(), casted.size(), grad_.data()); |
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.
Do we still plan to use the mock plugin for unencrypted federated learning? I wonder if we can somehow avoid these types of copying.
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 at the moment, it's only used for running tests. Any suggestions? I don't want this mock myself, but haven't found a way to run test without one.
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.
Probably we can write the histogram build in a way that can reuse the existing histogram implementation. Will look into it tomorrow.
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.
Hmm, then the tests wouldn't be reliable. Also, the plugin itself cannot communicate, so we can't hand the entire histogram build to the plugin.
Any suggestion for design would be great.
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.
For testing it's probably fine.
grad_.resize(data.size_bytes()); | ||
auto casted = | ||
common::Span{reinterpret_cast<std::uint8_t const *>(data.data()), data.size_bytes()}; | ||
std::copy_n(casted.data(), casted.size(), grad_.data()); |
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.
For testing it's probably fine.
Extracted from #10534 . See the #10410 for existing limitations. The most outstanding issue of the interface is the lack of support for multi-class. To enable this, we need to further refactor the tree methods, which is out of scope for the initial implementation. Most of the tests are in the main PR.
We will be targeting the feature branch for now. The merge into the master branch will start once the feature branch is complete.