Skip to content

Making n3fit use python covmats#1285

Merged
Zaharid merged 6 commits into
masterfrom
n3fit_covmats
Jul 14, 2021
Merged

Making n3fit use python covmats#1285
Zaharid merged 6 commits into
masterfrom
n3fit_covmats

Conversation

@siranipour
Copy link
Copy Markdown
Contributor

Btw, do we need to add use_t0: true somewhere in the fit runcard?

@siranipour siranipour changed the base branch from master to n3fit_pseudodata June 10, 2021 14:06
@Zaharid
Copy link
Copy Markdown
Contributor

Zaharid commented Jun 10, 2021

That is in n3fit_exec.py. That said, maybe we want to iterate the t0s in the runcards? @enocera

Comment thread validphys2/src/validphys/config.py Outdated
@siranipour
Copy link
Copy Markdown
Contributor Author

Maybe we should remove the explicit node and make the provider take in the t0 covmat always?

@wilsonmr
Copy link
Copy Markdown
Contributor

Maybe we should remove the explicit node and make the provider take in the t0 covmat always?

Yeah do this

@wilsonmr
Copy link
Copy Markdown
Contributor

That is in n3fit_exec.py. That said, maybe we want to iterate the t0s in the runcards? @enocera

I think the current way of setting t0 pdf in runcard is clearer than having it being iterated under the hood, I'm also not even sure what that would mean in fact.

@wilsonmr
Copy link
Copy Markdown
Contributor

these PRs are looking very simple (which is a good thing!)

@Zaharid
Copy link
Copy Markdown
Contributor

Zaharid commented Jun 16, 2021

This is failing with

[CRITICAL]: Bug in n3fit ocurred. Please report it.

Traceback (most recent call last):

  File "$PREFIX/lib/python3.7/site-packages/n3fit/scripts/n3fit_exec.py", line 227, in run

    super().run()

  File "$PREFIX/lib/python3.7/site-packages/validphys/app.py", line 151, in run

    super().run()

  File "$PREFIX/lib/python3.7/site-packages/reportengine/app.py", line 374, in run

    rb.execute_sequential()

  File "$PREFIX/lib/python3.7/site-packages/reportengine/resourcebuilder.py", line 168, in execute_sequential

    perform_final=self.perform_final)

  File "$PREFIX/lib/python3.7/site-packages/reportengine/resourcebuilder.py", line 175, in get_result

    fres =  function(**kwdict)

  File "$PREFIX/lib/python3.7/site-packages/validphys/covmats.py", line 239, in dataset_t0_predictions

    return central_predictions(dataset, t0set).to_numpy().squeeze()

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 189, in central_predictions

    return _predictions(dataset, pdf, central_fk_predictions)

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 124, in _predictions

    fkfunc(load_fktable(fk).with_cuts(cuts), pdf) for fk in dataset.fkspecs

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 124, in <listcomp>

    fkfunc(load_fktable(fk).with_cuts(cuts), pdf) for fk in dataset.fkspecs

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 262, in central_fk_predictions

    return central_dis_predictions(loaded_fk, pdf)

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 396, in central_dis_predictions

    return _gv_dis_predictions(loaded_fk, gv)

  File "$PREFIX/lib/python3.7/site-packages/validphys/convolution.py", line 337, in _gv_dis_predictions

    gv = gvfunc(qmat=[Q], vmat=FK_FLAVOURS[fm], xmat=xgrid).squeeze(-1)

  File "$PREFIX/lib/python3.7/site-packages/validphys/pdfbases.py", line 292, in central_grid_values

    return self.apply_grid_values(func, vmat, xmat, qmat)

  File "$PREFIX/lib/python3.7/site-packages/validphys/pdfbases.py", line 406, in apply_grid_values

    gv = func(flmat, xmat, qmat)

  File "$PREFIX/lib/python3.7/site-packages/validphys/gridvalues.py", line 121, in central_grid_values

    return _grid_values(pdf.load_t0(), flmat, xmat, qmat)

AttributeError: 'NoneType' object has no attribute 'load_t0'


@siranipour
Copy link
Copy Markdown
Contributor Author

@Zaharid the reason for that crash is because use_t0 is set to False in the regression fit runcard:

We decided to add an explicit_node to dispatch on use_t0

Base automatically changed from n3fit_pseudodata to master June 24, 2021 11:57
@siranipour siranipour added run-fit-bot Starts fit bot from a PR. and removed run-fit-bot Starts fit bot from a PR. labels Jun 28, 2021
@siranipour siranipour changed the base branch from master to atleast1d June 28, 2021 13:13
@siranipour siranipour removed the run-fit-bot Starts fit bot from a PR. label Jun 28, 2021
@siranipour siranipour added the run-fit-bot Starts fit bot from a PR. label Jun 28, 2021
@github-actions
Copy link
Copy Markdown

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 😉!

Base automatically changed from atleast1d to master June 30, 2021 14:16
@siranipour
Copy link
Copy Markdown
Contributor Author

Are we happy to merge this

Copy link
Copy Markdown
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.

This seems ok to me (and both bots pass)

@Zaharid Zaharid merged commit e32d105 into master Jul 14, 2021
@Zaharid Zaharid deleted the n3fit_covmats branch July 14, 2021 13:00
@Zaharid Zaharid added the enhancement New feature or request label Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

destroyingc++ enhancement New feature or request run-fit-bot Starts fit bot from a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants