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

[don't merge] debug CI fail #267

Merged
merged 1 commit into from
Jul 31, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
bash tools/install_deps/install_bazelisk.sh ./
python -m pip install --upgrade protobuf==3.20.0
python configure.py
bazel test -c opt -k --test_timeout 300,450,1200,3600 --test_output=errors //tensorflow_recommenders_addons/...
bazel test --local_ram_resources=4096 -c opt -k --test_timeout 300,450,1200,3600 --test_output=errors //tensorflow_recommenders_addons/...
release-wheel:
name: Build release wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
# TODO: add back 'windows-latest' when it can be compiled.
os: ['macos-10.15', 'ubuntu-18.04']
os: ['macos-12', 'ubuntu-18.04']
py-version: ['3.7', '3.8', '3.9']
tf-version: ['2.5.1', '2.7.0']
tf-need-cuda: ['1', '0']
Expand All @@ -59,7 +59,7 @@ jobs:
# tf-need-cuda: '0'
exclude:
# excludes cuda on macOS
- os: 'macos-10.15'
- os: 'macos-12'
tf-need-cuda: '1'
# excludes TF2.5.1 with cuda 10.0
- tf-version: '2.5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import itertools
import pytest
import tensorflow as tf
import horovod.tensorflow as hvd

from tensorflow_recommenders_addons import dynamic_embedding as de

Expand Down Expand Up @@ -49,6 +48,16 @@ def test_adam_minimize_trainable(self):
self.common_minimize_trainable(base_opt, test_opt, name="adam")

def common_minimize_trainable(self, base_opt, test_opt, name):
from tensorflow.python.framework.errors_impl import NotFoundError

# TODO(rhdong): Recover the testing, if the horovod import error is fixed on macOS+TF2.7+.
try:
import horovod.tensorflow as hvd
except NotFoundError:
self.skipTest(
"Skip the test for horovod import error with Tensorflow-2.7.0 on MacOS-12."
)

tf.config.set_soft_device_placement(True)
hvd.init()
base_opt = de.DynamicEmbeddingOptimizer(base_opt, synchronous=True)
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/build_wheel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ENV TF_CUDNN_VERSION=$TF_CUDNN_VERSION
RUN python configure.py

RUN bash tools/testing/build_and_run_tests.sh && \
bazel build \
bazel build --local_ram_resources=4096 \
--noshow_progress \
--noshow_loading_progress \
--verbose_failures \
Expand Down
2 changes: 1 addition & 1 deletion tools/install_so_files.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set -e -x

bazel build --cxxopt="-w" --copt="-w" $CUDA_FLAG //tensorflow_recommenders_addons/...
bazel build --local_ram_resources=4096 --cxxopt="-w" --copt="-w" $CUDA_FLAG //tensorflow_recommenders_addons/...
cp ./bazel-bin/tensorflow_recommenders_addons/dynamic_embedding/core/_*_ops.so ./tensorflow_recommenders_addons/dynamic_embedding/core/
cp ./bazel-bin/tensorflow_recommenders_addons/embedding_variable/core/_*_ops.so ./tensorflow_recommenders_addons/embedding_variable/core/