Skip to content

Commit edb2827

Browse files
committed
Fix pip ResolutionTooDeep
1 parent a3f9e0e commit edb2827

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run",
3-
"revision": 3
3+
"revision": 9
44
}

sdks/python/apache_beam/testing/benchmarks/cloudml/requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
# limitations under the License.
1616
#
1717

18-
dill==0.4.1
19-
tfx_bsl==1.16.1
20-
tensorflow-transform==1.16.0
21-
tensorflow>=2.16,<2.17
18+
# Core TFT dependencies with version bounds
19+
tfx_bsl>=1.15,<1.17
20+
tensorflow-transform>=1.15,<1.17
21+
tensorflow>=2.15,<2.16
2222
numpy>=1.22.0,<2.0
23-
tensorflow-metadata>=1.16.1,<1.17.0
23+
tensorflow-metadata>=1.15,<1.16
2424
pyarrow>=10,<11
25-
tensorflow-serving-api>=2.16.1,<2.20
26-
tf-keras>=2.16.0,<2.17
25+
tensorflow-serving-api>=2.15,<2.16
26+
tf-keras>=2.15,<2.16

sdks/python/test-suites/dataflow/common.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,9 @@ task installTFTRequirements {
573573
exec {
574574
workingDir "$rootProject.projectDir/sdks/python/apache_beam/testing/benchmarks/cloudml/"
575575
executable 'sh'
576-
// installGcpTest already installed apache-beam[gcp]. tensorflow-transform also
577-
// lists that dependency, so a plain pip install -r can re-resolve the GCP extra
578-
// and hit ResolutionTooDeep. Install TFT with --no-deps instead.
579-
args '-c', ". ${envdir}/bin/activate && " +
580-
"grep -v '^tensorflow-transform' requirements.txt > /tmp/cloudml_tft_base_requirements.txt && " +
581-
"pip install -r /tmp/cloudml_tft_base_requirements.txt && " +
582-
"pip install --no-deps tensorflow-transform==1.16.0"
576+
// Use constraints file to pin versions while allowing pip to
577+
// resolve compatible versions within the specified ranges in requirements.txt
578+
args '-c', ". ${envdir}/bin/activate && pip install -c constraints.txt -r requirements.txt"
583579
}
584580
}
585581
}

0 commit comments

Comments
 (0)