Skip to content
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

Refactor xintegrator #1779

Merged
merged 4 commits into from
Jul 28, 2023
Merged

Refactor xintegrator #1779

merged 4 commits into from
Jul 28, 2023

Conversation

APJansen
Copy link
Collaborator

Adds a regression test for xIntegrator and refactors it to use a tensor product on the x-axis rather than replicating the grid tensor.

I expected it to be faster but the difference is negligible (few % faster).

The main point though is in preparation for other changes. I think @Radonirinaunimi 's inclusion of the nuclear pdfs will benefit from this, as well as a possible optimization for multi-replica fits I'm working on.
I'm trying to put changes that will be beneficial regardless in their own small PRs, I think that'll be easier to review. (Not a lot, I think just 2 more)

@APJansen APJansen added easy Refactoring n3fit Issues and PRs related to n3fit labels Jul 18, 2023
@Radonirinaunimi
Copy link
Member

Radonirinaunimi commented Jul 18, 2023

This looks good to me (it removes some extra-operations and have tests)!

But I don't really understand how this would make easier the inclusion of nPDFs?

The main point though is in preparation for other changes. I think @Radonirinaunimi 's inclusion of the nuclear pdfs

In general, I am for atomic changes, but in order to not lose track of the bigger picture/aim shouldn't these be included in the respective PRs -- and especially if they are really needed?

@scarlehoff
Copy link
Member

Please don't merge this yet.

@Radonirinaunimi Radonirinaunimi self-requested a review July 18, 2023 11:06
@APJansen
Copy link
Collaborator Author

@Radonirinaunimi The reason it helps is that now as long as the x axis stays the same it works for pdfs of any shape, so you can add an A axis.

This was referenced Jul 18, 2023
@APJansen
Copy link
Collaborator Author

@scarlehoff Is it ok to merge now? I did some tests running for a few epochs. The numerical noise is different so you get very small differences that grow every epoch. I don't think anything short of a full multi replica fit so you can see the distribution will give more checks than the unit test.

@scarlehoff scarlehoff added the run-fit-bot Starts fit bot from a PR. label Jul 28, 2023
Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

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

The numerical noise is different so you get very small differences that grow every epoch

That's strange, from the changes to the code I'd expect the changes to be identical.

Are you sure that the changes are due to this? Do you have an idea why could it be?

(in any case, the report by the bot should be done in a few hours, we can merge then)

@github-actions
Copy link

Greetings from your nice fit 🤖 !
I have good news for you, I just finished my tasks:

Check the report carefully, and please buy me a ☕ , or better, a GPU 😉!

@scarlehoff scarlehoff removed the run-fit-bot Starts fit bot from a PR. label Jul 28, 2023
@scarlehoff
Copy link
Member

Seems exactly the same to me https://vp.nnpdf.science/3G193e67SqS3DlDHqwUEeg==/#Scales0_Normalize_Basespecs0_PDFscalespecs0_Distspecs0_plot_pdfdistances maybe you saw some differences because a different version of some library ?

@scarlehoff scarlehoff merged commit 9cf5f9e into master Jul 28, 2023
@scarlehoff scarlehoff deleted the refactor_xintegrator branch July 28, 2023 12:34
@APJansen APJansen mentioned this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n3fit Issues and PRs related to n3fit Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants