Skip to content

Commit c07c232

Browse files
authored
Merge branch 'master' into ci/docs/add-mkdocs
2 parents a558c36 + d1f407f commit c07c232

File tree

100 files changed

+541
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+541
-297
lines changed

RELEASE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
<!-- disableFinding(HEADING_REPEAT_H1) -->
22

3+
# Release 2.19.1
4+
5+
## Major Features and Improvements
6+
7+
* No major features or improvements.
8+
9+
## Breaking Changes
10+
11+
* No breaking changes.
12+
13+
## Bug Fixes and Other Changes
14+
15+
* This release is based on TF version 2.19.1.
16+
317
# Release 2.19.0
418

519
## Major Features and Improvements

WORKSPACE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ http_archive(
5151
],
5252
)
5353

54+
http_archive(
55+
name = "rules_cc",
56+
sha256 = "b8b918a85f9144c01f6cfe0f45e4f2838c7413961a8ff23bc0c6cdf8bb07a3b6",
57+
strip_prefix = "rules_cc-0.1.5",
58+
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.1.5/rules_cc-0.1.5.tar.gz",
59+
)
60+
5461
http_archive(
5562
name = "rules_python",
5663
sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841",

tensorflow_serving/apis/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
# Placeholder: load java_proto_library
66

7+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
8+
79
# Placeholder: load py_library
810
# Placeholder: load kt_jvm_proto_library
911
load("@org_tensorflow//tensorflow/core/platform:build_config.bzl", "tf_jspb_proto_library", "tf_pyclif_proto_library")

tensorflow_serving/apis/predict.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ message PredictRequest {
7171
// response if the model stops at them. The model may stop at other tokens,
7272
// but will not return them in the response.
7373
repeated int64 return_stoptokens = 4;
74+
75+
// When set and supported by servable, the model server will cache the
76+
// prefix of request up to this length.
77+
optional int64 max_cache_length = 6;
7478
}
7579

7680
optional RequestOptions request_options = 7;

tensorflow_serving/batching/BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Description: Tensorflow Serving batching.
22

3+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
4+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
5+
36
package(
47
default_visibility = ["//tensorflow_serving:internal"],
58
features = ["-layering_check"],
@@ -25,6 +28,7 @@ cc_library(
2528
visibility = ["//visibility:private"],
2629
deps = [
2730
":batch_scheduler_retrier",
31+
"@com_google_absl//absl/synchronization",
2832
"@com_google_absl//absl/types:optional",
2933
"@org_tensorflow//tensorflow/core:lib",
3034
"@org_tensorflow//tensorflow/core/kernels/batching_util:batch_scheduler",
@@ -39,6 +43,7 @@ cc_test(
3943
deps = [
4044
":streaming_batch_scheduler",
4145
"//tensorflow_serving/core/test_util:test_main",
46+
"@com_google_absl//absl/synchronization",
4247
"@org_tensorflow//tensorflow/core:lib",
4348
"@org_tensorflow//tensorflow/core:protos_all_cc",
4449
"@org_tensorflow//tensorflow/core:test",
@@ -77,6 +82,7 @@ cc_library(
7782
"//tensorflow_serving/servables/tensorflow:serving_session",
7883
"//tensorflow_serving/util:hash",
7984
"@com_google_absl//absl/container:fixed_array",
85+
"@com_google_absl//absl/synchronization",
8086
"@com_google_absl//absl/types:optional",
8187
"@org_tensorflow//tensorflow/core:core_cpu",
8288
"@org_tensorflow//tensorflow/core:framework",
@@ -148,6 +154,7 @@ cc_test(
148154
deps = [
149155
":batch_scheduler_retrier",
150156
"//tensorflow_serving/core/test_util:test_main",
157+
"@com_google_absl//absl/synchronization",
151158
"@org_tensorflow//tensorflow/core:lib",
152159
"@org_tensorflow//tensorflow/core:protos_all_cc",
153160
"@org_tensorflow//tensorflow/core:test",
@@ -217,6 +224,7 @@ cc_library(
217224
":incremental_barrier",
218225
"@com_google_absl//absl/container:flat_hash_map",
219226
"@com_google_absl//absl/container:inlined_vector",
227+
"@com_google_absl//absl/synchronization",
220228
"@org_tensorflow//tensorflow/core:framework",
221229
"@org_tensorflow//tensorflow/core:lib",
222230
"@org_tensorflow//tensorflow/core/kernels/batching_util:batch_scheduler",

tensorflow_serving/batching/batch_scheduler_retrier_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ limitations under the License.
2020
#include <utility>
2121

2222
#include <gtest/gtest.h>
23+
#include "absl/synchronization/notification.h"
2324
#include "tensorflow/core/kernels/batching_util/fake_clock_env.h"
2425
#include "tensorflow/core/lib/core/errors.h"
25-
#include "tensorflow/core/lib/core/notification.h"
2626
#include "tensorflow/core/lib/core/status.h"
2727
#include "tensorflow/core/lib/core/status_test_util.h"
2828
#include "tensorflow/core/platform/macros.h"
@@ -149,7 +149,7 @@ TEST(BatchSchedulerRetrierTest, MaxTime) {
149149
options, std::move(stubborn_scheduler), &retrier));
150150

151151
const bool expect_success = max_attempts >= num_attempts_to_succeed;
152-
Notification done;
152+
absl::Notification done;
153153
std::unique_ptr<Thread> run_retrier(Env::Default()->StartThread(
154154
{}, "RunRetrier",
155155
[&retrier, &expect_success, &done]() {
@@ -191,7 +191,7 @@ TEST(BatchSchedulerRetrierTest, RetryDelay) {
191191
TF_CHECK_OK(BatchSchedulerRetrier<FakeTask>::Create(
192192
options, std::move(stubborn_scheduler), &retrier));
193193

194-
Notification done;
194+
absl::Notification done;
195195
std::unique_ptr<Thread> run_retrier(Env::Default()->StartThread(
196196
{}, "RunRetrier",
197197
[&retrier, &done]() {

tensorflow_serving/batching/batching_session.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ limitations under the License.
2626
#include <vector>
2727

2828
#include "absl/container/fixed_array.h"
29+
#include "absl/synchronization/notification.h"
2930
#include "tensorflow/core/framework/cost_graph.pb.h"
3031
#include "tensorflow/core/framework/tensor.h"
3132
#include "tensorflow/core/framework/tensor_shape.h"
3233
#include "tensorflow/core/framework/tensor_util.h"
3334
#include "tensorflow/core/kernels/batching_util/input_split_metadata.h"
3435
#include "tensorflow/core/lib/core/errors.h"
35-
#include "tensorflow/core/lib/core/notification.h"
3636
#include "tensorflow/core/lib/core/status.h"
3737
#include "tensorflow/core/lib/gtl/cleanup.h"
3838
#include "tensorflow/core/lib/monitoring/counter.h"
@@ -435,7 +435,7 @@ absl::Status BatchingSession::InternalRun(
435435

436436
outputs->clear();
437437

438-
Notification done;
438+
absl::Notification done;
439439
absl::Status status;
440440
auto task = std::unique_ptr<BatchingSessionTask>(new BatchingSessionTask);
441441
task->enqueue_time_micros = EnvTime::NowMicros();

tensorflow_serving/batching/batching_session.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ limitations under the License.
2626
#include <utility>
2727
#include <vector>
2828

29+
#include "absl/synchronization/notification.h"
2930
#include "absl/types/optional.h"
3031
#include "tensorflow/core/kernels/batching_util/basic_batch_scheduler.h"
3132
#include "tensorflow/core/kernels/batching_util/batch_scheduler.h"
@@ -180,7 +181,7 @@ struct BatchingSessionTask : public BatchTask {
180181

181182
// Fields populated when a task is processed (as part of a batch), and
182183
// returned by BatchingSession when a task is complete.
183-
Notification* done;
184+
absl::Notification* done;
184185
Status* status;
185186
std::vector<Tensor>* outputs;
186187
RunMetadata* run_metadata;

tensorflow_serving/batching/batching_session_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ TEST_P(BatchingSessionTest, BatchingWithLargeBatch) {
375375
Tensor expected_output1 =
376376
test::AsTensor<float>({4.5, 5, 5.5, 6}, {1, 2, 2});
377377
std::vector<Tensor> output1;
378-
Notification notify;
378+
absl::Notification notify;
379379
std::unique_ptr<Thread> first_request_thread(
380380
Env::Default()->StartThread(ThreadOptions(), "first_request", [&] {
381381
auto status =
@@ -991,7 +991,7 @@ TEST_P(BatchingSessionTest, EnqueuedLongerThanTimeout) {
991991
ASSERT_FALSE(scheduler == nullptr);
992992

993993
// Enqueue a request with a timeout specified via RunOptions.
994-
Notification request_returned;
994+
absl::Notification request_returned;
995995
auto issue_request = [&batching_session, &request_returned] {
996996
Tensor input = test::AsTensor<float>({100.0f, 42.0f}, {2});
997997
RunOptions run_options;

tensorflow_serving/batching/streaming_batch_scheduler.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ limitations under the License.
1717
#define TENSORFLOW_SERVING_BATCHING_STREAMING_BATCH_SCHEDULER_H_
1818

1919
#include <stddef.h>
20+
2021
#include <algorithm>
2122
#include <functional>
2223
#include <memory>
2324
#include <string>
2425
#include <utility>
2526

27+
#include "absl/synchronization/notification.h"
2628
#include "tensorflow/core/kernels/batching_util/batch_scheduler.h"
2729
#include "tensorflow/core/lib/core/errors.h"
28-
#include "tensorflow/core/lib/core/notification.h"
2930
#include "tensorflow/core/lib/core/status.h"
3031
#include "tensorflow/core/lib/core/threadpool.h"
3132
#include "tensorflow/core/platform/cpu_info.h"
@@ -283,7 +284,7 @@ class SingleTaskScheduler {
283284
uint64_t last_task_time_ = 0;
284285

285286
// A notification for stopping the thread, during destruction.
286-
Notification stop_;
287+
absl::Notification stop_;
287288

288289
// The name of 'thread_'.
289290
const string thread_name_;

0 commit comments

Comments
 (0)