Skip to content
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

Make distributed_test use tf-nightly by default. #19404

Merged
merged 1 commit into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions tensorflow/tools/dist_test/local_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ die() {
# Configurations
DOCKER_IMG_NAME="tensorflow/tf-dist-test-local-cluster"

# Use TensorFlow v1.5.0 for Python 2.7 and CPU only as we set num_gpus to 0 in the below
DEFAULT_WHL_FILE_LOCATION="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.5.0-cp27-none-linux_x86_64.whl"

# Parse input arguments
LEAVE_CONTAINER_RUNNING=0
MODEL_NAME=""
Expand All @@ -77,8 +74,7 @@ SYNC_REPLICAS_FLAG=""

WHL_FILE_LOCATION=${1}
if [[ -z "${WHL_FILE_LOCATION}" ]]; then
WHL_FILE_LOCATION=${DEFAULT_WHL_FILE_LOCATION}
echo "use default whl file location"
echo "WARNING: No wheel url passed. Will use latest tf-nightly cpu p2 wheel."
fi

while true; do
Expand Down Expand Up @@ -131,7 +127,11 @@ echo "Building in temporary directory: ${BUILD_DIR}"
cp -r ${DIR}/* "${BUILD_DIR}"/ || \
die "Failed to copy files to ${BUILD_DIR}"

if [[ $WHL_FILE_LOCATION =~ 'http://' || $WHL_FILE_LOCATION =~ 'https://' ]]; then
# Download whl file into the build context directory.
if [[ -z "${WHL_FILE_LOCATION}" ]]; then
pip2 download --no-deps tf-nightly
cp tf-nightly-*.whl "${BUILD_DIR}"/tensorflow-none-any.whl
elif [[ $WHL_FILE_LOCATION =~ 'http://' || $WHL_FILE_LOCATION =~ 'https://' ]]; then
# Download whl file into the build context directory.
wget -P "${BUILD_DIR}" "${WHL_FILE_LOCATION}" || \
die "Failed to download tensorflow whl file from URL: ${WHL_FILE_LOCATION}"
Expand Down
11 changes: 8 additions & 3 deletions tensorflow/tools/dist_test/remote_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fi
# Parse command-line arguments.
WHL_URL=${1}
if [[ -z "${WHL_URL}" ]]; then
die "whl URL is not specified"
echo "WARNING: No wheel url passed. Will use latest tf-nightly cpu p2 wheel."
fi

# Create docker build context directory.
Expand All @@ -121,8 +121,13 @@ cp -r ${DIR}/* ${BUILD_DIR}/ || \
die "Failed to copy files to ${BUILD_DIR}"

# Download whl file into the build context directory.
wget -P "${BUILD_DIR}" ${WHL_URL} || \
die "Failed to download tensorflow whl file from URL: ${WHL_URL}"
if [[ -z "${WHL_URL}" ]]; then
pip2 download --no-deps tf-nightly
cp tf-nightly-*.whl "${BUILD_DIR}"/tensorflow-none-any.whl
else
wget -P "${BUILD_DIR}" ${WHL_URL} || \
die "Failed to download tensorflow whl file from URL: ${WHL_URL}"
fi

# Build docker image for test.
docker build ${NO_CACHE_FLAG} \
Expand Down