Skip to content

Commit 6c36fbc

Browse files
authored
Merge pull request #677 from sampathweb/use-specific-tf-ver-pip-build
Use TENSORFLOW_VERSION when available during pip_build script
2 parents 7157b54 + 17d97de commit 6c36fbc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pip_build.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,14 +447,17 @@ def test_wheel(wheel_path, expected_version, requirements_path):
447447
"tf_keras.experimental",
448448
]
449449
checks = ";".join(symbols_to_check)
450-
# Uninstall `keras-nightly` after installing requirements
450+
# Use Env var `TENSORFLOW_VERSION` for specific TF version to use in release
451+
# Uninstall `keras` after installing requirements
451452
# otherwise both will register `experimentalOptimizer` and test will fail.
452453
script = (
453454
"#!/bin/bash\n"
454455
"virtualenv kenv\n"
455456
f"source {os.path.join('kenv', 'bin', 'activate')}\n"
456457
f"pip3 install -r {requirements_path}\n"
457-
"pip3 uninstall -y keras-nightly\n"
458+
"pip3 uninstall -y tensorflow tf-nightly\n"
459+
'pip3 install "${TENSORFLOW_VERSION:-tf-nightly}"\n'
460+
"pip3 uninstall -y keras keras-nightly\n"
458461
f"pip3 install {wheel_path} --force-reinstall\n"
459462
f"python3 -c 'import tf_keras;{checks};print(tf_keras.__version__)'\n"
460463
)

0 commit comments

Comments
 (0)