-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[RDF] Add option to change default basket size in RDataFrame Snapshot #17579
base: master
Are you sure you want to change the base?
Conversation
…e ActionHelpers.hxx file for custom basket size knob
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.
Thank you so much @Aditya-138-12 for this contribution! I feel like we're already going in the right direction. I have a few introductory inline comments. Together with those, I would highly apppreciate if you could add a test for the new feature, checking that the output TTree after a Snapshot has the requested basket size. You can take inspiration from some of the tests already written in e.g. dataframe_snapshot.cxx
.
…f int, 2. Passing only basketSize in the SetBranchesHelper function instead of Complete options object, 3. Added some more inline comments.
…d::optional<int> fBasketSize{}
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.
Thanks for the prompt interaction! We are still missing:
- Adapting the other overload of
SetBranchesHelper
- Some tests
Thank you so much for your guidance! I really appreciate your time and feedback. I’m currently working on the tests, but I wanted to make sure I fully understand your point about 'adapting the other overload of SetBranchesHelper.' Could you kindly clarify what exactly needs to be adapted? I’d be grateful for any additional details! |
There is another function template of |
@@ -45,6 +47,7 @@ struct RSnapshotOptions { | |||
bool fLazy = false; ///< Do not start the event loop when Snapshot is called | |||
bool fOverwriteIfExists = false; ///< If fMode is "UPDATE", overwrite object in output file if it already exists | |||
bool fVector2RVec = true; ///< If set to true will convert std::vector columns to RVec when saving to disk | |||
std::optional<int> fBasketSize {}; /// Set a custom basket size option. For more details, see https://root.cern/manual/trees/#baskets-clusters-and-the-tree-header |
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.
std::optional<int> fBasketSize {}; /// Set a custom basket size option. For more details, see https://root.cern/manual/trees/#baskets-clusters-and-the-tree-header | |
std::optional<int> fBasketSize {}; ///< Set a custom basket size option. For more details, see https://root.cern/manual/trees/#baskets-clusters-and-the-tree-header |
This Pull request:
Introduces a new option in RSnapshotOptions.hxx to allow users to configure the default basket size of new branches when using RDataFrame::Snapshot. Modify SetBranchesHelper in ActionHelpers.hxx to honor this option.
Changes or fixes:
:)
Checklist:
This PR fixes #17418