-
Notifications
You must be signed in to change notification settings - Fork 603
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
Changes from all commits
0a62b11
c6b2aa8
57084b3
bef53ab
a6bf30e
de63a86
709fedc
c86c54f
90bd488
f007892
0c969c3
f7f7126
a8750e9
1d70fa9
b34d336
2606785
8262496
9a2ee1e
4c20c98
7abe0fa
be9467e
866fdd4
a16316b
dbb1797
6cc4a30
b7de0ec
16e87bc
147d7c5
9e64081
e63d5fa
7fc4168
e4168ed
d809823
d912927
3e491cd
ad51d95
df6d126
9bb77e7
afb83b3
c65f601
98636f4
e453629
9d8bfa5
fd3b8cb
5e66e05
a5ccbf9
f1d55fa
2586021
4cd618c
1445476
f5f07c4
46c2652
2fe0f0f
341c5bd
711ec21
888c2f5
b5d8f57
0dde67a
037dc88
2411a8b
bdbd37c
6423644
0e38df3
c0146c4
f85ebda
9a02bea
0b01495
446312c
05d1f31
8e4ea49
46df546
64f2175
3b2f5cb
83182a1
1d6b859
e2903e6
4f31588
4f40f5a
6d48958
c80a877
300da86
eaef556
420ceb8
d0f124c
7dac0d8
f3b6d3a
b6216ee
3584d94
081b58d
6d7eb0b
221afdb
e9c829d
e4b0bbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
required: false | ||
type: string | ||
default: 'unit-tests' | ||
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this in favour of the new |
||
|
||
jobs: | ||
setup-ci-load: | ||
|
@@ -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]') }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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 }} | ||
|
@@ -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 | ||
|
@@ -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' || '' }} | ||
|
@@ -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 | ||
|
@@ -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 }} | ||
|
@@ -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 | ||
|
There was a problem hiding this comment.
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.