Skip to content

Use best epoch to choose optimised parameters#446

Open
ecole41 wants to merge 11 commits intomainfrom
best_epoch
Open

Use best epoch to choose optimised parameters#446
ecole41 wants to merge 11 commits intomainfrom
best_epoch

Conversation

@ecole41
Copy link
Copy Markdown
Collaborator

@ecole41 ecole41 commented Apr 6, 2026

This PR edits the monte_carlo_fit.py such that the "best epoch" is chosen during training. This is the last epoch from which the validation loss improved with respect to the best validation loss throughout training AND the positivity datasets pass with a threshold of 1e-6. This "best epoch" is then used to produce the outputted optimised parameters

This matches the method used in NNPDF and may be useful for NTK analysis.

To Do:

  • Add $\chi^2$ threshold to the best epoch selection
  • Add documentation

@ecole41 ecole41 requested review from achiefa and comane April 6, 2026 13:10
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 6, 2026

Up to standards ✅

🟢 Issues 3 high · 2 minor

Results:
5 new issues

Category Results
Security 3 high
CodeStyle 2 minor

View in Codacy

🟢 Metrics 9 complexity · 3 duplication

Metric Results
Complexity 9
Duplication 3

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.21%. Comparing base (5ce8bf4) to head (e156463).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #446      +/-   ##
==========================================
+ Coverage   95.02%   96.21%   +1.18%     
==========================================
  Files          31       31              
  Lines        1648     1690      +42     
==========================================
+ Hits         1566     1626      +60     
+ Misses         82       64      -18     

☔ 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.

@ecole41 ecole41 self-assigned this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant