Skip to content

Commit

Permalink
Bump tensorflow to 2.16.1 and tensorstore to >= 0.1.56.
Browse files Browse the repository at this point in the history
  • Loading branch information
markblee committed May 21, 2024
1 parent c93e8e3 commit ea4e284
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
3 changes: 1 addition & 2 deletions axlearn/cloud/gcp/vertexai_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from google.cloud.aiplatform import initializer
from google.cloud.aiplatform.tensorboard import uploader, uploader_utils
from google.cloud.aiplatform.utils import TensorboardClientWithOverride
from tensorboard.uploader import util

_VERTEXAI_INSTALLED = True
except (ImportError, ModuleNotFoundError):
Expand Down Expand Up @@ -74,7 +73,7 @@ def _start_vertexai_tensorboard(*, project_id: str, region: str, resource_name:
event_file_inactive_secs=None,
verbosity=0,
run_name_prefix=None,
logdir_poll_rate_limiter=util.RateLimiter(interval_secs=30),
logdir_poll_rate_limiter=uploader_utils.RateLimiter(interval_secs=30),
)
tb_uploader.create_experiment()
tb_uploader.start_uploading()
Expand Down
2 changes: 1 addition & 1 deletion axlearn/common/quantizer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Licensed under the Apache License, Version 2.0 (the "License").

"""Tests quantization layers and metrics."""

# pylint: disable=no-self-use,wrong-import-position,missing-module-docstring
from typing import List

Expand Down Expand Up @@ -211,7 +212,6 @@ def test_forward(
),
shapes(layer_params),
)
# pylint: disable-next=protected-access
with prng_impl("threefry2x32"):
proj_key = _create_prngkeyarray([3077990774, 2166202870])
codebook_key = _create_prngkeyarray([791337683, 1373966058])
Expand Down
4 changes: 2 additions & 2 deletions axlearn/vision/augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
Reference:
https://github.com/tensorflow/models/blob/master/official/legacy/image_classification/augment.py
"""

# pylint: disable=too-many-lines
import math
from typing import Any, List, Optional, Sequence, Text, Tuple, Union

import tensorflow as tf
from keras import backend

# This signifies the max integer that the controller RNN could predict for the
# augmentation scheme.
Expand Down Expand Up @@ -178,7 +178,7 @@ def _keras_image_processing_transform(
https://github.com/keras-team/keras/blob/v2.14.0/keras/layers/preprocessing/image_preprocessing.py#L720-L815
since it was removed from the public API, with minor adaptation.
"""
with backend.name_scope(name or "transform"):
with tf.name_scope(name or "transform"):
if output_shape is None:
output_shape = tf.shape(images)[1:3]
if not tf.executing_eagerly():
Expand Down
11 changes: 9 additions & 2 deletions docs/01-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ conda install -c apple tensorflow-deps
# Manually build tensorflow-text until a collaborator build is available.
# This was tested using clang version 15 - you may get non-working wheels with earlier versions of clang.
mkdir ~/builds && git clone https://github.com/tensorflow/text.git ~/builds/text
cd ~/builds/text && git checkout 6064f1bf8fd078777b6c8690986b908c28764a94
# Install tensorflow prior to building.
pip install tensorflow==2.16.1
cd ~/builds/text && git checkout 0f9f6df5b4da19bc7a734ba05fc4fa12bccbedbe

# If you do NOT have bazel installed, run the following and ensure that $HOME/bin is in $PATH:
# ./oss_scripts/install_bazel.sh

# Build tensorflow-text.
./oss_scripts/run_build.sh
pip install ./tensorflow_text-2.14.0-cp39-cp39-macosx_*_arm64.whl
pip install ./tensorflow_text-2.16.1-cp39-cp39-macosx_*_arm64.whl
```
</details>

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ dependencies = [
"optax==0.1.7", # optimizers (0.1.0 has known bugs).
"portpicker",
"protobuf>=3.20.3",
"tensorboard-plugin-profile==2.14.0",
"tensorboard-plugin-profile==2.15.1",
# This has both x86 and arm64 wheels. Underneath the hood it uses tensorflow-macos since 2.13.
"tensorflow==2.14.0",
"tensorflow==2.16.1",
"tensorflow-datasets>=4.9.2",
# tensorflow-io 0.34.0 enabled macOS arm64 builds.
"tensorflow-io>=0.34.0",
"tensorflow_text==2.14.0; platform_machine == 'x86_64'", # implied by seqio, but also used directly for text processing
"tensorstore>=0.1.21", # used for supporting GDA checkpoints
"tensorflow_text==2.16.1; platform_machine == 'x86_64'", # implied by seqio, but also used directly for text processing
"tensorstore>=0.1.56", # used for supporting GDA checkpoints
"toml", # for config management
"typing-extensions==4.9.0", # needed for typing.Protocol. >4.9.0 runs into attribute error `__non_callable_proto_members__`.
"scipy==1.12.0", # to avoid "module 'scipy.linalg' has no attribute 'tril'"
Expand Down

0 comments on commit ea4e284

Please sign in to comment.