From 3731311e824c61fab04530d9a2d4d280d8b96d7f Mon Sep 17 00:00:00 2001 From: juacrumar Date: Thu, 28 Nov 2024 13:30:45 +0100 Subject: [PATCH 1/3] run fitbot with pip and not conda --- .github/workflows/fitbot.yml | 43 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/.github/workflows/fitbot.yml b/.github/workflows/fitbot.yml index aebd54ec26..daf4acbbb4 100644 --- a/.github/workflows/fitbot.yml +++ b/.github/workflows/fitbot.yml @@ -12,11 +12,10 @@ env: POSTFIT_NREP: 16 # requested replicas for postfit REFERENCE_SET: NNBOT-343ee3d98-2024-11-27 # reference set for exact results STABLE_REFERENCE_SET: NNBOT-c0f99b7b3-2024-02-28 # reference set for last tag - CONDA_PY: 312 PYTHONHASHSEED: "0" jobs: - build: + fitbot: # perform build only if PR has run-fit-bot label if: contains(github.event.pull_request.labels.*.name, 'run-fit-bot') runs-on: ubuntu-latest @@ -29,31 +28,18 @@ jobs: with: python-version: "3.12" use-mamba: true - channels: https://packages.nnpdf.science/public,conda-forge + channels: conda-forge show-channel-urls: true auto-update-conda: true - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.NNPDF_SSA }} - name: id_rsa - known_hosts: ${{ secrets.NNPDF_HOSTS_KEY }} - - name: Setup conda and install conda-build - shell: bash -l {0} - run: | - conda install conda-build --yes - - name: Build recipe + activate-environment: nnpdfenv + - name: Install lhapdf, pandoc and mongodb shell: bash -l {0} run: | - CONDA_PY=$CONDA_PY conda build --no-test -q conda-recipe - # install local build - - name: Installing NNPDF conda package + conda install lhapdf pandoc mongodb + - name: Install nnpdf with pip shell: bash -l {0} run: | - conda update -n base conda - conda install -n base conda-libmamba-solver - conda config --set solver libmamba - conda create -n nnpdfenv -c file:///usr/share/miniconda/envs/test/conda-bld/linux-64/ nnpdf + pip install . # create fancy runcards - name: Preparing fit runcard run: | @@ -62,29 +48,32 @@ jobs: export TIMESTAMP=`date --iso-8601` echo "RUNCARD=NNBOT-$COMMIT-$TIMESTAMP" >> $GITHUB_ENV echo "RUNFOLDER=n3fit/runcards/examples" >> $GITHUB_ENV - # downloading theory and t0 + # downloading theory, t0 and eko - name: Downloading requirements shell: bash -l {0} run: | - conda activate nnpdfenv cd $RUNFOLDER cp developing.yml $RUNCARD.yml vp-setupfit $RUNCARD.yml - # running n3fit replicas + # run n3fit replicas sequentially - name: Running n3fit shell: bash -l {0} run: | - conda activate nnpdfenv cd $RUNFOLDER for ((i=1; i<=$N3FIT_MAXNREP; i+=1)); do n3fit $RUNCARD.yml $i ; done # performing DGLAP - name: Running dglap shell: bash -l {0} run: | - conda activate nnpdfenv cd $RUNFOLDER evolven3fit evolve $RUNCARD - # running postfit + # running postfit and upload the fit to the server + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.NNPDF_SSA }} + name: id_rsa + known_hosts: ${{ secrets.NNPDF_HOSTS_KEY }} - name: Postfit and upload fit shell: bash -l {0} run: | From 99333cf62d289b97fc755f4695713009a339d34c Mon Sep 17 00:00:00 2001 From: "Juan M. Cruz-Martinez" Date: Thu, 28 Nov 2024 20:36:05 +0100 Subject: [PATCH 2/3] Try to fix the problem with pyopenssl + mongodb See https://github.com/conda/conda/issues/13619#issuecomment-1966164903 --- conda-recipe/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 62a07ce62f..f88f3e7a0a 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -20,10 +20,11 @@ requirements: run: - python >=3.9,<3.13 - tensorflow >=2.10,<2.17 # 2.17 works ok but the conda-forge package for macos doesn't - - psutil # to ensure n3fit affinity is with the right processors + - psutil - hyperopt - mongodb - pymongo <4 + - pyopenssl >=23.2 - seaborn - lhapdf - numpy From d8b95d35c15a3a2fa425c70b15ea395ce375b88a Mon Sep 17 00:00:00 2001 From: "Juan M. Cruz-Martinez" Date: Fri, 29 Nov 2024 06:38:58 +0100 Subject: [PATCH 3/3] change to pip-based fitbot PR: https://github.com/NNPDF/nnpdf/pull/2232 --- .github/workflows/fitbot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fitbot.yml b/.github/workflows/fitbot.yml index daf4acbbb4..e937b88bd5 100644 --- a/.github/workflows/fitbot.yml +++ b/.github/workflows/fitbot.yml @@ -10,7 +10,7 @@ on: env: N3FIT_MAXNREP: 20 # total number of replicas to fit POSTFIT_NREP: 16 # requested replicas for postfit - REFERENCE_SET: NNBOT-343ee3d98-2024-11-27 # reference set for exact results + REFERENCE_SET: NNBOT-b1374cba6-2024-11-28 # reference set for exact results STABLE_REFERENCE_SET: NNBOT-c0f99b7b3-2024-02-28 # reference set for last tag PYTHONHASHSEED: "0"