@@ -1275,7 +1275,7 @@ class SimpleMLInferenceOp : public OpKernel {
1275
1275
1276
1276
void Compute (OpKernelContext* ctx) override {
1277
1277
// Make sure the model is available.
1278
- tf ::StatusOr<YggdrasilModelResource*> model_resource_or =
1278
+ absl ::StatusOr<YggdrasilModelResource*> model_resource_or =
1279
1279
GetModelResource (ctx);
1280
1280
OP_REQUIRES_OK (ctx, model_resource_or.status ());
1281
1281
YggdrasilModelResource* model_resource = model_resource_or.value ();
@@ -1341,7 +1341,8 @@ class SimpleMLInferenceOp : public OpKernel {
1341
1341
// "SimpleMLInferenceOp" class.
1342
1342
//
1343
1343
// This method is thread safe.
1344
- tf::StatusOr<YggdrasilModelResource*> GetModelResource (OpKernelContext* ctx) {
1344
+ absl::StatusOr<YggdrasilModelResource*> GetModelResource (
1345
+ OpKernelContext* ctx) {
1345
1346
{
1346
1347
tf::tf_shared_lock l (model_container_mutex_);
1347
1348
if (model_container_) {
@@ -1364,7 +1365,7 @@ class SimpleMLInferenceOp : public OpKernel {
1364
1365
// Imports the model resource.
1365
1366
//
1366
1367
// The returned resource IS tracked with ref count.
1367
- virtual tf ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1368
+ virtual absl ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1368
1369
OpKernelContext* ctx) {
1369
1370
// The resource exists but is not tracked in the class.
1370
1371
//
@@ -1414,7 +1415,7 @@ class SimpleMLInferenceOp : public OpKernel {
1414
1415
1415
1416
// Gets the c++ references on all the input tensor values of the inference op.
1416
1417
// In other words, get the input tensor and cast them to the expected type.
1417
- tf ::StatusOr<InputTensors> LinkInputTensors (
1418
+ absl ::StatusOr<InputTensors> LinkInputTensors (
1418
1419
OpKernelContext* ctx, const FeatureIndex& feature_index) {
1419
1420
const Tensor* numerical_features_tensor = nullptr ;
1420
1421
const Tensor* boolean_features_tensor = nullptr ;
@@ -1471,8 +1472,8 @@ class SimpleMLInferenceOp : public OpKernel {
1471
1472
1472
1473
// Allocates and gets the c++ references to all the output tensor values of
1473
1474
// 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) {
1476
1477
Tensor* dense_predictions_tensor = nullptr ;
1477
1478
Tensor* dense_col_representation_tensor = nullptr ;
1478
1479
@@ -1489,7 +1490,7 @@ class SimpleMLInferenceOp : public OpKernel {
1489
1490
}
1490
1491
1491
1492
// Allocates and gets the c++ references to the output leaves.
1492
- tf ::StatusOr<OutputLeavesTensors> LinkOutputLeavesTensors (
1493
+ absl ::StatusOr<OutputLeavesTensors> LinkOutputLeavesTensors (
1493
1494
OpKernelContext* ctx, const int batch_size, const int num_trees) {
1494
1495
Tensor* leaves_tensor = nullptr ;
1495
1496
TF_RETURN_IF_ERROR (ctx->allocate_output (
@@ -1574,7 +1575,7 @@ class SimpleMLInferenceOpWithHandle : public SimpleMLInferenceOp {
1574
1575
1575
1576
~SimpleMLInferenceOpWithHandle () override {}
1576
1577
1577
- tf ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1578
+ absl ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1578
1579
OpKernelContext* ctx) override {
1579
1580
YggdrasilModelResource* res;
1580
1581
TF_RETURN_IF_ERROR (GetModelResourceFromResourceHandle (ctx, &res));
@@ -1594,7 +1595,7 @@ class SimpleMLInferenceLeafIndexOpWithHandle : public SimpleMLInferenceOp {
1594
1595
1595
1596
~SimpleMLInferenceLeafIndexOpWithHandle () override {}
1596
1597
1597
- tf ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1598
+ absl ::StatusOr<YggdrasilModelResource*> ImportModelResource (
1598
1599
OpKernelContext* ctx) override {
1599
1600
YggdrasilModelResource* res;
1600
1601
TF_RETURN_IF_ERROR (GetModelResourceFromResourceHandle (ctx, &res));
0 commit comments