Skip to content

Allow pineko to check if the grid contains SV #24

Merged
andreab1997 merged 40 commits into
mainfrom
sv_check
Jul 12, 2022
Merged

Allow pineko to check if the grid contains SV #24
andreab1997 merged 40 commits into
mainfrom
sv_check

Conversation

@andreab1997
Copy link
Copy Markdown
Contributor

We want to allow pineko to check if scale variations are available in a grid if we are computing a scale-varied FK table.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 13, 2022

Codecov Report

Merging #24 (3010f8c) into main (58715ad) will increase coverage by 0.75%.
The diff coverage is 47.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   39.24%   40.00%   +0.75%     
==========================================
  Files          15       15              
  Lines         479      520      +41     
==========================================
+ Hits          188      208      +20     
- Misses        291      312      +21     
Flag Coverage Δ
unittests 40.00% <47.54%> (+0.75%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pineko/cli/__init__.py 100.00% <ø> (ø)
src/pineko/evolve.py 30.00% <0.00%> (+1.15%) ⬆️
src/pineko/theory.py 20.12% <18.18%> (-0.40%) ⬇️
src/pineko/cli/check.py 46.15% <38.46%> (-17.01%) ⬇️
src/pineko/cli/convolute.py 77.27% <71.42%> (-6.07%) ⬇️
src/pineko/check.py 57.14% <100.00%> (+32.14%) ⬆️

Comment thread src/pineko/check.py Outdated
Copy link
Copy Markdown
Contributor

@felixhekhorn felixhekhorn left a comment

Choose a reason for hiding this comment

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

  • this PR should sit on top of #19 since even scheme C is not available in master
  • I assume this will also trigger more minor issues (e.g. the numpy doc style ...)

Comment thread src/pineko/check.py Outdated
Comment thread src/pineko/check.py Outdated
Comment thread src/pineko/cli/check_scalevar.py Outdated
Comment thread src/pineko/cli/check_scalevar.py Outdated
Comment thread src/pineko/check.py Outdated
@felixhekhorn felixhekhorn added the enhancement New feature or request label Jun 16, 2022
@andreab1997
Copy link
Copy Markdown
Contributor Author

Should I rebase this on #19 then? @felixhekhorn

@andreab1997 andreab1997 requested a review from felixhekhorn June 17, 2022 12:17
@felixhekhorn
Copy link
Copy Markdown
Contributor

Should I rebase this on #19 then? @felixhekhorn

yes, please

@andreab1997
Copy link
Copy Markdown
Contributor Author

@felixhekhorn I have done but now there are some problems on stuffs that I have not touched. Do you know why?

@felixhekhorn
Copy link
Copy Markdown
Contributor

@felixhekhorn I have done but now there are some problems on stuffs that I have not touched. Do you know why?

you mean here in the workflow? keep in mind that this only works together with NNPDF/pineappl#138 so an unpublished version - check locally instead

@felixhekhorn felixhekhorn changed the base branch from main to feature/sv June 17, 2022 13:39
Comment thread src/pineko/check.py Outdated
Comment thread src/pineko/cli/check.py Outdated
@felixhekhorn
Copy link
Copy Markdown
Contributor

Could you please do me a favour and also adjust the arguments of https://github.com/N3PDF/pineko/blob/b4dc401e4feef5cffc4b137081c246b66c8ea8d8/src/pineko/evolve.py#L79 such that in TheoryBuilder.fk we open the grid only once?

@andreab1997
Copy link
Copy Markdown
Contributor Author

Could you please do me a favour and also adjust the arguments of

https://github.com/N3PDF/pineko/blob/b4dc401e4feef5cffc4b137081c246b66c8ea8d8/src/pineko/evolve.py#L79

such that in TheoryBuilder.fk we open the grid only once?

So you want that also evolve_grid takes the grid itself as argument and not the path, right?

@andreab1997
Copy link
Copy Markdown
Contributor Author

@felixhekhorn Ok but then we need to give up the fancy print with the grid path because we don't know that information anymore. Is it ok for you?
https://github.com/N3PDF/pineko/blob/e12c6482a32c7c8f902bfa2d2504e4bfe451fd19/src/pineko/evolve.py#L100

@felixhekhorn
Copy link
Copy Markdown
Contributor

@felixhekhorn Ok but then we need to give up the fancy print with the grid path because we don't know that information anymore. Is it ok for you?

https://github.com/N3PDF/pineko/blob/e12c6482a32c7c8f902bfa2d2504e4bfe451fd19/src/pineko/evolve.py#L100

Mmm, actually, I like that one because it is telling me what is happening ... I guess we can lift it to the calling functions ... maybe on the "theory" side we can even adjust it a bit (since there the key ingredient is actually repeated 3 times ...)

@andreab1997
Copy link
Copy Markdown
Contributor Author

@andreab1997 please try to rebase on feature/sv, I'm getting conflicts...

I should have solved both the problems (the conflicts and the workflow failing)

Copy link
Copy Markdown
Collaborator

@alecandido alecandido left a comment

Choose a reason for hiding this comment

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

Few improvements, I'll give a tiny contribution as well and then we can merge.

Comment thread src/pineko/cli/convolute.py Outdated
Comment thread src/pineko/evolve.py Outdated
Comment thread src/pineko/theory.py
)
# check if grid contains SV if theory is requesting them
xir = tcard["XIR"]
xif = tcard["XIF"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@felixhekhorn didn't we have another variable, e.g. in yadism. In order to compute scale variations, even when we are not given a specific value?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, we have there "activateFact" (or similar name) in order to decide whether to compute the SV grids - however for pineko this is not sufficient since we need to collapse on the actual value - or what were you thinking?

Copy link
Copy Markdown
Collaborator

@alecandido alecandido Jul 11, 2022

Choose a reason for hiding this comment

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

Sorry, so it is just the first part of the comment to be referred to the code below.

Maybe I'd just move it: first # check if sv are requested then # in case of sv, check they are available in the grid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you mean just the comments right? because the code is already doing that: first it checks if the theory is asking for scale-variations and then it checks whether they are available in the gird.

Comment thread src/pineko/cli/check.py Outdated
Comment thread debug.py Outdated
Comment thread eko_debug.py Outdated
Comment thread src/pineko/check.py Outdated
Comment thread yadism_debug.py Outdated
@delete-merged-branch delete-merged-branch Bot deleted the branch main July 11, 2022 13:36
@felixhekhorn felixhekhorn changed the base branch from feature/sv to main July 11, 2022 13:37
@felixhekhorn
Copy link
Copy Markdown
Contributor

I hope github is joking
grafik

@felixhekhorn
Copy link
Copy Markdown
Contributor

@andreab1997
Copy link
Copy Markdown
Contributor Author

for this, should I add a couple of tests or we add them in a separate PR? because codecov is complaining....

@alecandido
Copy link
Copy Markdown
Collaborator

alecandido commented Jul 12, 2022

@andreab1997 can you test the new refactored version of check subcommand, please? 975b8fe

@andreab1997
Copy link
Copy Markdown
Contributor Author

@andreab1997 can you test the new refactored version of check subcommand, please? 975b8fe

sure

@andreab1997
Copy link
Copy Markdown
Contributor Author

@andreab1997 can you test the new refactored version of check subcommand, please? 975b8fe

I tried that and it works. However I believe we should not add unit tests in this PR but rather in #25 mainly because we need actual grids to test the cli (as are provided by #25). So I think we can merge this now

@felixhekhorn
Copy link
Copy Markdown
Contributor

I tried that and it works. However I believe we should not add unit tests in this PR but rather in #25 mainly because we need actual grids to test the cli (as are provided by #25). So I think we can merge this now

let's close this PR and also #25, #27, #28 - and have a restart from a new main branch; just try to keep track of some minor comments such as this one

@andreab1997
Copy link
Copy Markdown
Contributor Author

I tried that and it works. However I believe we should not add unit tests in this PR but rather in #25 mainly because we need actual grids to test the cli (as are provided by #25). So I think we can merge this now

let's close this PR and also #25, #27, #28 - and have a restart from a new main branch; just try to keep track of some minor comments such as this one

Yes, I am asking the review only for the test part, then I believe we can merge

@andreab1997
Copy link
Copy Markdown
Contributor Author

Can I merge this? @felixhekhorn @alecandido

@andreab1997 andreab1997 merged commit 9fea7f4 into main Jul 12, 2022
@delete-merged-branch delete-merged-branch Bot deleted the sv_check branch July 12, 2022 15:22
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.

4 participants