Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Commit 301e41c

Browse files
author
Pooya Davoodi
committed
Version 0.1alpha2.
Release 0.1-alpha2 Fixes several failures in TensorFlow unit tests and other bug fixes. Resolves #50 Resolves #99 Resolves reported installation issues. Adds release notes.
1 parent 8df2f12 commit 301e41c

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This pre-release delivers hardware-accelerated TensorFlow and TensorFlow Addons
77

88
### CURRENT RELEASE
99

10-
- 0.1-alpha1
10+
- 0.1-alpha2
1111

1212
### SUPPORTED VERSIONS
1313

Diff for: RELEASE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release 0.1-alpha2
2+
3+
* Fixes several failures in TensorFlow unit tests and other bug fixes.
4+
* Resolves <https://github.com/apple/tensorflow_macos/issues/50>
5+
* Resolves <https://github.com/apple/tensorflow_macos/issues/99>
6+
* Resolves reported installation issues.
7+
* Adds release notes.

Diff for: scripts/download_and_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
VERSION=0.1alpha1
5+
VERSION=0.1alpha2
66
INSTALLER_PACKAGE=tensorflow_macos-$VERSION.tar.gz
77
INSTALLER_PATH=https://github.com/apple/tensorflow_macos/releases/download/v$VERSION/$INSTALLER_PACKAGE
88
INSTALLER_SCRIPT=install_venv.sh

Diff for: scripts/install_venv.sh

+24-16
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,14 @@ set -e
4646
arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_11_0_x86_64.whl
4747
grpcio-1.33.2-cp38-cp38-macosx_11_0_x86_64.whl
4848
h5py-2.10.0-cp38-cp38-macosx_11_0_x86_64.whl
49-
scipy-1.5.4-cp38-cp38-macosx_11_0_x86_64.whl
50-
tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_11_0_x86_64.whl )
49+
scipy-1.5.4-cp38-cp38-macosx_11_0_x86_64.whl )
5150

5251
arch_list_arm64=( numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
5352
grpcio-1.33.2-cp38-cp38-macosx_11_0_arm64.whl
54-
h5py-2.10.0-cp38-cp38-macosx_11_0_arm64.whl
55-
tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_11_0_arm64.whl )
53+
h5py-2.10.0-cp38-cp38-macosx_11_0_arm64.whl )
5654

5755

58-
tensorflow_version=0.1a1
56+
tensorflow_version=0.1a2
5957

6058

6159
function usage() {
@@ -183,7 +181,7 @@ tf_install_message=""
183181

184182
# Now, see if a virtual environment was given as an argument.
185183
if [[ -e $virtual_env ]] ; then
186-
if [[ ! -d "$virtual_env" ]] || [[ ! -e "$virtual_env/bin/activate" ]] ; then
184+
if [[ ! -d "$virtual_env" ]] || [[ ! -e "$virtual_env/bin/python" ]] ; then
187185
error_exit "$virtual_env does not seem to be a virtual environment. Please specify a new directory or an existing Python 3.8 virtual environment. "
188186
fi
189187
create_venv=0
@@ -307,7 +305,11 @@ if [[ $create_venv == 1 ]] ; then
307305
"$python_bin" -m venv "$virtual_env"
308306
fi
309307

310-
. "$virtual_env/bin/activate"
308+
# Test for existence here -- If it's a conda environment that's already activated, this allows the script to still work.
309+
if [[ -e "$virtual_env/bin/activate" ]] ; then
310+
. "$virtual_env/bin/activate"
311+
fi
312+
311313
python_bin="$virtual_env/bin/python3"
312314

313315
export MACOSX_DEPLOYMENT_TARGET=11.0
@@ -319,24 +321,27 @@ fi
319321

320322
# Upgrade pip and base packages
321323
echo ">> Installing and upgrading base packages."
322-
"$python_bin" -m pip install --force pip==20.2.4 wheel setuptools cached-property six
324+
"$python_bin" -m pip install --force pip==20.2.4 wheel setuptools cached-property six packaging
323325

324326
echo ">> Installing bundled binary dependencies."
325327

326328
# Note: As soon python packaging supports macOS 11.0 in full, we can remove the -t hackery.
327329
for f in ${packages[@]} ; do
328-
"$python_bin" -m pip install --upgrade -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies --force "$package_dir/$f"
330+
"$python_bin" -m pip install --upgrade -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies --force "$package_dir/$f"
329331
done
330332

331333
# Manually install all the other dependencies.
332334
echo ">> Installing dependencies."
333335
"$python_bin" -m pip install absl-py astunparse flatbuffers gast google_pasta keras_preprocessing opt_einsum protobuf tensorflow_estimator termcolor typing_extensions wrapt wheel tensorboard typeguard
334336

335-
# Install some convenience tools
337+
# Install some convenience tools.
336338
"$python_bin" -m pip install ipython
337339

338-
# Install the tensorflow wheel itself
339-
"$python_bin" -m pip install --upgrade --force -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl
340+
# Install the tensorflow wheel itself.
341+
"$python_bin" -m pip install --upgrade --force -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl
342+
343+
# Install the tensorflow-addons wheel.
344+
"$python_bin" -m pip install --upgrade --force -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_addons_macos*-cp38-cp38-macosx_11_0_$arch.whl
340345

341346
# Finally, upgrade pip to give the developers the correct version.
342347
"$python_bin" -m pip install --upgrade pip
@@ -345,10 +350,13 @@ echo '##########################################################################
345350
echo
346351
echo "TensorFlow and TensorFlow Addons with ML Compute for macOS 11.0 successfully installed."
347352
echo
348-
echo "To begin, activate the virtual environment:"
349-
echo
350-
echo " . \"$virtual_env/bin/activate\" "
351-
echo
353+
354+
if [[ -e "$virtual_env/bin/activate" ]] ; then
355+
echo "To begin, activate the virtual environment:"
356+
echo
357+
echo " . \"$virtual_env/bin/activate\" "
358+
echo
359+
fi
352360

353361

354362

0 commit comments

Comments
 (0)