From 74fa59517122f643e8c246912809c8ab33880e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20G=C3=B3mez?= Date: Mon, 2 Jan 2023 11:10:57 +0100 Subject: [PATCH 01/12] updated workflow script --- .github/workflows/run_tests.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 7afd53a8..a7a3012e 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -43,12 +43,17 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Install dependencies - run: | - $CONDA/bin/conda env update --file environment_all_backends.yml --name base + - name: provision-with-micromamba + uses: mamba-org/provision-with-micromamba@main + with: + environment-file: environment.yml + environment-name: torchquad + cache-downloads: true - name: Test with pytest + shell: bash -l {0} run: | + micromamba activate torchquad cd torchquad/tests - conda install pytest - $CONDA/bin/pip3 install pytest-error-for-skips - $CONDA/bin/pytest -ra --error-for-skips + micromamba install pytest + micromamba install pytest-error-for-skips + pytest -ra --error-for-skips \ No newline at end of file From b34f1e62e44cd6ca5d0add8866bbdd12becc9f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20G=C3=B3mez?= Date: Mon, 2 Jan 2023 11:16:59 +0100 Subject: [PATCH 02/12] fixing workflow errors --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a7a3012e..763b7bd8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -55,5 +55,5 @@ jobs: micromamba activate torchquad cd torchquad/tests micromamba install pytest - micromamba install pytest-error-for-skips + pip install pytest-error-for-skips pytest -ra --error-for-skips \ No newline at end of file From 0d6b392a53fba872424bfee330b4a64bb860ca68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20G=C3=B3mez?= Date: Mon, 2 Jan 2023 11:25:28 +0100 Subject: [PATCH 03/12] try to use same pytest --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 763b7bd8..2811df15 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -54,6 +54,6 @@ jobs: run: | micromamba activate torchquad cd torchquad/tests - micromamba install pytest + pip install pytest pip install pytest-error-for-skips pytest -ra --error-for-skips \ No newline at end of file From 06e6c0c0ebfc5ce0090eda913ee6da35272fd52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20G=C3=B3mez?= Date: Mon, 2 Jan 2023 11:29:11 +0100 Subject: [PATCH 04/12] switched to correct env file --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 2811df15..3ea30bab 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -46,7 +46,7 @@ jobs: - name: provision-with-micromamba uses: mamba-org/provision-with-micromamba@main with: - environment-file: environment.yml + environment-file: environment_all_backends.yml environment-name: torchquad cache-downloads: true - name: Test with pytest From b6af718bc158fc52ef8a3e1e273e00c59b3f180d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20G=C3=B3mez?= Date: Mon, 2 Jan 2023 11:43:58 +0100 Subject: [PATCH 05/12] installing jax for tests --- .github/workflows/run_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 3ea30bab..0a48a306 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -56,4 +56,5 @@ jobs: cd torchquad/tests pip install pytest pip install pytest-error-for-skips + pip install --upgrade "jax[cpu]" pytest -ra --error-for-skips \ No newline at end of file From 5e69f1c7988d88734e5edbc5e9a9363570941962 Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 12:01:08 +0100 Subject: [PATCH 06/12] disable tensorflow --- .github/workflows/run_tests.yml | 2 +- environment_all_backends.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 0a48a306..a7d1a706 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -57,4 +57,4 @@ jobs: pip install pytest pip install pytest-error-for-skips pip install --upgrade "jax[cpu]" - pytest -ra --error-for-skips \ No newline at end of file + pytest -ra diff --git a/environment_all_backends.yml b/environment_all_backends.yml index a902b61e..72e2ebfd 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -17,7 +17,7 @@ dependencies: - numpy>=1.19.5 - cudatoolkit>=11.1 - pytorch>=1.9=*cuda* -- tensorflow-gpu>=2.6.0 +#~ - tensorflow-gpu>=2.6.0 # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html From 68defe752045d66d721faf2eb8773fb53588ba3e Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 12:15:26 +0100 Subject: [PATCH 07/12] test tensorflow import --- .github/workflows/run_tests.yml | 2 +- environment_all_backends.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a7d1a706..1c34038f 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -57,4 +57,4 @@ jobs: pip install pytest pip install pytest-error-for-skips pip install --upgrade "jax[cpu]" - pytest -ra + python3 -c "import tensorflow" diff --git a/environment_all_backends.yml b/environment_all_backends.yml index 72e2ebfd..a902b61e 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -17,7 +17,7 @@ dependencies: - numpy>=1.19.5 - cudatoolkit>=11.1 - pytorch>=1.9=*cuda* -#~ - tensorflow-gpu>=2.6.0 +- tensorflow-gpu>=2.6.0 # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html From e886ca1fac6eaa0c8c585d2423555859dcb8503e Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 12:45:55 +0100 Subject: [PATCH 08/12] explicit jaxlib installation --- .github/workflows/run_tests.yml | 3 +-- environment_all_backends.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1c34038f..61288e8d 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -56,5 +56,4 @@ jobs: cd torchquad/tests pip install pytest pip install pytest-error-for-skips - pip install --upgrade "jax[cpu]" - python3 -c "import tensorflow" + pytest -ra --error-for-skips diff --git a/environment_all_backends.yml b/environment_all_backends.yml index a902b61e..76663567 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -22,3 +22,4 @@ dependencies: - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html - jax[cuda]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder + - jaxlib From e945534038caa7821b06ae6385a8da759f97871b Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 13:00:07 +0100 Subject: [PATCH 09/12] conda-forge newer tensorflow version --- environment_all_backends.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment_all_backends.yml b/environment_all_backends.yml index 76663567..cd9ecba9 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -17,9 +17,8 @@ dependencies: - numpy>=1.19.5 - cudatoolkit>=11.1 - pytorch>=1.9=*cuda* -- tensorflow-gpu>=2.6.0 +- tensorflow-gpu>=2.10.0 # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html - jax[cuda]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder - - jaxlib From 39689657b5beedbfe02fd911083653112d04918f Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 13:05:14 +0100 Subject: [PATCH 10/12] conda-forge tensorflow cpu version --- environment_all_backends.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_all_backends.yml b/environment_all_backends.yml index cd9ecba9..948a6457 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -17,7 +17,7 @@ dependencies: - numpy>=1.19.5 - cudatoolkit>=11.1 - pytorch>=1.9=*cuda* -- tensorflow-gpu>=2.10.0 +- tensorflow>=2.10.0 # CPU version # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html From 8f5746f85a5308fb9186387ded28ae465c85af39 Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 13:12:07 +0100 Subject: [PATCH 11/12] more cpu versions of packages --- environment_all_backends.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/environment_all_backends.yml b/environment_all_backends.yml index 948a6457..7ba9a726 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -16,9 +16,10 @@ dependencies: # Numerical backend installations with CUDA support where possible: - numpy>=1.19.5 - cudatoolkit>=11.1 -- pytorch>=1.9=*cuda* +- pytorch>=1.9 # CPU version - tensorflow>=2.10.0 # CPU version # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html - - jax[cuda]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder + - jax[cpu]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder + # CPU version From d5e013a9523debd48ecbbef775a031854b8044d4 Mon Sep 17 00:00:00 2001 From: FHof Date: Tue, 3 Jan 2023 13:15:00 +0100 Subject: [PATCH 12/12] new cudatoolkit version --- environment_all_backends.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/environment_all_backends.yml b/environment_all_backends.yml index 7ba9a726..630658bb 100644 --- a/environment_all_backends.yml +++ b/environment_all_backends.yml @@ -15,11 +15,10 @@ dependencies: - tqdm>=4.56.0 # Numerical backend installations with CUDA support where possible: - numpy>=1.19.5 -- cudatoolkit>=11.1 -- pytorch>=1.9 # CPU version -- tensorflow>=2.10.0 # CPU version +- cudatoolkit>=11.8 +- pytorch>=1.9=*cuda* +- tensorflow-gpu>=2.10.0 # jaxlib with CUDA support is not available for conda - pip: - --find-links https://storage.googleapis.com/jax-releases/jax_releases.html - - jax[cpu]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder - # CPU version + - jax[cuda]>=0.2.22 # this will only work on linux. for win see e.g. https://github.com/cloudhan/jax-windows-builder