-
Notifications
You must be signed in to change notification settings - Fork 615
77 lines (69 loc) · 3.3 KB
/
interface-dependency-versions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# There are dependencies that we install on a sub-set of Tests when running the PennyLane Unit Tests.
# Since they are not installed in every instance, they are omitted from requirements-ci.txt.
# However, we want a single source of truth for the versions of these dependencies.
# This workflow maintains a single source of truth for the versions of these dependencies.
name: Determine Package Versions to use for testing certain PennyLane Interfaces
on:
workflow_call:
inputs:
job_runner_name:
description: The name of the runner to use for the job
required: false
type: string
default: 'ubuntu-latest'
jax_version:
description: The version of JAX to use for testing
required: false
type: string
default: '0.4.28'
tensorflow_version:
description: The version of TensorFlow to use for testing
required: false
type: string
default: '2.16.0'
torch_version:
description: The version of PyTorch to use for testing
required: false
type: string
default: '2.3.0'
outputs:
jax-version:
description: The version of JAX to use
value: ${{ jobs.default-dependency-versions.outputs.jax-version }}
tensorflow-version:
description: The version of TensorFlow to use
value: ${{ jobs.default-dependency-versions.outputs.tensorflow-version }}
pytorch-version:
description: The version of PyTorch to use
value: ${{ jobs.default-dependency-versions.outputs.pytorch-version }}
catalyst-nightly:
description: The nightly version of Catalyst to use
value: ${{ jobs.default-dependency-versions.outputs.catalyst-nightly }}
pennylane-lightning-latest:
description: The latest version of PennyLane-Lightning to use
value: ${{ jobs.default-dependency-versions.outputs.pennylane-lightning-latest }}
jobs:
default-dependency-versions:
runs-on: ${{ inputs.job_runner_name }}
steps:
- name: Default JAX Version
id: jax
run: echo "version=${{ inputs.jax_version }}" >> $GITHUB_OUTPUT
- name: Default Tensorflow Version
id: tensorflow
run: echo "version=${{ inputs.tensorflow_version }}" >> $GITHUB_OUTPUT
- name: Default PyTorch Version
id: pytorch
run: echo "version=${{ inputs.torch_version }}" >> $GITHUB_OUTPUT
- name: Nightly Catalyst Version
id: catalyst
run: echo "nightly=--index https://test.pypi.org/simple/ --prerelease=allow --upgrade-package PennyLane-Catalyst PennyLane-Catalyst" >> $GITHUB_OUTPUT
- name: PennyLane-Lightning Latest Version
id: pennylane-lightning
run: echo "latest=--index https://test.pypi.org/simple/ --prerelease=allow --upgrade-package PennyLane-Lightning PennyLane-Lightning" >> $GITHUB_OUTPUT
outputs:
jax-version: jax==${{ steps.jax.outputs.version }} jaxlib==${{ steps.jax.outputs.version }}
tensorflow-version: tensorflow~=${{ steps.tensorflow.outputs.version }} tf-keras~=${{ steps.tensorflow.outputs.version }}
pytorch-version: torch==${{ steps.pytorch.outputs.version }}
catalyst-nightly: ${{ steps.catalyst.outputs.nightly }}
pennylane-lightning-latest: ${{ steps.pennylane-lightning.outputs.latest }}