diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 29c86e43..c924e39a 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -82,7 +82,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: 3.9 - run: pip install pygithub click - name: Check that the CODEOWNERS is valid run: python .github/workflows/notify_codeowners.py .github/CODEOWNERS diff --git a/.github/workflows/notify_codeowners.yml b/.github/workflows/notify_codeowners.yml index c384e13c..6631f5bc 100644 --- a/.github/workflows/notify_codeowners.yml +++ b/.github/workflows/notify_codeowners.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: 3.9 - run: pip install pygithub click - name: Drop a message for codeowners env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ca01ae1..bfe0be9e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: strategy: matrix: # TODO: add back 'windows-latest' when it can be compiled. - os: ['macos-14', 'macos-12', 'ubuntu-20.04'] + os: ['macos-14', 'macos-13', 'ubuntu-20.04'] py-version: ['3.8', '3.9', '3.10', '3.11'] tf-version: ['2.15.1', '2.16.2'] tf-need-cuda: ['0'] @@ -59,7 +59,7 @@ jobs: cpu: 'x86' - os: 'ubuntu-20.04' cpu: 'arm64' - - os: 'macos-12' + - os: 'macos-13' cpu: 'arm64' - py-version: '3.8' cpu: 'arm64' diff --git a/demo/dynamic_embedding/movielens-1m-keras-with-horovod/movielens-1m-keras-with-horovod.py b/demo/dynamic_embedding/movielens-1m-keras-with-horovod/movielens-1m-keras-with-horovod.py index a52b585c..5eeaa307 100644 --- a/demo/dynamic_embedding/movielens-1m-keras-with-horovod/movielens-1m-keras-with-horovod.py +++ b/demo/dynamic_embedding/movielens-1m-keras-with-horovod/movielens-1m-keras-with-horovod.py @@ -419,7 +419,7 @@ def call(self, features): boundaries=fea_info['boundaries'])(input_tensor) # To prepare for GPU table combined queries, use a prefix to distinguish different features in a table. if fea_info['ptype'] == 'user_occupation_label': - input_tensor_prefix_code = int(fea_info['code']) << 1 + input_tensor_prefix_code = int(fea_info['code']) << 48 else: input_tensor_prefix_code = None if input_tensor_prefix_code is not None: diff --git a/tensorflow_recommenders_addons/dynamic_embedding/python/kernel_tests/BUILD b/tensorflow_recommenders_addons/dynamic_embedding/python/kernel_tests/BUILD index 239e3b24..ef00ee0b 100644 --- a/tensorflow_recommenders_addons/dynamic_embedding/python/kernel_tests/BUILD +++ b/tensorflow_recommenders_addons/dynamic_embedding/python/kernel_tests/BUILD @@ -83,42 +83,43 @@ py_test( # ], # ) -py_test( - name = "math_ops_test", - srcs = ["math_ops_test.py"], - python_version = "PY3", - srcs_version = "PY3", - deps = [ - "//tensorflow_recommenders_addons", - ], -) +# Remove the following tests due to there are well-support operators in latest Tensorflow version. +# py_test( +# name = "math_ops_test", +# srcs = ["math_ops_test.py"], +# python_version = "PY3", +# srcs_version = "PY3", +# deps = [ +# "//tensorflow_recommenders_addons", +# ], +# ) -py_test( - name = "math_grad_test", - srcs = ["math_grad_test.py"], - python_version = "PY3", - srcs_version = "PY3", - deps = [ - "//tensorflow_recommenders_addons", - ], -) +# py_test( +# name = "math_grad_test", +# srcs = ["math_grad_test.py"], +# python_version = "PY3", +# srcs_version = "PY3", +# deps = [ +# "//tensorflow_recommenders_addons", +# ], +# ) -py_test( - name = "dynamic_partition_op_test", - srcs = ["dynamic_partition_op_test.py"], - python_version = "PY3", - srcs_version = "PY3", - deps = [ - "//tensorflow_recommenders_addons", - ], -) +# py_test( +# name = "dynamic_partition_op_test", +# srcs = ["dynamic_partition_op_test.py"], +# python_version = "PY3", +# srcs_version = "PY3", +# deps = [ +# "//tensorflow_recommenders_addons", +# ], +# ) -py_test( - name = "dynamic_stitch_op_test", - srcs = ["dynamic_stitch_op_test.py"], - python_version = "PY3", - srcs_version = "PY3", - deps = [ - "//tensorflow_recommenders_addons", - ], -) +# py_test( +# name = "dynamic_stitch_op_test", +# srcs = ["dynamic_stitch_op_test.py"], +# python_version = "PY3", +# srcs_version = "PY3", +# deps = [ +# "//tensorflow_recommenders_addons", +# ], +# ) diff --git a/tensorflow_recommenders_addons/dynamic_embedding/python/ops/data_flow_ops.py b/tensorflow_recommenders_addons/dynamic_embedding/python/ops/data_flow_ops.py index 4f31f2f7..558f7250 100644 --- a/tensorflow_recommenders_addons/dynamic_embedding/python/ops/data_flow_ops.py +++ b/tensorflow_recommenders_addons/dynamic_embedding/python/ops/data_flow_ops.py @@ -32,16 +32,13 @@ from tensorflow_recommenders_addons.utils.resource_loader import LazySO tfra_data_flow_ops = LazySO("dynamic_embedding/core/_data_flow_ops.so").ops -# TODO(MoFHeka): dynamic_partition and dynamic_stitch in TensorFlow +# NOTE(MoFHeka): dynamic_partition and dynamic_stitch in TensorFlow # missing compile implementation of the bool data type. # Remove TFRA DE same-name op when TensorFlow supports those data type. def dynamic_partition(data, partitions, num_partitions, name=None): if not hasattr(tfra_data_flow_ops, 'tfra_dynamic_partition'): - tf_logging.warn( - '`tfra.dynamic_embedding.data_flow.dynamic_partition` is not' - ' found. Use tf.dynamic_partition instead.') with ops.colocate_with(None, ignore_existing=True): return tf.dynamic_partition(data, partitions, num_partitions, name=name) else: @@ -53,8 +50,6 @@ def dynamic_partition(data, partitions, num_partitions, name=None): def dynamic_stitch(indices, data, use_fast=True, name=None): if not hasattr(tfra_data_flow_ops, 'tfra_dynamic_stitch'): - tf_logging.warn('`tfra.dynamic_embedding.data_flow.dynamic_stitch` is not' - ' found. Use tf.dynamic_stitch instead.') with ops.colocate_with(None, ignore_existing=True): return tf.dynamic_stitch(indices, data, name=name) else: