NNPDF / nnpdf

An open-source machine learning framework for global analyses of parton distributions.
https://docs.nnpdf.science/
GNU General Public License v3.0
28 stars 6 forks source link

Kinematics_override error in validphys #182

Closed RosalynLP closed 6 years ago

RosalynLP commented 6 years ago

I'm getting an error when I try and run validphys which is persisting when I use runcards which have previously worked, namely for DIS only theory covariance matrix reports. It seems like I need to add additional information in the runcard or something, but previously this wasn't needed and I'm not sure what a kinematics override is.


Traceback (most recent call last):
  File "/home/s1303034/miniconda3/bin/validphys", line 11, in <module>
    load_entry_point('validphys', 'console_scripts', 'validphys')()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/scripts/main.py", line 10, in main
    vp.main()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/app.py", line 133, in main
    a.main()
  File "/home/s1303034/miniconda3/lib/python3.6/site-packages/reportengine/app.py", line 360, in main
    self.run()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/app.py", line 129, in run
    super().run()
  File "/home/s1303034/miniconda3/lib/python3.6/site-packages/reportengine/app.py", line 346, in run
    rb.execute_sequential()
  File "/home/s1303034/miniconda3/lib/python3.6/site-packages/reportengine/resourcebuilder.py", line 165, in execute_sequential
    *self.resolve_callargs(callspec))
  File "/home/s1303034/miniconda3/lib/python3.6/site-packages/reportengine/resourcebuilder.py", line 174, in get_result
    return function.final_action(fres, **prepare_args)
  File "/home/s1303034/miniconda3/lib/python3.6/site-packages/reportengine/figure.py", line 77, in savefiglist
    for i, fig in enumerate(figures):
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plots.py", line 453, in plot_fancy_dataspecs
    normalize_to=normalize_to)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plots.py", line 206, in _plot_fancy_impl
    info = get_info(commondata, normalize=(normalize_to is not None))
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 61, in get_info
    info = PlotInfo.from_commondata(data, cuts=cuts, normalize=normalize)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 161, in from_commondata
    return cls(kinlabels=kinlabels, **plot_params)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 80, in __init__
    raise ValueError(f'A kinematics_override must be set for {dataset_label}')
ValueError: A kinematics_override must be set for HERACOMBNCEP820

----
Zaharid commented 6 years ago

This most likely means that some plotting files are not in place for some reason. Can you reproduce the problem on a clean conda environment?

Zaharid commented 6 years ago

This worked for me in a clean environment:

dataset_input:
    dataset: HERACOMBNCEP820

pdf: NNPDF31_nnlo_as_0118_1000
theoryid: 53

use_cuts: False

actions_:
    - plot_fancy
RosalynLP commented 6 years ago

Hm I made a completely new environment and used that runcard and it still gave

(nnpdf-dev) bash-4.2$ cd ~/Documents/scale_variation_covariance/
(nnpdf-dev) bash-4.2$ validphys test.yaml 
[WARNING]: Output folder exists: /home/s1303034/Documents/scale_variation_covariance/output Overwritting contents
[INFO]: Could not find a resource (pdf): NNPDF31_nnlo_as_0118. Attempting to download it.
[INFO]: Downloading https://www.hepforge.org/archive/lhapdf/pdfsets/6.1/NNPDF31_nnlo_as_0118.tar.gz.
[==================================================] (100%)
[INFO]: Extracting archive to /home/s1303034/miniconda3/envs/nnpdf-dev/share/LHAPDF
[INFO]: All requirements processed and checked successfully. Executing actions.

----

Traceback (most recent call last):
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/bin/validphys", line 11, in <module>
    load_entry_point('validphys', 'console_scripts', 'validphys')()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/scripts/main.py", line 10, in main
    vp.main()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/app.py", line 133, in main
    a.main()
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/lib/python3.6/site-packages/reportengine/app.py", line 360, in main
    self.run()
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/app.py", line 129, in run
    super().run()
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/lib/python3.6/site-packages/reportengine/app.py", line 346, in run
    rb.execute_sequential()
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/lib/python3.6/site-packages/reportengine/resourcebuilder.py", line 165, in execute_sequential
    *self.resolve_callargs(callspec))
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/lib/python3.6/site-packages/reportengine/resourcebuilder.py", line 174, in get_result
    return function.final_action(fres, **prepare_args)
  File "/home/s1303034/miniconda3/envs/nnpdf-dev/lib/python3.6/site-packages/reportengine/figure.py", line 77, in savefiglist
    for i, fig in enumerate(figures):
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plots.py", line 382, in plot_fancy
    normalize_to=normalize_to)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plots.py", line 206, in _plot_fancy_impl
    info = get_info(commondata, normalize=(normalize_to is not None))
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 61, in get_info
    info = PlotInfo.from_commondata(data, cuts=cuts, normalize=normalize)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 161, in from_commondata
    return cls(kinlabels=kinlabels, **plot_params)
  File "/home/s1303034/Documents/nnpdfgit/nnpdf/validphys2/src/validphys/plotoptions/core.py", line 80, in __init__
    raise ValueError(f'A kinematics_override must be set for {dataset_label}')
ValueError: A kinematics_override must be set for HERACOMBNCEP820

----

The only thing I did was set in nnprofile.yaml:

data_path: '/Disk/ds-sopa-personal/s1303034/NNPDF/data/'
results_path: '/Disk/ds-sopa-personal/s1303034/NNPDF/results/'
Zaharid commented 6 years ago

Yes, indeed. Those folders likely do not contain the plotting files. You can just copy the commondata folder from nnpdfcpp.

RosalynLP commented 6 years ago

Aha excellent, thanks so much!!