Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
+ Coverage 83.63% 90.25% +6.62%
==========================================
Files 12 17 +5
Lines 385 616 +231
==========================================
+ Hits 322 556 +234
+ Misses 63 60 -3 ☔ View full report in Codecov by Sentry. |
LucaMantani
left a comment
There was a problem hiding this comment.
Maybe I am missing something, but I think that it could be done differently so that it applies to both NS and analytic fits. I left a more detailed comment on the ultranest_fit.py file.
|
|
||
| wmin_settings = {} | ||
|
|
||
| # Set the ultranest seed |
There was a problem hiding this comment.
The comment is meaningless, probably result of copy/paste
There was a problem hiding this comment.
I am not a huge fan of this override, also at the moment I think you are losing the writing of the bayes results.
I think a better strategy could be to override write_replicas and have that it does the evolution as well instead of simply writing the export grids. All the missing info (wmin_settings, errortype etc) can be put in the pdf_model instance (and I think they are already there most of them).
One advantage of doing it this way is that it would apply to both analytic and ultranest fit, without touching them.
This pull request includes significant changes to the
wminmodule, focusing on adding new functionality for weight minimization fits, enhancing configuration parsing, and introducing comprehensive tests. The most important changes include the addition of new modules and methods for exporting fit results, updates to configuration parsing, and the introduction of new test cases.New Functionality:
wmin/export_results.pyto include functions for exporting fit results, such aswrite_wmin_combined_replicas,write_new_lhapdf_info_file_from_previous_pdf, andwrite_lhapdf_from_ultranest_result.Configuration Enhancements:
wmin/config.pyto include logging and error handling for configuration parsing, and added new methodsparse_prior_settingsandparse_wmin_settingsfor better handling of prior and wmin settings. [1] [2] [3]Testing:
wmin/tests/test_config.pyto include unit tests for the configuration parsing methods, ensuring robust error handling and correct parsing of settings.wmin/tests/test_export_results.pyto include unit tests for the new export results functions, ensuring they work as expected with mock data.Miscellaneous:
wmin_analytic_dis.yaml,wmin_bayes_dis.yaml,wmin_mc_dis.yaml) to demonstrate the usage of the new weight minimization settings. [1] [2] [3]Minor Changes:
wmin/app.pyto include the newwmin.ultranest_fitmodule.Benchmark of the Inherited (wmin) evolution
Wmin Basis used for the test:
241002_NNDF40_basis_pcaRun a fit using
wmin_bayes_dis.yamlruncard withwmin_inherited_evolutiononce true and once false.The fit with
wmin_inherited_evolution: falseis the evolved withevolve_fithttps://vp.nnpdf.science/zpmJkg-RTVOwFl4EoKM2xw==