Skip to content

Commit

Permalink
Change tensorflow/contrib/session_bundle namespace from tensorflow::c…
Browse files Browse the repository at this point in the history
…ontrib to tensorflow::serving.

Update all Python users of tensorflow_serving/session_bundle/manifest.proto to use the equivalent tensorflow/contrib/session_bundle/manifest.proto since there are otherwise namespace collisions.
Change: 127129383
  • Loading branch information
kirilg authored and tensorflower-gardener committed Jul 11, 2016
1 parent 979b575 commit 1b897b2
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion tensorflow/contrib/session_bundle/manifest.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package tensorflow.contrib;
package tensorflow.serving;

// Signatures of model export.
message Signatures {
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/session_bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ limitations under the License.
#include "tensorflow/core/public/session_options.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace {

// Create a session using the given options and load the graph.
Expand Down Expand Up @@ -184,5 +184,5 @@ tensorflow::Status LoadSessionBundleFromPath(
return Status::OK();
}

} // namespace contrib
} // namespace serving
} // namespace tensorflow
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/session_bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.
#include "tensorflow/core/public/session_options.h"

namespace tensorflow {
namespace contrib {
namespace serving {

const char kMetaGraphDefFilename[] = "export.meta";
const char kAssetsDirectory[] = "assets";
Expand All @@ -53,7 +53,7 @@ tensorflow::Status LoadSessionBundleFromPath(
const tensorflow::SessionOptions& options,
const tensorflow::StringPiece export_dir, SessionBundle* bundle);

} // namespace contrib
} // namespace serving
} // namespace tensorflow

#endif // THIRD_PARTY_TENSORFLOW_CONTRIB_SESSION_BUNDLE_SESSION_BUNDLE_H_
6 changes: 3 additions & 3 deletions tensorflow/contrib/session_bundle/session_bundle_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ limitations under the License.
#include "tensorflow/core/public/session_options.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace {

TEST(LoadSessionBundleFromPath, Basic) {
Expand Down Expand Up @@ -72,7 +72,7 @@ TEST(LoadSessionBundleFromPath, Basic) {
ASSERT_EQ(1, collection_def[kSignaturesKey].any_list().value_size());
collection_def[kSignaturesKey].any_list().value(0).UnpackTo(&signatures);
ASSERT_TRUE(signatures.default_signature().has_regression_signature());
const tensorflow::contrib::RegressionSignature regression_signature =
const tensorflow::serving::RegressionSignature regression_signature =
signatures.default_signature().regression_signature();

const string input_name = regression_signature.input().tensor_name();
Expand All @@ -98,5 +98,5 @@ TEST(LoadSessionBundleFromPath, BadExportPath) {
}

} // namespace
} // namespace contrib
} // namespace serving
} // namespace tensorflow
8 changes: 4 additions & 4 deletions tensorflow/contrib/session_bundle/signature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.
#include "tensorflow/core/public/session.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace {

// Returns OK if the input and output batch sizes match.
Expand Down Expand Up @@ -235,7 +235,7 @@ Status GetNamedSignature(const string& name,
Status BindGenericInputs(const GenericSignature& signature,
const std::vector<std::pair<string, Tensor>>& inputs,
std::vector<std::pair<string, Tensor>>* bound_inputs) {
const protobuf::Map<string, contrib::TensorBinding>& bindings =
const protobuf::Map<string, serving::TensorBinding>& bindings =
signature.map();

for (const auto& entry : inputs) {
Expand All @@ -252,7 +252,7 @@ Status BindGenericInputs(const GenericSignature& signature,
Status BindGenericNames(const GenericSignature& signature,
const std::vector<string>& input_names,
std::vector<string>* bound_names) {
const protobuf::Map<string, contrib::TensorBinding>& bindings =
const protobuf::Map<string, serving::TensorBinding>& bindings =
signature.map();

for (const string& entry : input_names) {
Expand All @@ -266,5 +266,5 @@ Status BindGenericNames(const GenericSignature& signature,
return Status::OK();
}

} // namespace contrib
} // namespace serving
} // namespace tensorflow
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/signature.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.
#include "tensorflow/core/public/session.h"

namespace tensorflow {
namespace contrib {
namespace serving {

const char kSignaturesKey[] = "serving_signatures";

Expand Down Expand Up @@ -117,7 +117,7 @@ Status BindGenericInputs(const GenericSignature& signature,
Status BindGenericNames(const GenericSignature& signature,
const std::vector<string>& input_names,
std::vector<string>* bound_names);
} // namespace contrib
} // namespace serving
} // namespace tensorflow

#endif // THIRD_PARTY_TENSORFLOW_CONTRIB_SESSION_BUNDLE_SIGNATURE_H_
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/signature_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.
#include "tensorflow/core/public/session.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace {

static bool HasSubstr(const string& base, const string& substr) {
Expand Down Expand Up @@ -598,5 +598,5 @@ TEST_F(GenericSignatureTest, BindGenericNamesMissingBinding) {
}

} // namespace
} // namespace contrib
} // namespace serving
} // namespace tensorflow
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include "tensorflow/core/platform/test.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace test_util {

string TestSrcDirPath(const string& relative_path) {
Expand All @@ -31,5 +31,5 @@ string TestSrcDirPath(const string& relative_path) {
}

} // namespace test_util
} // namespace contrib
} // namespace serving
} // namespace tensorflow
4 changes: 2 additions & 2 deletions tensorflow/contrib/session_bundle/test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
#include "tensorflow/core/platform/types.h"

namespace tensorflow {
namespace contrib {
namespace serving {
namespace test_util {

// Creates an absolute test srcdir path to the linked in runfiles given a path
Expand All @@ -32,7 +32,7 @@ namespace test_util {
string TestSrcDirPath(const string& relative_path);

} // namespace test_util
} // namespace contrib
} // namespace serving
} // namespace tensorflow

#endif // THIRD_PARTY_TENSORFLOW_CONTRIB_SESSION_BUNDLE_TEST_UTIL_H_

0 comments on commit 1b897b2

Please sign in to comment.