-
Notifications
You must be signed in to change notification settings - Fork 272
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
Fix Container.as_dict for case of flatten=True and add_prefix=True #1887
Conversation
This change has the main goal of having `ImageParametersContainer.as_dict(recursive=True, flatten=True, add_prefix=True)` produce a dict with the same keys as the column names in the dl1 parameters table in the hdf5 file.
Codecov Report
@@ Coverage Diff @@
## master #1887 +/- ##
=======================================
Coverage 92.05% 92.05%
=======================================
Files 189 189
Lines 14862 14868 +6
=======================================
+ Hits 13681 13687 +6
Misses 1181 1181
Continue to review full report at Codecov.
|
Does this work with multiple algorithms predicting the same quantity (dl2, ml)? |
|
We should revisit this after #1949 is merged, changing to draft for now |
The use-case for this change is still valid: testing with current master and this branch yields the same results as in the PR description. Therefore, I would suggest merging this, as there are no conflicts and already approved. Additionally, this fixes a failing test I have on the |
…1887) * Fix Container.as_dict for case of flatten=True and add_prefix=True This change has the main goal of having `ImageParametersContainer.as_dict(recursive=True, flatten=True, add_prefix=True)` produce a dict with the same keys as the column names in the dl1 parameters table in the hdf5 file. * Simplify flatten code
This change has the main goal of having
ImageParametersContainer.as_dict(recursive=True, flatten=True, add_prefix=True)
produce a dict with the same keys as the column namesin the dl1 parameters table in the hdf5 file.
Before:
After: