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

[build] Disable EV build #357

Merged
merged 2 commits into from
Sep 11, 2023
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
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
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
from tensorflow_recommenders_addons.embedding_variable.python.ops.embedding_variable_ops import *
from tensorflow_recommenders_addons.embedding_variable.python.ops.embedding_variable import *
from tensorflow_recommenders_addons.embedding_variable.python.optimizers.gradient_descent import *
from tensorflow_recommenders_addons.embedding_variable.python.optimizers.adagrad import *
from tensorflow_recommenders_addons.embedding_variable.python.optimizers.adam import *
12 changes: 0 additions & 12 deletions tensorflow_recommenders_addons/embedding_variable/python/ops/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,3 @@ py_library(
],
srcs_version = "PY2AND3",
)

py_test(
name = "embedding_variable_ops_test",
srcs = ["embedding_variable_ops_test.py"],
data = [
"//tensorflow_recommenders_addons/embedding_variable/core:_ev_ops.so",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow_recommenders_addons",
],
)

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