Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@giacomomagni
Copy link
Contributor

This PR is to update evolven3fit_new with eko=0.12.0.
This is needed for developing since eko=0.10.3 is not compatible anymore with N3LO and QED #1643.
cc @scarlehoff

@scarlehoff scarlehoff mentioned this pull request Mar 15, 2023
9 tasks
@andreab1997
Copy link
Contributor

Just to clarify, this version is working (@giacomomagni is using it) but there is still some work to do (example: fixing tests). So let me convert this to Draft and I am going to take care of this.

@andreab1997 andreab1997 marked this pull request as draft March 15, 2023 11:54
@andreab1997
Copy link
Contributor

For the moment we have a known dependencies problem with conda conda-forge/eko-feedstock#11

@scarlehoff
Copy link
Member

The dependencies problem is now fixed!

@RoyStegeman
Copy link
Member

RoyStegeman commented Mar 16, 2023

Are these passing locally for you? Just because if they're not, it's probably easier to run only the regression tests locally as opposed to pushing to test.

@andreab1997
Copy link
Contributor

Are these passing locally for you? Just because if they're not, it's probably easier to run only the regression tests locally as opposed to pushing to test.

Actually the test that is failing should no be linked to evolven3fit so I don't understand why it is failing here

@scarlehoff
Copy link
Member

If I have to guess it would be because the change in eko came with a change in the numpy version being used so that messed up with the seeding at some stage, and the fit is very sensible to changes. So you would need to rerun the regression test locally and update the results.

(assuming this branched out of master)

@andreab1997
Copy link
Contributor

If I have to guess it would be because the change in eko came with a change in the numpy version being used so that messed up with the seeding at some stage, and the fit is very sensible to changes. So you would need to rerun the regression test locally and update the results.

(assuming this branched out of master)

So that test is only for linux. If I run locally on my mac it is succeding. Can someone with linux try?

@scarlehoff
Copy link
Member

If I run locally on my mac it is succeding

I don't think it is being run at all. Also, you would need to run it with a clean conda installation to be in the CI configuration.

@andreab1997
Copy link
Contributor

andreab1997 commented Mar 17, 2023

If I run locally on my mac it is succeding

I don't think it is being run at all. Also, you would need to run it with a clean conda installation to be in the CI configuration.

I know, I commented the line that is making the test running only on linux

@scarlehoff
Copy link
Member

I know, I commented the line that is making the test running only on linux

And is it running in an environment which is exactly the one in the CI? (which is in practice a perfectly clean conda installation)

@Zaharid
Copy link
Contributor

Zaharid commented Mar 17, 2023

I would be surprised if the numpy version influences the seeding. The "old" numpy random interface that we use is guaranteed to never change afaict.

@scarlehoff
Copy link
Member

I don't think it is guaranteed but I agree that is surprising. Maybe something else changed version (I haven't compared side by side all packages, I only noticed the bump in the numpy version).

@andreab1997 andreab1997 marked this pull request as ready for review March 17, 2023 16:13
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.

lgtm

@niclaurenti I think you can safely rebase on top of this branch.

andreab1997 and others added 2 commits March 17, 2023 17:34
@RoyStegeman
Copy link
Member

Thanks guys, please give me a sec to have a look

Copy link
Member

@RoyStegeman RoyStegeman left a comment

Choose a reason for hiding this comment

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

Some suggestions but looks good otherwise

if key in op_card_dict and isinstance(op_card[key], dict):
op_card[key].update(op_card_dict[key])
elif key in op_card_dict:
_logger.warning("Entry %s is not a dictionary and will be ignored", key)
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if at this point it should just raise an error. If a code runs and returns something that looks halfway alright I don't check the logs.

Whenever there is a key in a dictionary there may have been a reason for it to be there and if it was put in the wrong place/mistyped or something like that it's good if it raises an error. Probably outweights the few times it would raise an error when unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

In general I agree. The point is that in this case the only thing that an user can pass and that would be ignored are the Q2 and x grids which, in the particular case of the postfit evolution, I don't thing will be source of confusion.

Copy link
Member

Choose a reason for hiding this comment

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

What is the use case of op_card_dict? Is this something that the user is expected to use or is it more an "advance use case" / for debugging / etc?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say that in general the user is not going to use it. The only real use case is if he wants to change the solution of the evolution or something like that and this is actually possible. The only two things that at the moment cannot be changed are the q-grid and the x-grid but I would say that they are usually not changed when one does the postfit evolution.

info["XMax"] = float(x_grid[-1])
dump_info_file(usr_path, info)
for replica in initial_PDFs_dict.keys():
evolved_block = evolve_exportgrid(initial_PDFs_dict[replica], eko_op, x_grid)
Copy link
Member

Choose a reason for hiding this comment

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

Performance tip: if you put the iteration over $\mu^2$ in a loop, you will load the EKO files in memory over and over.

The best way would be to keep the EKO iteration outer, at the price of building the blocks in memory and dump all of them at the end.

However, this only regards performances, from any other point of view it should be perfectly equivalent.

xgrid=targetgrid,
Q2grid=list(eko["Q2grid"]),
pids=br.flavor_basis_pids,
Q2grid=list(eko.mu2grid),
Copy link
Member

Choose a reason for hiding this comment

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

Later on I would consider:

Suggested change
Q2grid=list(eko.mu2grid),
mu2grid=list(eko.mu2grid),

For consistency with:

  • new EKO notation
  • physical meaning
  • Python naming (PEP 8)

But of course this would follow from the matching change in the function in genpdf. But actually that is already done in a PR NNPDF/eko#220, so consider this more as a warning for the future...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok I can keep this open as a warning

Co-authored-by: Juan M. Cruz-Martinez <[email protected]>
@scarlehoff scarlehoff merged commit 6f3b71e into master Mar 21, 2023
@scarlehoff scarlehoff deleted the evolfit_w_eko_0.12 branch March 21, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants