Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to automate durations files updates #6247

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
0a62b11
Tweak test actions; add durations update action
mudit2812 Sep 9, 2024
c6b2aa8
Add commented sections for workflow triggers
mudit2812 Sep 10, 2024
57084b3
Fix syntax
mudit2812 Sep 10, 2024
bef53ab
Merge branch 'master' into durations-automation
mudit2812 Sep 10, 2024
a6bf30e
Fix matrix for interface-unit-tests
mudit2812 Sep 10, 2024
de63a86
Testing workflow using pull_request trigger
mudit2812 Sep 10, 2024
709fedc
Rename step
mudit2812 Sep 10, 2024
c86c54f
Add codecov token secret
mudit2812 Sep 10, 2024
90bd488
Fix usage of pipeline_mode
mudit2812 Sep 10, 2024
f007892
Add pipeline_mode info
mudit2812 Sep 10, 2024
0c969c3
Remove max-parallel for update-durations pipeline
mudit2812 Sep 10, 2024
f7f7126
Trigger CI
mudit2812 Sep 10, 2024
a8750e9
Update pytest args
mudit2812 Sep 10, 2024
1d70fa9
[skip ci] Update pytest args; remove pull-request trigger
mudit2812 Sep 10, 2024
b34d336
Use github CLI, add back pull_request trigger to test
mudit2812 Sep 10, 2024
2606785
Trying to fix syntax; revert cli use in test workflow
mudit2812 Sep 10, 2024
8262496
Fix gh syntax more; add core team as reviewer
mudit2812 Sep 10, 2024
9a2ee1e
Skip pytest while debugging for fast testing
mudit2812 Sep 10, 2024
4c20c98
Skip tests properly
mudit2812 Sep 10, 2024
7abe0fa
Trigger CI
mudit2812 Sep 10, 2024
be9467e
Trigger CI
mudit2812 Sep 10, 2024
866fdd4
Run tests only if not using update-durations pipeline
mudit2812 Sep 10, 2024
a16316b
Merge branch 'master' into durations-automation
mudit2812 Sep 10, 2024
dbb1797
Change PR body; skip dep installation while testing
mudit2812 Sep 10, 2024
6cc4a30
Change quotes
mudit2812 Sep 10, 2024
b7de0ec
Adding updates to duration files
mudit2812 Sep 10, 2024
16e87bc
Add github token
mudit2812 Sep 10, 2024
147d7c5
Testing push
mudit2812 Sep 10, 2024
9e64081
Trying fix
mudit2812 Sep 10, 2024
e63d5fa
testing one more time
mudit2812 Sep 10, 2024
7fc4168
Final try
mudit2812 Sep 10, 2024
e4168ed
Dummy commits to files
mudit2812 Sep 10, 2024
d809823
Add empty body
mudit2812 Sep 10, 2024
d912927
Update reviewer
mudit2812 Sep 10, 2024
3e491cd
Update reviewer again
mudit2812 Sep 10, 2024
ad51d95
Try again after closing PR
mudit2812 Sep 10, 2024
df6d126
Removed reviewer
mudit2812 Sep 11, 2024
9bb77e7
[skip ci] Final workflow
mudit2812 Sep 11, 2024
afb83b3
Adding back test skip for final PR opening step
mudit2812 Sep 11, 2024
c65f601
Update quotes
mudit2812 Sep 11, 2024
98636f4
Remove body
mudit2812 Sep 11, 2024
e453629
Make changes
mudit2812 Sep 11, 2024
9d8bfa5
Change PR script
mudit2812 Sep 11, 2024
fd3b8cb
Add change
mudit2812 Sep 11, 2024
5e66e05
Finalize workflow
mudit2812 Sep 11, 2024
a5ccbf9
[skip ci] Remove pull request trigger
mudit2812 Sep 11, 2024
f1d55fa
Trigger CI
mudit2812 Sep 13, 2024
2586021
[no ci] bump nightly version
ringo-but-quantum Sep 11, 2024
4cd618c
[no ci] bump nightly version
ringo-but-quantum Sep 12, 2024
1445476
Remove default qubit jax (#6209)
albi3ro Sep 12, 2024
f5f07c4
Fix failing `test_diagonalize_all_measurements` for legacy opmath (#6…
astralcai Sep 12, 2024
46c2652
RC sync for `v0.38.1` to `master` (#6265)
mudit2812 Sep 12, 2024
2fe0f0f
Deprecate`QNode.gradient_fn` (#6244)
albi3ro Sep 12, 2024
341c5bd
[no ci] bump nightly version
ringo-but-quantum Sep 13, 2024
711ec21
deprecate set_shots (#6250)
albi3ro Sep 13, 2024
888c2f5
Fix FABLE template to return the correct result in JIT mode (#6263)
willjmax Sep 13, 2024
b5d8f57
Fix failing test in legacy opmath (#6272)
astralcai Sep 13, 2024
0dde67a
remove default.qubit.autograd (#6210)
albi3ro Sep 13, 2024
037dc88
Deprecate top level access to legacy device base classes (#6238)
albi3ro Sep 13, 2024
2411a8b
[Program Capture] Add pytree support to captured `qml.grad` and `qml.…
dwierichs Sep 15, 2024
bdbd37c
[no ci] bump nightly version
ringo-but-quantum Sep 16, 2024
6423644
Pennylane is compatible with numpy 2.0 (#6061)
EmilianoG-byte Sep 16, 2024
0e38df3
Clean up how `interface` is handled in `QNode` and `qml.execute` (#6225)
astralcai Sep 16, 2024
c0146c4
Updating torch to 2.3.0 (#6258)
PietropaoloFrisoni Sep 16, 2024
f85ebda
[no ci] bump nightly version
ringo-but-quantum Sep 17, 2024
9a02bea
Add `reference.qubit` for testing and reference (#6181)
astralcai Sep 17, 2024
0b01495
Deprecation QubitStateVector (#6172)
KetpuntoG Sep 17, 2024
446312c
PennyLane is compatible with JAX 0.4.28 (#6255)
PietropaoloFrisoni Sep 17, 2024
05d1f31
`qinfo` module deprecations and removals (#5911)
isaacdevlugt Sep 17, 2024
8e4ea49
Miscellaneous deprecations (#6277)
mudit2812 Sep 17, 2024
46df546
Remove `decomp_depth` from `qml.device` constructor (#6234)
albi3ro Sep 17, 2024
64f2175
[no ci] bump nightly version
ringo-but-quantum Sep 18, 2024
3b2f5cb
Remove `simplify` argument from `Hamiltonian` and `LinearCombination`…
mudit2812 Sep 18, 2024
83182a1
Remove some end-to-end `default_qubit_native_mcm` tests (#6246)
obliviateandsurrender Sep 18, 2024
1d6b859
Deprecate basis state preparation (#6116)
KetpuntoG Sep 18, 2024
e2903e6
Methods to commute terms in Fermi objects (#6196)
willjmax Sep 18, 2024
4f31588
Add `work_wires` parameter to `qml.MultiControlledX` docstring signat…
justinpickering Sep 18, 2024
4f40f5a
[no ci] bump nightly version
ringo-but-quantum Sep 19, 2024
6d48958
Remove DefaultQubitLegacy 🎉 (#6266)
albi3ro Sep 19, 2024
c80a877
Unit tests for `simulate_one_shot_native_mcm (#6124)
astralcai Sep 19, 2024
300da86
Add `VnEntanglementEntropyMP` measurement process (#6270)
mudit2812 Sep 19, 2024
eaef556
`devices.qubit.measure` uses `csr_dot_products` only when it is usabl…
astralcai Sep 19, 2024
420ceb8
Add unit tests for `simulate_tree_mcm` (#6231)
obliviateandsurrender Sep 19, 2024
d0f124c
Correct some typos across the codebase (#6280)
dwierichs Sep 20, 2024
7dac0d8
[no ci] bump nightly version
ringo-but-quantum Sep 20, 2024
f3b6d3a
Create a workflow to test PennyLane with NumPy 1.26 (#6275)
PietropaoloFrisoni Sep 20, 2024
b6216ee
Add emery and Haldane model Hamiltonians (#6201)
ddhawan11 Sep 20, 2024
3584d94
Add additional lattice models (#6237)
ddhawan11 Sep 20, 2024
081b58d
Added Kitaev model Hamiltonian (#6174)
ddhawan11 Sep 20, 2024
6d7eb0b
Update casting for `apply_operation` (#6268)
mudit2812 Sep 20, 2024
221afdb
Update durations (#6289)
mudit2812 Sep 20, 2024
e9c829d
Build hamiltonians from custom lattices (#6226)
austingmhuang Sep 20, 2024
e4b0bbe
[no ci] bump nightly version
ringo-but-quantum Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59,925 changes: 28,978 additions & 30,947 deletions .github/workflows/core_tests_durations.json → .github/durations/core_tests_durations.json

Large diffs are not rendered by default.

16,416 changes: 16,416 additions & 0 deletions .github/durations/jax_tests_durations.json

Large diffs are not rendered by default.

5,057 changes: 5,057 additions & 0 deletions .github/durations/tf_tests_durations.json

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions .github/workflows/install_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,35 @@ inputs:
description: The version of Python to use in order to run unit tests
required: false
default: '3.10'
install_numpy_1:
description: Indicate if numpy 1 should be installed or not
required: false
type: boolean
default: false
install_jax:
description: Indicate if JAX should be installed or not
required: false
default: 'true'
jax_version:
description: The version of JAX to install for any job that requires JAX
required: false
default: 0.4.23
default: '0.4.28'
install_tensorflow:
description: Indicate if TensorFlow should be installed or not
required: false
default: 'true'
tensorflow_version:
description: The version of TensorFlow to install for any job that requires TensorFlow
required: false
default: 2.16.0
default: '2.16.0'
install_pytorch:
description: Indicate if PyTorch should be installed or not
required: false
default: 'true'
pytorch_version:
description: The version of PyTorch to install for any job that requires PyTorch
required: false
default: 2.3.0
default: '2.3.0'
install_pennylane_lightning_master:
description: Indicate if PennyLane-Lightning should be installed from the master branch
required: false
Expand Down Expand Up @@ -67,6 +72,11 @@ runs:
pip install -r requirements-ci.txt --upgrade
pip install -r requirements-dev.txt --upgrade

- name: Install numpy 1 version
shell: bash
if: inputs.install_numpy_1 == 'true'
run: pip install "numpy==1.26.4"

- name: Install PyTorch
shell: bash
if: inputs.install_pytorch == 'true'
Expand All @@ -86,7 +96,7 @@ runs:
if: inputs.install_jax == 'true'
env:
JAX_VERSION: ${{ inputs.jax_version != '' && format('=={0}', inputs.jax_version) || '' }}
run: pip install "jax${{ env.JAX_VERSION}}" "jaxlib${{ env.JAX_VERSION }}" scipy~=1.12.0
run: pip install "jax${{ env.JAX_VERSION}}" "jaxlib${{ env.JAX_VERSION }}"

- name: Install additional PIP packages
shell: bash
Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/interface-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: true
type: string
pipeline_mode:
description: The pipeline mode can be unit-tests, benchmarks, or reference-benchmarks
description: The pipeline mode can be unit-tests, update-durations, benchmarks, or reference-benchmarks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new pipeline mode is used to selectively run jobs that are needed for updating the durations files.

required: false
type: string
default: 'unit-tests'
Expand Down Expand Up @@ -42,11 +42,6 @@ on:
required: false
type: string
default: "False"
pytest_store_durations:
description: Whether to store artifacts for test durations
required: false
type: boolean
default: false
Comment on lines -45 to -49
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this in favour of the new update-durations pipeline mode.


jobs:
setup-ci-load:
Expand Down Expand Up @@ -212,7 +207,7 @@ jobs:
|| fromJSON(needs.setup-ci-load.outputs.matrix-max-parallel).default
}}
matrix:
group: [1, 2, 3]
group: ${{ inputs.pipeline_mode == 'update-durations' && fromJSON('[1]') || fromJSON('[1, 2, 3]') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't split the jobs for tensorflow, jax, and core tests when updating durations. This way, rather than generating multiple artifacts for each job, we generate a single unified one that can be used as the updated durations file.

python-version: >-
${{
fromJSON(needs.setup-ci-load.outputs.python-version).tf-tests
Expand All @@ -233,8 +228,7 @@ jobs:
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: tf and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 3 --group ${{ matrix.group }}
pytest_durations_file_path: '.github/workflows/tf_tests_durations.json'
pytest_store_durations: ${{ inputs.pytest_store_durations }}
pytest_durations_file_path: '.github/durations/tf_tests_durations.json'
additional_pip_packages: pytest-split
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'tf.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}
Expand All @@ -250,7 +244,7 @@ jobs:
|| fromJSON(needs.setup-ci-load.outputs.matrix-max-parallel).default
}}
matrix:
group: [1, 2, 3, 4, 5]
group: ${{ inputs.pipeline_mode == 'update-durations' && fromJSON('[1]') || fromJSON('[1, 2, 3, 4, 5]') }}
python-version: >-
${{
fromJSON(needs.setup-ci-load.outputs.python-version).jax-tests
Expand All @@ -270,8 +264,8 @@ jobs:
install_pennylane_lightning_master: true
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: jax and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 5 --group ${{ matrix.group }}
pytest_durations_file_path: '.github/workflows/jax_tests_durations.json'
pytest_additional_args: --dist=loadscope --splits 5 --group ${{ matrix.group }}
pytest_durations_file_path: '.github/durations/jax_tests_durations.json'
pytest_store_durations: ${{ inputs.pytest_store_durations }}
additional_pip_packages: pytest-split
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'jax.txt' || '' }}
Expand All @@ -288,7 +282,7 @@ jobs:
|| fromJSON(needs.setup-ci-load.outputs.matrix-max-parallel).default
}}
matrix:
group: [1, 2, 3, 4, 5]
group: ${{ inputs.pipeline_mode == 'update-durations' && fromJSON('[1]') || fromJSON('[1, 2, 3, 4, 5]') }}
python-version: >-
${{
fromJSON(needs.setup-ci-load.outputs.python-version).core-tests
Expand All @@ -309,8 +303,7 @@ jobs:
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: core and not qcut and not finite-diff and not param-shift
pytest_additional_args: --splits 5 --group ${{ matrix.group }}
pytest_durations_file_path: '.github/workflows/core_tests_durations.json'
pytest_store_durations: ${{ inputs.pytest_store_durations }}
pytest_durations_file_path: '.github/durations/core_tests_durations.json'
additional_pip_packages: pytest-split
requirements_file: ${{ github.event_name == 'schedule' && strategy.job-index == 0 && 'core.txt' || '' }}
disable_new_opmath: ${{ inputs.disable_new_opmath }}
Expand Down Expand Up @@ -379,8 +372,7 @@ jobs:
# catalyst requires the latest version of pennylane that is about to be released.
# Installing catalyst after pennylane to make sure that the latest catalyst is used.
install_catalyst_nightly: true
# using lightning master does not work for the tests with external libraries
install_pennylane_lightning_master: false
install_pennylane_lightning_master: true
pytest_coverage_flags: ${{ inputs.pytest_coverage_flags }}
pytest_markers: external
additional_pip_packages: pyzx matplotlib stim quimb mitiq pennylane-qiskit ply
Expand Down
Loading