Skip to content

Commit

Permalink
Merge branch 'fk-refactor' into hyperopt_loss_on_fk-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
APJansen committed Feb 22, 2024
2 parents a94f6a2 + ad94132 commit 8d24ed8
Show file tree
Hide file tree
Showing 4,702 changed files with 3,871,008 additions and 54,476 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .github/workflows/fitbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
POSTFIT_NREP: 16 # requested replicas for postfit
REFERENCE_SET: NNBOT-a5240b65e-2023-12-12 # reference set for vp
CONDA_PY: 310
PYTHONHASHSEED: "0"

jobs:
build:
Expand Down Expand Up @@ -77,7 +78,7 @@ jobs:
run: |
conda activate nnpdfenv
cd $RUNFOLDER
for ((i=1; i<=$N3FIT_MAXNREP; i+=2)); do n3fit $RUNCARD.yml $i -r $((i+1)); done
for ((i=1; i<=$N3FIT_MAXNREP; i+=1)); do n3fit $RUNCARD.yml $i ; done
# performing DGLAP
- name: Running dglap
shell: bash -l {0}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/python_installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Test the python installation

on: [push]

env:
# https://keras.io/getting_started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development
PYTHONHASHSEED: "0"

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
CONDA_OS: linux-64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
NETRC_FILE: ${{ secrets.NETRC_FILE }}
NNPDF_SSH_KEY: ${{ secrets.NNPDF_SSH_KEY }}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup conda and install LHAPDF and pandoc
shell: bash -l {0}
run: |
echo "$NETRC_FILE" | base64 --decode > ~/.netrc
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda config --append channels conda-forge
conda config --set show_channel_urls true
conda install lhapdf pandoc
- name: Install nnpdf with testing and qed extras
shell: bash -l {0}
run: |
conda activate test
pip install .[qed,tests]
- name: Test n3fit and validphys
shell: bash -l {0}
run: |
conda activate test
pytest --pyargs --mpl validphys n3fit
64 changes: 64 additions & 0 deletions .github/workflows/redo_regressions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Redo regressions

# start job only for PRs when a label is added.
on:
pull_request:
types: [labeled]

# some general variables
env:
# https://keras.io/getting_started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development
PYTHONHASHSEED: "0"

jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'redo-regressions')
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
CONDA_OS: linux-64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
NETRC_FILE: ${{ secrets.NETRC_FILE }}
NNPDF_SSH_KEY: ${{ secrets.NNPDF_SSH_KEY }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
use-mamba: true
auto-update-conda: true
activate-environment: test
- name: Setup conda and install LHAPDF and pandoc
shell: bash -l {0}
run: |
echo "$NETRC_FILE" | base64 --decode > ~/.netrc
conda config --remove channels defaults
conda config --append channels conda-forge
conda config --prepend channels https://packages.nnpdf.science/public
conda config --set show_channel_urls true
conda install lhapdf pandoc
- name: Install nnpdf with testing and qed extras
shell: bash -l {0}
run: |
pip install .[qed,tests]
- name: Regenerate regressions
shell: bash -l {0}
run: |
pytest extra_tests/regression_checks.py --regenerate True
- name: Commit
shell: bash -l {0}
run: |
git config user.name "Redo regressions bot"
git add extra_tests/regression_fits/*
git status
git commit -m "Automatically regenerated regressions from PR ${{ github.event.number }}, branch ${{ github.event.pull_request.head.ref }}."
git push origin "${{ github.event.pull_request.head.ref }}"
47 changes: 47 additions & 0 deletions .github/workflows/regression_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Collection of regression tests

on: [push]

env:
# https://keras.io/getting_started/faq/#how-can-i-obtain-reproducible-results-using-keras-during-development
PYTHONHASHSEED: "0"

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
CONDA_OS: linux-64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
NETRC_FILE: ${{ secrets.NETRC_FILE }}
NNPDF_SSH_KEY: ${{ secrets.NNPDF_SSH_KEY }}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
use-mamba: true
auto-update-conda: true
activate-environment: test
- name: Setup conda and install LHAPDF and pandoc
shell: bash -l {0}
run: |
echo "$NETRC_FILE" | base64 --decode > ~/.netrc
conda config --remove channels defaults
conda config --append channels conda-forge
conda config --prepend channels https://packages.nnpdf.science/public
conda config --set show_channel_urls true
conda install lhapdf pandoc
- name: Install nnpdf with testing and qed extras
shell: bash -l {0}
run: |
pip install .[qed,tests]
- name: Test n3fit and validphys
shell: bash -l {0}
run: |
pytest extra_tests/regression_checks.py
35 changes: 23 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ name: Tests
on: [push]

concurrency:
group: ${{ github.ref }}
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true


jobs:
build:
strategy:
Expand All @@ -23,40 +24,52 @@ jobs:
env:
NETRC_FILE: ${{ secrets.NETRC_FILE }}
NNPDF_SSH_KEY: ${{ secrets.NNPDF_SSH_KEY }}
PYTHONHASHSEED: "0"
steps:
- uses: actions/checkout@v1
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
use-mamba: true
auto-update-conda: true
activate-environment: test
- name: Install macOS SDK
if: startsWith(matrix.os, 'macOS')
shell: bash -l {0}
run: |
conda activate test
curl -L -O https://data.nnpdf.science/MacOSX10.9.sdk.tar.xz
tar xfz MacOSX10.9.sdk.tar.xz -C $CONDA_PREFIX
- name: Setup conda and install conda-build
- name: Setup conda
shell: bash -l {0}
run: |
echo "$NETRC_FILE" | base64 --decode > ~/.netrc
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda config --remove channels defaults
conda config --append channels conda-forge
conda config --prepend channels https://packages.nnpdf.science/public
conda config --set show_channel_urls true
conda activate test
- name: Install boa in Linux
if: startsWith(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
conda install boa --yes
- name: Build recipe and run tests on linux
if: startsWith(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
conda activate test
conda mambabuild -q conda-recipe
- name: Extra setup settings for macOS and install boa
if: startsWith(matrix.os, 'macOS')
shell: bash -l {0}
run: |
conda config --prepend channels defaults
conda install boa conda-build==3.28 --yes
- name: Build recipe and run tests on macOS
if: startsWith(matrix.os, 'macOS')
shell: bash -l {0}
run: |
conda activate test
export CONDA_BUILD_SYSROOT=$CONDA_PREFIX/MacOSX10.9.sdk
conda build -q conda-recipe
- name: Upload conda package to NNPDF server
Expand All @@ -65,7 +78,6 @@ jobs:
run: |
KEY=$( mktemp )
echo "$NNPDF_SSH_KEY" | base64 --decode > "$KEY"
conda activate test
scp -i "$KEY" -o StrictHostKeyChecking=no\
$CONDA_PREFIX/conda-bld/${{matrix.CONDA_OS}}/*.tar.bz2 \
[email protected]:~/packages/conda/${{matrix.CONDA_OS}}
Expand All @@ -75,7 +87,6 @@ jobs:
run: |
KEY=$( mktemp )
echo "$NNPDF_SSH_KEY" | base64 --decode > "$KEY"
conda activate test
conda install nnpdf --yes
cd doc/sphinx
make html
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# extra files created to hold the versioning information
validphys2/src/validphys/_version.py

# extra files created by cmake
libnnpdf/nnprofile.yaml
libnnpdf/REAMDE.md
libnnpdf/scripts/nnpdf.pc
libnnpdf/src/NNPDF/common.h
libnnpdf/src/NNPDF/config.h
evolven3fit/evolven3fit.cc

# Created by https://www.gitignore.io/api/macos

Expand Down
Loading

0 comments on commit 8d24ed8

Please sign in to comment.