Skip to content

Added make_replicas from Validphys - #429

Merged
ecole41 merged 17 commits into
mainfrom
nnpdf_replicas
Mar 30, 2026
Merged

Added make_replicas from Validphys#429
ecole41 merged 17 commits into
mainfrom
nnpdf_replicas

Conversation

@ecole41

@ecole41 ecole41 commented Feb 18, 2026

Copy link
Copy Markdown
Collaborator

This branch alters the mc_pseudodata function so that it uses the validphys function make_replicas to produce pseudodata. This is compatible with the make_replicas_colibri branch of NNPDF. A mcseed will need to be defined in the runcard.

Testing is still needed before merging.

@ecole41
ecole41 changed the base branch from main to glorot_norm February 18, 2026 14:57
Comment thread colibri/mc_utils.py Outdated

@comane comane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ella, the PR looks good.
Apart from the two minor comments I left, I think that it would be good if you could add a couple of lines of tests (to the already existing tests) so as to cover the extra lines that you added.

Comment thread colibri/mc_utils.py Outdated
Comment on lines 43 to 44
central_values = [pseudodata_central_covmat_index.central_values]
covmat = pseudodata_central_covmat_index.covmat

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment that explains why they need to be a list?

Comment thread colibri/mc_utils.py
Comment on lines +46 to 47
seed = replica_mcseed(replica_index, mcseed, genrep=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this function do and why do we need it?
If it is in order to get the same seed as n3fit then please add a comment that specifies this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is to get the same seed as n3fit. I have added a comment to explain this

@ecole41
ecole41 changed the base branch from glorot_norm to main March 23, 2026 12:30
@codecov

codecov Bot commented Mar 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (b23fa54) to head (ee289a8).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
+ Coverage   95.00%   95.02%   +0.01%     
==========================================
  Files          31       31              
  Lines        1642     1648       +6     
==========================================
+ Hits         1560     1566       +6     
  Misses         82       82              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread colibri/mc_utils.py
Comment thread colibri/monte_carlo_fit.py Outdated
@comane

comane commented Mar 27, 2026

Copy link
Copy Markdown
Member

Looks good, thanks for taking care of this!

Feel free to merge if you're happy with it too

@comane comane changed the title [WIP] Added make_replicas from Validphys Added make_replicas from Validphys Mar 27, 2026
@ecole41
ecole41 merged commit 5ce8bf4 into main Mar 30, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants