Skip to content

Commit 0b04a64

Browse files
SimpleML Teamcopybara-github
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 610342411
1 parent 3c467c6 commit 0b04a64

File tree

1 file changed

+10
-9
lines changed
  • tensorflow_decision_forests/tensorflow/ops/inference

1 file changed

+10
-9
lines changed

tensorflow_decision_forests/tensorflow/ops/inference/kernel.cc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ class SimpleMLInferenceOp : public OpKernel {
12751275

12761276
void Compute(OpKernelContext* ctx) override {
12771277
// Make sure the model is available.
1278-
tf::StatusOr<YggdrasilModelResource*> model_resource_or =
1278+
absl::StatusOr<YggdrasilModelResource*> model_resource_or =
12791279
GetModelResource(ctx);
12801280
OP_REQUIRES_OK(ctx, model_resource_or.status());
12811281
YggdrasilModelResource* model_resource = model_resource_or.value();
@@ -1341,7 +1341,8 @@ class SimpleMLInferenceOp : public OpKernel {
13411341
// "SimpleMLInferenceOp" class.
13421342
//
13431343
// This method is thread safe.
1344-
tf::StatusOr<YggdrasilModelResource*> GetModelResource(OpKernelContext* ctx) {
1344+
absl::StatusOr<YggdrasilModelResource*> GetModelResource(
1345+
OpKernelContext* ctx) {
13451346
{
13461347
tf::tf_shared_lock l(model_container_mutex_);
13471348
if (model_container_) {
@@ -1364,7 +1365,7 @@ class SimpleMLInferenceOp : public OpKernel {
13641365
// Imports the model resource.
13651366
//
13661367
// The returned resource IS tracked with ref count.
1367-
virtual tf::StatusOr<YggdrasilModelResource*> ImportModelResource(
1368+
virtual absl::StatusOr<YggdrasilModelResource*> ImportModelResource(
13681369
OpKernelContext* ctx) {
13691370
// The resource exists but is not tracked in the class.
13701371
//
@@ -1414,7 +1415,7 @@ class SimpleMLInferenceOp : public OpKernel {
14141415

14151416
// Gets the c++ references on all the input tensor values of the inference op.
14161417
// In other words, get the input tensor and cast them to the expected type.
1417-
tf::StatusOr<InputTensors> LinkInputTensors(
1418+
absl::StatusOr<InputTensors> LinkInputTensors(
14181419
OpKernelContext* ctx, const FeatureIndex& feature_index) {
14191420
const Tensor* numerical_features_tensor = nullptr;
14201421
const Tensor* boolean_features_tensor = nullptr;
@@ -1471,8 +1472,8 @@ class SimpleMLInferenceOp : public OpKernel {
14711472

14721473
// Allocates and gets the c++ references to all the output tensor values of
14731474
// the inference op.
1474-
tf::StatusOr<OutputTensors> LinkOutputTensors(OpKernelContext* ctx,
1475-
const int batch_size) {
1475+
absl::StatusOr<OutputTensors> LinkOutputTensors(OpKernelContext* ctx,
1476+
const int batch_size) {
14761477
Tensor* dense_predictions_tensor = nullptr;
14771478
Tensor* dense_col_representation_tensor = nullptr;
14781479

@@ -1489,7 +1490,7 @@ class SimpleMLInferenceOp : public OpKernel {
14891490
}
14901491

14911492
// Allocates and gets the c++ references to the output leaves.
1492-
tf::StatusOr<OutputLeavesTensors> LinkOutputLeavesTensors(
1493+
absl::StatusOr<OutputLeavesTensors> LinkOutputLeavesTensors(
14931494
OpKernelContext* ctx, const int batch_size, const int num_trees) {
14941495
Tensor* leaves_tensor = nullptr;
14951496
TF_RETURN_IF_ERROR(ctx->allocate_output(
@@ -1574,7 +1575,7 @@ class SimpleMLInferenceOpWithHandle : public SimpleMLInferenceOp {
15741575

15751576
~SimpleMLInferenceOpWithHandle() override {}
15761577

1577-
tf::StatusOr<YggdrasilModelResource*> ImportModelResource(
1578+
absl::StatusOr<YggdrasilModelResource*> ImportModelResource(
15781579
OpKernelContext* ctx) override {
15791580
YggdrasilModelResource* res;
15801581
TF_RETURN_IF_ERROR(GetModelResourceFromResourceHandle(ctx, &res));
@@ -1594,7 +1595,7 @@ class SimpleMLInferenceLeafIndexOpWithHandle : public SimpleMLInferenceOp {
15941595

15951596
~SimpleMLInferenceLeafIndexOpWithHandle() override {}
15961597

1597-
tf::StatusOr<YggdrasilModelResource*> ImportModelResource(
1598+
absl::StatusOr<YggdrasilModelResource*> ImportModelResource(
15981599
OpKernelContext* ctx) override {
15991600
YggdrasilModelResource* res;
16001601
TF_RETURN_IF_ERROR(GetModelResourceFromResourceHandle(ctx, &res));

0 commit comments

Comments
 (0)