Skip to content

Commit

Permalink
Removing double NumPy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PietropaoloFrisoni committed Sep 16, 2024
1 parent ca738e6 commit 28dfaac
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 80 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/install_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ inputs:
description: The version of Python to use in order to run unit tests
required: false
default: '3.10'
install_numpy_2:
description: Indicate if numpy 2.0+ should be installed or not
required: false
type: boolean
default: false
numpy_2_version:
description: The version of numpy 2.0 to use in order to run unit tests
required: false
type: string
default: '2.0.0'
install_jax:
description: Indicate if JAX should be installed or not
required: false
Expand Down Expand Up @@ -77,13 +67,6 @@ runs:
pip install -r requirements-ci.txt --upgrade
pip install -r requirements-dev.txt --upgrade
- name: Install numpy 2.0 version
shell: bash
if: inputs.install_numpy_2 == 'true'
env:
NUMPY2_VERSION: ${{ inputs.numpy_2_version != '' && format('~={0}', inputs.numpy_2_version) || '' }}
run: pip install "numpy${{ env.NUMPY2_VERSION }}"

- name: Install PyTorch
shell: bash
if: inputs.install_pytorch == 'true'
Expand Down Expand Up @@ -136,4 +119,4 @@ runs:
uses: actions/upload-artifact@v4
with:
name: frozen-${{ inputs.requirements_file }}
path: ${{ inputs.requirements_file }}
path: ${{ inputs.requirements_file }}
74 changes: 25 additions & 49 deletions .github/workflows/interface-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).torch-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'torch-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: torch-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: torch-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: core-interfaces-coverage-torch-${{ matrix.python-version }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: core-interfaces-coverage-torch-${{ matrix.python-version }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: false
install_pytorch: true
Expand All @@ -187,16 +185,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).autograd-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'autograd-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: autograd-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: autograd-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: core-interfaces-coverage-autograd-${{ matrix.python-version }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: core-interfaces-coverage-autograd-${{ matrix.python-version }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: false
install_pytorch: false
Expand All @@ -222,16 +218,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).tf-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'tf-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: tf-tests (${{ matrix.group }}, ${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: tf-tests (${{ matrix.group }}, ${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: core-interfaces-coverage-tf-${{ matrix.python-version }}-${{ matrix.group }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: core-interfaces-coverage-tf-${{ matrix.python-version }}-${{ matrix.group }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: true
install_pytorch: false
Expand Down Expand Up @@ -262,16 +256,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).jax-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'jax-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: jax-tests (${{ matrix.group }}, ${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: jax-tests (${{ matrix.group }}, ${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: core-interfaces-coverage-jax-${{ matrix.python-version }}-${{ matrix.group }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: core-interfaces-coverage-jax-${{ matrix.python-version }}-${{ matrix.group }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: true
install_tensorflow: false
install_pytorch: false
Expand Down Expand Up @@ -302,16 +294,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).core-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'core-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: core-tests (${{ matrix.group }}, ${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: core-tests (${{ matrix.group }}, ${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: core-interfaces-coverage-core-${{ matrix.python-version }}-${{ matrix.group }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: core-interfaces-coverage-core-${{ matrix.python-version }}-${{ matrix.group }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: false
install_pytorch: false
Expand Down Expand Up @@ -341,16 +331,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).all-interfaces-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'all-interfaces-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: all-interfaces-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: all-interfaces-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: all-interfaces-coverage-${{ matrix.numpy-2-install }}
coverage_artifact_name: all-interfaces-coverage
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: true
install_tensorflow: true
install_pytorch: true
Expand All @@ -376,16 +364,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).external-libraries-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'external-libraries-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: external-libraries-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: external-libraries-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: external-libraries-tests-coverage-${{ matrix.numpy-2-install }}
coverage_artifact_name: external-libraries-tests-coverage
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: true
install_tensorflow: true
install_pytorch: false
Expand Down Expand Up @@ -416,16 +402,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).qcut-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'qcut-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: qcut-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: qcut-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: qcut-coverage-${{ matrix.numpy-2-install }}
coverage_artifact_name: qcut-coverage
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: true
install_tensorflow: true
install_pytorch: true
Expand All @@ -451,16 +435,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).qchem-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'qchem-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: qchem-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: qchem-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: qchem-coverage-${{ matrix.numpy-2-install }}
coverage_artifact_name: qchem-coverage
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: false
install_pytorch: false
Expand Down Expand Up @@ -488,16 +470,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).gradients-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'gradients-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: gradients-tests (${{ matrix.config.suite }}, ${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: gradients-tests (${{ matrix.config.suite }}, ${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: gradients-${{ matrix.config.suite }}-coverage-${{ matrix.numpy-2-install }}
coverage_artifact_name: gradients-${{ matrix.config.suite }}-coverage
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: true
install_tensorflow: true
install_pytorch: true
Expand All @@ -522,16 +502,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).data-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'data-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: data-tests (${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: data-tests (${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: data-coverage-${{ matrix.python-version }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: data-coverage-${{ matrix.python-version }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: false
install_tensorflow: false
install_pytorch: false
Expand Down Expand Up @@ -564,16 +542,14 @@ jobs:
fromJSON(needs.setup-ci-load.outputs.python-version).device-tests
|| fromJSON(needs.setup-ci-load.outputs.python-version).default
}}
numpy-2-install: [true, false]
if: ${{ !contains(fromJSON(needs.setup-ci-load.outputs.jobs-to-skip), 'device-tests') }}
uses: ./.github/workflows/unit-test.yml
with:
job_name: device-tests (${{ matrix.config.device }}, ${{ matrix.config.shots }}, ${{ matrix.python-version }}, numpy 2.0 ${{ matrix.numpy-2-install }})
job_name: device-tests (${{ matrix.config.device }}, ${{ matrix.config.shots }}, ${{ matrix.python-version }})
branch: ${{ inputs.branch }}
coverage_artifact_name: devices-coverage-${{ matrix.config.device }}-${{ matrix.config.shots }}-${{ matrix.numpy-2-install }}
coverage_artifact_name: devices-coverage-${{ matrix.config.device }}-${{ matrix.config.shots }}
python_version: ${{ matrix.python-version }}
pipeline_mode: ${{ inputs.pipeline_mode }}
install_numpy_2: ${{ matrix.numpy-2-install }}
install_jax: ${{ !contains(matrix.config.skip_interface, 'jax') }}
install_tensorflow: ${{ !contains(matrix.config.skip_interface, 'tf') }}
install_pytorch: ${{ !contains(matrix.config.skip_interface, 'torch') }}
Expand Down Expand Up @@ -624,4 +600,4 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.codecov_token }}
fail_ci_if_error: true # upload errors should be caught early
fail_ci_if_error: true # upload errors should be caught early
14 changes: 1 addition & 13 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ on:
required: false
type: string
default: '3.10'
install_numpy_2:
description: Indicate if numpy 2.0+ should be installed or not
required: false
type: boolean
default: false
numpy_2_version:
description: The version of numpy 2.0 to use in order to run unit tests
required: false
type: string
default: '2.0'
pipeline_mode:
description: The pipeline mode can be unit-tests, benchmarks, or reference-benchmark
required: false
Expand Down Expand Up @@ -168,8 +158,6 @@ jobs:
uses: ./.github/workflows/install_deps
with:
python_version: ${{ inputs.python_version }}
numpy_2_version: ${{ inputs.numpy_2_version }}
install_numpy_2: ${{ inputs.install_numpy_2 }}
install_pytorch: ${{ inputs.install_pytorch }}
install_tensorflow: ${{ inputs.install_tensorflow }}
install_jax: ${{ inputs.install_jax }}
Expand Down Expand Up @@ -255,4 +243,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ${{ steps.benchmark_name.outputs.benchmark_name }}-benchmarks
path: ${{ github.workspace }}/benchmark_results
path: ${{ github.workspace }}/benchmark_results

0 comments on commit 28dfaac

Please sign in to comment.