Commit 0d750bc
authored
Add support for TensorFlow 2.17 (#974)
Summary
- Update TensorFlow Quantum build to support TensorFlow 2.17.1.
- Align Eigen with TensorFlow 2.17.1’s pinned revision to fix
Tensor/Tensor.h build incompatibility.
- Define essential requirements in `requirements.in` and use
`pip-compile` to produce `requirements.txt`
Key changes
- WORKSPACE:
- bump `@org_tensorflow` to 2.17.1
- add lightweight alias repo (pypi_setuptools) to satisfy TF’s
@pypi_setuptools reference when rules_python generates
@pypi__setuptools.
- `requirements.in`:
- set of requirements needed for building TFQ and running test scripts
- `requirements.txt` is produced by running `pip-compile --upgrade
--generate-hashes -o requirements.txt requirements.in`
Testing
- Linux/Ubuntu 22.04 (Docker), Python 3.11, Bazelisk → Bazel 6.5.0
- `bazel build ... release:build_pip_package` succeeds
- Unit tests (`scripts/test_all.sh` &
`./scripts/ci_validate_tutorials.sh`) pass
- Wheel installs and imports with TF 2.17.1 + tf-keras 2.17.0, Cirq
1.3.0, NumPy 1.26.4
Notes
- This keeps TFQ on Keras 2 path; Keras 3 migration can be handled in a
a future PR.
- This changes will help on the incoming upgrades to 2.20.1 parent 49d7294 commit 0d750bc
6 files changed
Lines changed: 1711 additions & 127 deletions
File tree
- release
- third_party/pypi_setuptools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | | - | |
56 | | - | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
| 57 | + | |
62 | 58 | | |
63 | 59 | | |
64 | | - | |
65 | | - | |
| 60 | + | |
66 | 61 | | |
67 | | - | |
68 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | | - | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
122 | | - | |
123 | 120 | | |
124 | 121 | | |
125 | 122 | | |
| 123 | + | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
0 commit comments