Skip to content

Commit

Permalink
Revert "Windows: Enable tensorflow/contrib in Bazel build (tensorflow…
Browse files Browse the repository at this point in the history
…#16659)" (tensorflow#17774)

* Revert "Windows: Enable tensorflow/contrib in Bazel build (tensorflow#16659)"

This reverts commit c6a12c7.

* Add kafka back to contrib_py rule.

* Update __init__.py
  • Loading branch information
gunan authored Mar 21, 2018
1 parent 9ef37ab commit 4e108ef
Show file tree
Hide file tree
Showing 42 changed files with 125 additions and 454 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ def main():
# environment variables.
environ_cp = dict(os.environ)

check_bazel_version('0.10.0')
check_bazel_version('0.5.4')

reset_tf_configure_bazelrc(args.workspace)
cleanup_makefile()
Expand Down
8 changes: 3 additions & 5 deletions tensorflow/contrib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package(default_visibility = ["//tensorflow:__subpackages__"])
load("//third_party/mpi:mpi.bzl", "if_mpi")
load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt")
load("//tensorflow:tensorflow.bzl", "if_not_windows")

py_library(
name = "contrib_py",
Expand Down Expand Up @@ -40,6 +39,7 @@ py_library(
"//tensorflow/contrib/estimator:estimator_py",
"//tensorflow/contrib/factorization:factorization_py",
"//tensorflow/contrib/feature_column:feature_column_py",
"//tensorflow/contrib/ffmpeg:ffmpeg_ops_py",
"//tensorflow/contrib/framework:framework_py",
"//tensorflow/contrib/fused_conv:fused_conv_py",
"//tensorflow/contrib/gan",
Expand All @@ -51,6 +51,7 @@ py_library(
"//tensorflow/contrib/image:single_image_random_dot_stereograms_py",
"//tensorflow/contrib/input_pipeline:input_pipeline_py",
"//tensorflow/contrib/integrate:integrate_py",
"//tensorflow/contrib/kafka",
"//tensorflow/contrib/keras",
"//tensorflow/contrib/kernel_methods",
"//tensorflow/contrib/kfac",
Expand All @@ -62,6 +63,7 @@ py_library(
"//tensorflow/contrib/linalg:linalg_py",
"//tensorflow/contrib/linear_optimizer:sdca_estimator_py",
"//tensorflow/contrib/linear_optimizer:sdca_ops_py",
"//tensorflow/contrib/lite/python:lite",
"//tensorflow/contrib/lookup:lookup_py",
"//tensorflow/contrib/losses:losses_py",
"//tensorflow/contrib/losses:metric_learning_py",
Expand Down Expand Up @@ -108,10 +110,6 @@ py_library(
"//tensorflow/python:util",
] + if_mpi(["//tensorflow/contrib/mpi_collectives:mpi_collectives_py"]) + if_tensorrt([
"//tensorflow/contrib/tensorrt:init_py",
]) + if_not_windows([
"//tensorflow/contrib/ffmpeg:ffmpeg_ops_py", # unix dependency, need to fix code
"//tensorflow/contrib/lite/python:lite", # unix dependency, need to fix code
"//tensorflow/contrib/kafka", # has some linking issue on opensssl.
]),
)

Expand Down
6 changes: 1 addition & 5 deletions tensorflow/contrib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
from __future__ import division
from __future__ import print_function

import os

# Add projects here, they will show up under tf.contrib.
from tensorflow.contrib import batching
from tensorflow.contrib import bayesflow
Expand Down Expand Up @@ -85,8 +83,7 @@
from tensorflow.contrib import training
from tensorflow.contrib import util
from tensorflow.contrib.eager.python import tfe as eager
if os.name != 'nt':
from tensorflow.contrib.lite.python import lite
from tensorflow.contrib.lite.python import lite
from tensorflow.contrib.receptive_field import receptive_field_api as receptive_field
from tensorflow.contrib.remote_fused_graph import pylib as remote_fused_graph
from tensorflow.contrib.specs import python as specs
Expand All @@ -95,7 +92,6 @@
from tensorflow.python.util.lazy_loader import LazyLoader
ffmpeg = LazyLoader("ffmpeg", globals(),
"tensorflow.contrib.ffmpeg")
del os
del LazyLoader

del absolute_import
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/contrib/boosted_trees/lib/utils/batch_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class BatchFeatures {
Status GetFeatureColumnSizes(int64* const num_dense_float_features,
int64* const num_sparse_float_features,
int64* const num_sparse_int_features) const {
QCHECK_NE(num_dense_float_features, (int64*) nullptr);
QCHECK_NE(num_sparse_float_features, (int64*) nullptr);
QCHECK_NE(num_sparse_int_features, (int64*) nullptr);
QCHECK_NE(num_dense_float_features, nullptr);
QCHECK_NE(num_sparse_float_features, nullptr);
QCHECK_NE(num_sparse_int_features, nullptr);
*num_dense_float_features = dense_float_feature_columns_.size();
*num_sparse_float_features = sparse_float_feature_columns_.size();
*num_sparse_int_features = sparse_int_feature_columns_.size();
Expand Down
2 changes: 0 additions & 2 deletions tensorflow/contrib/distributions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ cuda_py_test(
"//tensorflow/python:framework_test_lib",
"//tensorflow/python:platform_test",
],
tags = ["no_windows"], # TODO: needs investigation on Windows
)

cuda_py_test(
Expand Down Expand Up @@ -1121,7 +1120,6 @@ cuda_py_test(
"//tensorflow/python:math_ops",
"//tensorflow/python:platform_test",
],
tags = ["no_windows"], # TODO: needs investigation on Windows
)

cuda_py_test(
Expand Down
5 changes: 1 addition & 4 deletions tensorflow/contrib/eager/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,7 @@ cuda_py_test(
"//tensorflow/python/eager:test",
"//tensorflow/python/keras",
],
tags = [
"no_windows", # TODO: needs investigation on Windows
"notsan",
],
tags = ["notsan"],
)

filegroup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cuda_py_test(
":linear_regression",
"//tensorflow:tensorflow_py",
],
tags = ["no_windows"], # TODO: needs investigation on Windows
)

cuda_py_test(
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/gan/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ py_test(
name = "classifier_metrics_test",
srcs = ["python/eval/python/classifier_metrics_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":classifier_metrics",
"//tensorflow/core:protos_all_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/kfac/python/kernel_tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ py_test(
name = "utils_test",
srcs = ["utils_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
"//tensorflow/contrib/kfac/python/ops:utils",
"//tensorflow/contrib/tpu",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/labeled_tensor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ py_test(
"python/ops/core_test.py",
],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":_typecheck",
":core",
Expand Down
2 changes: 0 additions & 2 deletions tensorflow/contrib/layers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ py_test(
size = "small",
srcs = ["python/layers/normalization_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":layers_py",
"//tensorflow/contrib/framework:framework_py",
Expand Down Expand Up @@ -354,7 +353,6 @@ py_test(
size = "small",
srcs = ["python/ops/sparse_ops_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":layers_py",
"//tensorflow/python:array_ops",
Expand Down
5 changes: 0 additions & 5 deletions tensorflow/contrib/learn/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ py_test(
size = "small",
srcs = ["python/learn/learn_io/data_feeder_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":learn",
"//tensorflow/python:client_testlib",
Expand Down Expand Up @@ -173,7 +172,6 @@ tf_py_test(
"//tensorflow/python:variables",
"//tensorflow/python/estimator",
],
tags = ["no_windows"], # TODO: needs investigation on Windows
)

py_test(
Expand All @@ -192,7 +190,6 @@ py_test(
size = "small",
srcs = ["python/learn/graph_actions_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":learn",
"//tensorflow/contrib/framework:framework_py",
Expand Down Expand Up @@ -593,7 +590,6 @@ py_test(
size = "small",
srcs = ["python/learn/learn_io/io_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":learn",
"//tensorflow/contrib/learn/python/learn/datasets",
Expand Down Expand Up @@ -823,7 +819,6 @@ py_test(
size = "small",
srcs = ["python/learn/utils/saved_model_export_utils_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":learn",
"//tensorflow/contrib/layers:layers_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/lookup/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ tf_py_test(
"//tensorflow/python:variables",
],
grpc_enabled = True,
tags = ["no_windows"], # TODO: needs investigation on Windows
)

filegroup(
Expand Down
2 changes: 0 additions & 2 deletions tensorflow/contrib/py2tf/converters/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ py_test(
name = "builtin_functions_test",
srcs = ["builtin_functions_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":test_lib",
"//tensorflow/python:client_testlib",
Expand All @@ -92,7 +91,6 @@ py_test(
name = "call_trees_test",
srcs = ["call_trees_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":test_lib",
"//tensorflow/contrib/py2tf/impl",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/py2tf/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ py_test(
name = "py_func_test",
srcs = ["py_func_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":utils",
"//tensorflow/python:client_testlib",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/remote_fused_graph/pylib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ py_test(
size = "small",
srcs = ["python/ops/remote_fused_graph_ops_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"],
deps = [
":remote_fused_graph_ops_py",
"//tensorflow/core:protos_all_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/saved_model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ py_test(
size = "small",
srcs = ["python/saved_model/reader_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
visibility = ["//visibility:private"],
deps = [
":saved_model_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/session_bundle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ py_test(
name = "gc_test",
srcs = ["gc_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
visibility = ["//visibility:private"],
deps = [
":gc",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/slim/python/slim/data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ py_test(
name = "dataset_data_provider_test",
srcs = ["dataset_data_provider_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":dataset",
":dataset_data_provider",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/tensor_forest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ py_test(
srcs = ["client/random_forest_test.py"],
srcs_version = "PY2AND3",
tags = [
"no_windows",
"nomac", # b/63258195
"notsan",
],
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/tensorboard/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ exports_files(["LICENSE"])

# For platform specific build config
load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library")
load("//tensorflow:tensorflow.bzl", "py_test")

tf_proto_library(
name = "protos_all",
Expand Down
5 changes: 1 addition & 4 deletions tensorflow/contrib/timeseries/examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ py_test(
srcs = ["predict_test.py"],
data = ["data/period_trend.csv"],
srcs_version = "PY2AND3",
tags = [
"no_windows", # TODO: needs investigation on Windows
"notsan", # b/67513579
],
tags = ["notsan"], # b/67513579
deps = [
":predict",
"//tensorflow/python:client_testlib",
Expand Down
5 changes: 3 additions & 2 deletions tensorflow/contrib/timeseries/python/timeseries/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ py_test(
"head_test.py",
],
srcs_version = "PY2AND3",
tags = ["no_pip_gpu"], # b/63391119
tags = [
"no_pip_gpu", # b/63391119
],
deps = [
":feature_keys",
":head",
Expand Down Expand Up @@ -425,7 +427,6 @@ py_test(
srcs_version = "PY2AND3",
tags = [
"no_pip_gpu", # b/63391119
"no_windows", # TODO: needs investigation on Windows
],
deps = [
":feature_keys",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ py_test(
timeout = "long", # Moderate but for asan
srcs = ["state_space_model_test.py"],
srcs_version = "PY2AND3",
tags = ["no_windows"], # TODO: needs investigation on Windows
deps = [
":state_space_model",
"//tensorflow/contrib/layers:layers_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/contrib/tpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ tf_py_test(
"//tensorflow/python:framework",
"//tensorflow/python:layers",
],
tags = ["no_windows"], # TODO: needs investigation on Windows
)

tf_py_test(
Expand Down
7 changes: 3 additions & 4 deletions tensorflow/contrib/util/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ def load_op_library(path):
plugin.
"""
if os.name == 'nt':
# To avoid making every user_ops aware of windows, re-write
# the file extension from .so to .dll if .so file doesn't exist.
if not os.path.exists(path):
path = re.sub(r'\.so$', '.dll', path)
# To avoid makeing every user_ops aware of windows, re-write
# the file extension from .so to .dll.
path = re.sub(r'\.so$', '.dll', path)

# Currently we have only some user_ops as dlls on windows - don't try
# to load them if the dll is not found.
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/core/framework/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,11 @@ class GraphDatasetBase : public DatasetBase {
}

// Key for storing the Dataset graph in the serialized format.
TF_EXPORT static const char kDatasetGraphKey[];
static const char kDatasetGraphKey[];

// Key for storing the output node of the Dataset graph in the serialized
// format.
TF_EXPORT static const char kDatasetGraphOutputNodeKey[];
static const char kDatasetGraphOutputNodeKey[];

private:
Status Serialize(OpKernelContext* ctx, string* serialized_graph_def,
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/core/lib/core/stringpiece.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ StringPiece StringPiece::substr(size_t pos, size_t n) const {
return StringPiece(data_ + pos, n);
}

const StringPiece::size_type StringPiece::npos = size_type(-1);

} // namespace tensorflow
2 changes: 1 addition & 1 deletion tensorflow/core/lib/core/stringpiece.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class StringPiece {
iterator begin() const { return data_; }
iterator end() const { return data_ + size_; }

static const size_t npos = size_type(-1);
static const size_t npos;

// Return the ith byte in the referenced data.
// REQUIRES: n < size()
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/platform/tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Tracing {
friend class ScopedAnnotation;
friend class TraceMe;

TF_EXPORT static std::atomic<Tracing::Engine*> tracing_engine_;
static std::atomic<Tracing::Engine*> tracing_engine_;
static Tracing::Engine* engine() {
return tracing_engine_.load(std::memory_order_acquire);
}
Expand Down
Loading

0 comments on commit 4e108ef

Please sign in to comment.