Skip to content

Fix typos in tensorflow serving source code #1549

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TEST_F(GetModelStatusImplTest, AllVersionsSuccess) {
ModelSpec* model_spec = request.mutable_model_spec();
model_spec->set_name(kTestModelName);

// If two versions of model are managed by ServerCore, succesfully get model
// If two versions of model are managed by ServerCore, successfully get model
// status for both versions of the model.
TF_EXPECT_OK(
GetModelStatusImpl::GetModelStatus(GetServerCore(), request, &response));
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/model_servers/http_rest_api_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class HttpRestApiHandler {
// HTTP server, so incoming requests can be forwarded to this handler.
static const char* const kPathRegex;

// API calls are configured to timeout after `run_optons.timeout_in_ms`.
// API calls are configured to timeout after `run_options.timeout_in_ms`.
// `core` is not owned and is expected to outlive HttpRestApiHandler
// instance.
HttpRestApiHandler(const RunOptions& run_options, ServerCore* core);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/model_servers/server_core_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ TEST_P(ServerCoreTest, AssignExistingLabelToUnavailableVersion) {
test_util::kTestModelLargerVersion;
TF_ASSERT_OK(server_core->ReloadConfig(two_version_config));

// Attempt to assign an exsiting label to a different version that isn't
// Attempt to assign an existing label to a different version that isn't
// one of the loaded ones.
ASSERT_EQ(1, two_version_config.model_config_list().config().size());
model_config =
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/oss_or_google.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Module for build utilities to distiguish different build environment.
Module for build utilities to distinguish different build environment.
"""

# Whether the compilation environment is open source environment.
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/servables/tensorflow/classifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Status PostProcessClassificationResult(
// Tensor.
int num_classes = 0;
if (classes && scores) {
// If we have both Tensors they should agree in the second dimmension.
// If we have both Tensors they should agree in the second dimension.
if (classes->dim_size(1) != scores->dim_size(1)) {
return errors::InvalidArgument(
"Tensors class and score should match in dim_size(1). Got ",
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_serving/servables/tensorflow/classifier_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ void AddNamedSignatureToSavedModelBundle(
TensorInfo scores_tensor_info;
scores_tensor_info.set_name(output_scores_tensor_name);
(*sig_def.mutable_outputs())["scores"] = scores_tensor_info;
string methond_name = "tensorflow/serving/regress";
string method_name = "tensorflow/serving/regress";
if (is_classification) {
TensorInfo class_tensor_info;
class_tensor_info.set_name(kClassTensor);
(*sig_def.mutable_outputs())["classes"] = class_tensor_info;

methond_name = "tensorflow/serving/classify";
method_name = "tensorflow/serving/classify";
}
sig_def.set_method_name(methond_name);
sig_def.set_method_name(method_name);
(*signature_defs)[signature_name] = sig_def;
}

Expand Down Expand Up @@ -379,7 +379,7 @@ TEST_F(ClassifierTest, ExampleListWithContext) {
request_.mutable_input()->mutable_example_list_with_context();
// Context gets copied to each example.
*list_and_context->mutable_context() = example({{"dos", 2}, {"uno", 1}});
// Add empty examples to recieve the context.
// Add empty examples to receive the context.
list_and_context->add_examples();
list_and_context->add_examples();
TF_ASSERT_OK(classifier_->Classify(request_, &result_));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ TEST_F(MultiInferenceTest, EvaluateDuplicateSignaturesTest) {
"Duplicate evaluation of signature: regress_x_to_y");
}

TEST_F(MultiInferenceTest, UsupportedSignatureTypeTest) {
TEST_F(MultiInferenceTest, UnsupportedSignatureTypeTest) {
MultiInferenceRequest request;
AddInput({{"x", 2}}, &request);
PopulateTask("serving_default", kPredictMethodName, -1, request.add_tasks());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ TEST_F(MultiInferenceTest, EvaluateDuplicateSignaturesTest) {
"Duplicate evaluation of signature: regress_x_to_y");
}

TEST_F(MultiInferenceTest, UsupportedSignatureTypeTest) {
TEST_F(MultiInferenceTest, UnsupportedSignatureTypeTest) {
std::unique_ptr<TensorFlowMultiInferenceRunner> inference_runner;
TF_ASSERT_OK(GetInferenceRunner(&inference_runner));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ TEST_F(PredictImplTest, PredictionWithNamedClassificationSignature) {
// customized signatures. It calls get_counter, incr_counter,
// reset_counter, incr_counter, and incr_counter_by(3) in order.
//
// *Notes*: These signatures are stateful and over-simplied only to demonstrate
// *Notes*: These signatures are stateful and over-simplified only to demonstrate
// Predict calls with only inputs or outputs. State is not supported in
// TensorFlow Serving on most scalable or production hosting environments.
TEST_F(PredictImplTest, PredictionWithCustomizedSignatures) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ TEST_F(PredictImplTest, PredictionWithNamedClassificationSignature) {
// customized signatures. It calls get_counter, incr_counter,
// reset_counter, incr_counter, and incr_counter_by(3) in order.
//
// *Notes*: These signatures are stateful and over-simplied only to demonstrate
// *Notes*: These signatures are stateful and over-simplified only to demonstrate
// Predict calls with only inputs or outputs. State is not supported in
// TensorFlow Serving on most scalable or production hosting environments.
TEST_F(PredictImplTest, PredictionWithCustomizedSignatures) {
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_serving/servables/tensorflow/regressor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,25 @@ void AddNamedSignatureToSavedModelBundle(
tensorflow::MetaGraphDef* meta_graph_def) {
auto* signature_defs = meta_graph_def->mutable_signature_def();
SignatureDef sig_def;
string methond_name;
string method_name;
if (is_regression) {
TensorInfo input_tensor_info;
input_tensor_info.set_name(input_tensor_name);
(*sig_def.mutable_inputs())["inputs"] = input_tensor_info;
TensorInfo scores_tensor_info;
scores_tensor_info.set_name(output_scores_tensor_name);
(*sig_def.mutable_outputs())["outputs"] = scores_tensor_info;
methond_name = "tensorflow/serving/regress";
method_name = "tensorflow/serving/regress";
} else {
TensorInfo input_tensor_info;
input_tensor_info.set_name(input_tensor_name);
(*sig_def.mutable_inputs())["inputs"] = input_tensor_info;
TensorInfo class_tensor_info;
class_tensor_info.set_name(kOutputPlusOneTensor);
(*sig_def.mutable_outputs())["classes"] = class_tensor_info;
methond_name = "tensorflow/serving/classify";
method_name = "tensorflow/serving/classify";
}
sig_def.set_method_name(methond_name);
sig_def.set_method_name(method_name);
(*signature_defs)[signature_name] = sig_def;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Status RunSavedModelWarmup(const ModelWarmupOptions& model_warmup_options,
++num_warmup_records;
if (num_warmup_records > WarmupConsts::kMaxNumRecords) {
return errors::InvalidArgument(
"Number of warmup records exceeeds the maximum (",
"Number of warmup records exceeds the maximum (",
WarmupConsts::kMaxNumRecords, ") at ", warmup_path);
}
status = tf_record_file_reader->ReadRecord(&record);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ TEST(SavedModelBundleWarmupTest, TooManyWarmupRecords) {
EXPECT_EQ(::tensorflow::error::INVALID_ARGUMENT, status.code()) << status;
EXPECT_THAT(
status.ToString(),
::testing::HasSubstr("Number of warmup records exceeeds the maximum"));
::testing::HasSubstr("Number of warmup records exceeds the maximum"));
}

TEST(SavedModelBundleWarmupTest, UnparsableRecord) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def export_model(output_dir):

Create three signatures: incr_counter, incr_counter_by, reset_counter.

*Notes*: These signatures are stateful and over-simplied only to demonstrate
*Notes*: These signatures are stateful and over-simplified only to demonstrate
Predict calls with only inputs or outputs. State is not supported in
TensorFlow Serving on most scalable or production hosting environments.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TEST(SessionBundleTest, LoadSessionBundleOrSavedModelBundleFailureTest) {
TEST(SessionBundleTest, LoadSessionBundleFromPathUsingRunOptionsTest) {
SessionOptions session_options;
RunOptions run_options;
string export_dir = "/exort_dir";
string export_dir = "/export_dir";
SessionBundle bundle;
Status status = session_bundle::LoadSessionBundleFromPathUsingRunOptions(
session_options, run_options, export_dir, &bundle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ TEST(FileSystemStoragePathSourceTest, ServableVersionDirRenamed) {
.PollFileSystemAndInvokeCallback());

// Blacklist version 2 and 5 by renaming corresponding directories.
// Blacklist version 8 by removing the directory alltogether.
// Blacklist version 8 by removing the directory altogether.
TF_ASSERT_OK(Env::Default()->RenameFile(
io::JoinPath(base_path_prefix, "2"),
io::JoinPath(base_path_prefix, "2.blacklisted")));
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_serving/tensorflow_version.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Module for build utilities to distiguish different tensorflow versions.
Module for build utilities to distinguish different tensorflow versions.
"""

load("@org_tensorflow//tensorflow:tensorflow.bzl", "VERSION_MAJOR")
Expand Down