Skip to content

Commit

Permalink
[build]Disable EV build
Browse files Browse the repository at this point in the history
  • Loading branch information
poinwater committed Sep 4, 2023
1 parent 7f20412 commit 0728def
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 182 deletions.
1 change: 0 additions & 1 deletion tensorflow_recommenders_addons/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ py_library(
srcs = glob(["**/*.py"]),
deps = [
"//tensorflow_recommenders_addons/dynamic_embedding/python/ops:dynamic_embedding",
"//tensorflow_recommenders_addons/embedding_variable/python:embedding_variable",
"//tensorflow_recommenders_addons/utils",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"""patch on tensorflow"""

from tensorflow_recommenders_addons import dynamic_embedding as de
from tensorflow_recommenders_addons import embedding_variable as ev

try:
from tensorflow.python.keras.initializers import initializers_v2 as kinit2
Expand Down Expand Up @@ -133,8 +132,6 @@ def _get_processor(v):
if (rvo.is_resource_variable(v) and not v._in_graph_mode): # pylint: disable=protected-access
# True if and only if `v` was initialized eagerly.
return optimizer._DenseResourceVariableProcessor(v)
if isinstance(v, ev.EmbeddingVariable):
return optimizer._DenseResourceVariableProcessor(v)
if v.op.type == "VarHandleOp":
return optimizer._DenseResourceVariableProcessor(v)
if isinstance(v, variables.Variable):
Expand Down Expand Up @@ -167,21 +164,13 @@ def _create_slot_var(primary,
use_resource = False
else:
use_resource = None
if isinstance(primary, ev.EmbeddingVariable):
slot = ev.get_variable(scope,
embedding_dim=shape[1:],
initializer=val,
trainable=False,
key_dtype=primary._ktype,
value_dtype=primary.dtype)
else:
slot = variable_scope.get_variable(scope,
initializer=val,
trainable=False,
use_resource=use_resource,
shape=shape,
dtype=dtype,
validate_shape=validate_shape)
slot = variable_scope.get_variable(scope,
initializer=val,
trainable=False,
use_resource=use_resource,
shape=shape,
dtype=dtype,
validate_shape=validate_shape)
variable_scope.get_variable_scope().set_partitioner(current_partitioner)

# pylint: disable=protected-access
Expand Down
5 changes: 0 additions & 5 deletions tensorflow_recommenders_addons/embedding_variable/__init__.py

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions tools/docker/build_wheel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ARG TF_VERSION
ARG TF_NAME
ARG HOROVOD_VERSION

RUN python -m pip install --upgrade pip
RUN python -m pip install --default-timeout=1000 $TF_NAME==$TF_VERSION

COPY tools/docker/install/install_horovod.sh /install/
Expand Down

0 comments on commit 0728def

Please sign in to comment.