@@ -67,7 +67,7 @@ tensorflow::Status YggdrasilModelContainer::LoadModel(
67
67
}
68
68
69
69
YDF_LOG (INFO) << " Loading model from " << model_path;
70
- return tf ::OkStatus ();
70
+ return absl ::OkStatus ();
71
71
}
72
72
73
73
// OP loading a model from disk to memory.
@@ -195,7 +195,7 @@ tf::Status FeatureSet::Link(
195
195
}
196
196
}
197
197
198
- return tf ::OkStatus ();
198
+ return absl ::OkStatus ();
199
199
}
200
200
201
201
tf::Status FeatureSet::IterateFeatures (
@@ -235,46 +235,46 @@ tf::Status FeatureSet::IterateFeatures(
235
235
TF_RETURN_IF_ERROR (lambda_hash (feature.second , feature.first ));
236
236
}
237
237
238
- return tf ::OkStatus ();
238
+ return absl ::OkStatus ();
239
239
}
240
240
241
241
tf::Status FeatureSet::Unlink () {
242
242
TF_RETURN_IF_ERROR (IterateFeatures (
243
243
[](SimpleMLNumericalFeature::Resource* feature, const int feature_idx) {
244
244
feature->Unref ();
245
- return tf ::OkStatus ();
245
+ return absl ::OkStatus ();
246
246
},
247
247
[](SimpleMLCategoricalStringFeature::Resource* feature,
248
248
const int feature_idx) {
249
249
feature->Unref ();
250
- return tf ::OkStatus ();
250
+ return absl ::OkStatus ();
251
251
},
252
252
[](SimpleMLCategoricalIntFeature::Resource* feature,
253
253
const int feature_idx) {
254
254
feature->Unref ();
255
- return tf ::OkStatus ();
255
+ return absl ::OkStatus ();
256
256
},
257
257
[](SimpleMLCategoricalSetStringFeature::Resource* feature,
258
258
const int feature_idx) {
259
259
feature->Unref ();
260
- return tf ::OkStatus ();
260
+ return absl ::OkStatus ();
261
261
},
262
262
[](SimpleMLCategoricalSetIntFeature::Resource* feature,
263
263
const int feature_idx) {
264
264
feature->Unref ();
265
- return tf ::OkStatus ();
265
+ return absl ::OkStatus ();
266
266
},
267
267
[](SimpleMLHashFeature::Resource* feature, const int feature_idx) {
268
268
feature->Unref ();
269
- return tf ::OkStatus ();
269
+ return absl ::OkStatus ();
270
270
}));
271
271
numerical_features_.clear ();
272
272
categorical_string_features_.clear ();
273
273
categorical_int_features_.clear ();
274
274
categorical_set_string_features_.clear ();
275
275
categorical_set_int_features_.clear ();
276
276
hash_features_.clear ();
277
- return tf ::OkStatus ();
277
+ return absl ::OkStatus ();
278
278
}
279
279
280
280
// Initialize a dataset (including the dataset's dataspec) from the linked
@@ -292,7 +292,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
292
292
if (num_examples == -1 ) {
293
293
num_examples = observed_num_examples;
294
294
num_batches = observed_num_batches;
295
- return tf ::OkStatus ();
295
+ return absl ::OkStatus ();
296
296
}
297
297
if (num_examples != observed_num_examples) {
298
298
return tf::Status (
@@ -301,7 +301,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
301
301
" different input features $0 != $1." ,
302
302
num_examples, observed_num_examples));
303
303
}
304
- return tf ::OkStatus ();
304
+ return absl ::OkStatus ();
305
305
};
306
306
307
307
for (int feature_idx = 0 ; feature_idx < NumFeatures (); feature_idx++) {
@@ -346,7 +346,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
346
346
TF_RETURN_IF_ERROR (apply_guide (feature->feature_name (), col));
347
347
TF_RETURN_IF_ERROR (set_num_examples (feature->indexed_data ().size (),
348
348
feature->NumBatches ()));
349
- return tf ::OkStatus ();
349
+ return absl ::OkStatus ();
350
350
},
351
351
[&](SimpleMLCategoricalIntFeature::Resource* feature,
352
352
const int feature_idx) {
@@ -420,7 +420,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
420
420
dataset::UpdateComputeSpecDiscretizedNumerical (value, col, col_acc);
421
421
}
422
422
}
423
- return tf ::OkStatus ();
423
+ return absl ::OkStatus ();
424
424
},
425
425
[&](SimpleMLCategoricalStringFeature::Resource* feature,
426
426
const int feature_idx) {
@@ -432,7 +432,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
432
432
dataset::UpdateCategoricalStringColumnSpec (
433
433
reverse_index[indexed_value], col, col_acc));
434
434
}
435
- return tf ::OkStatus ();
435
+ return absl ::OkStatus ();
436
436
},
437
437
[&](SimpleMLCategoricalIntFeature::Resource* feature,
438
438
const int feature_idx) {
@@ -442,7 +442,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
442
442
TF_RETURN_IF_ERROR_FROM_ABSL_STATUS (
443
443
dataset::UpdateCategoricalIntColumnSpec (value, col, col_acc));
444
444
}
445
- return tf ::OkStatus ();
445
+ return absl ::OkStatus ();
446
446
},
447
447
[&](SimpleMLCategoricalSetStringFeature::Resource* feature,
448
448
const int feature_idx) {
@@ -452,7 +452,7 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
452
452
TF_RETURN_IF_ERROR_FROM_ABSL_STATUS (
453
453
dataset::UpdateCategoricalStringColumnSpec (value, col, col_acc));
454
454
}
455
- return tf ::OkStatus ();
455
+ return absl ::OkStatus ();
456
456
},
457
457
[&](SimpleMLCategoricalSetIntFeature::Resource* feature,
458
458
const int feature_idx) {
@@ -462,17 +462,17 @@ tf::Status FeatureSet::InitializeDatasetFromFeatures(
462
462
TF_RETURN_IF_ERROR_FROM_ABSL_STATUS (
463
463
dataset::UpdateCategoricalIntColumnSpec (value, col, col_acc));
464
464
}
465
- return tf ::OkStatus ();
465
+ return absl ::OkStatus ();
466
466
},
467
467
[&](SimpleMLHashFeature::Resource* feature, const int feature_idx) {
468
468
// Nothing to do.
469
- return tf ::OkStatus ();
469
+ return absl ::OkStatus ();
470
470
}));
471
471
472
472
TF_RETURN_IF_ERROR_FROM_ABSL_STATUS (dataset::FinalizeComputeSpec (
473
473
guide, accumulator, dataset->mutable_data_spec ()));
474
474
475
- return tf ::OkStatus ();
475
+ return absl ::OkStatus ();
476
476
}
477
477
478
478
tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset (
@@ -492,7 +492,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
492
492
" between features for feature $0 != $1. For feature $2." ,
493
493
dataset->nrow (), num_rows, feature->feature_name ()));
494
494
}
495
- return tf ::OkStatus ();
495
+ return absl ::OkStatus ();
496
496
};
497
497
498
498
TF_RETURN_IF_ERROR (IterateFeatures (
@@ -524,7 +524,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
524
524
*col_data->mutable_values () = std::move (*feature->mutable_data ());
525
525
}
526
526
feature->mutable_data ()->clear ();
527
- return tf ::OkStatus ();
527
+ return absl ::OkStatus ();
528
528
},
529
529
[&](SimpleMLCategoricalStringFeature::Resource* feature,
530
530
const int feature_idx) -> tensorflow::Status {
@@ -550,7 +550,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
550
550
}
551
551
// Note: Thread annotations don't work in lambdas.
552
552
feature->non_mutex_protected_clear ();
553
- return tf ::OkStatus ();
553
+ return absl ::OkStatus ();
554
554
},
555
555
[&](SimpleMLCategoricalIntFeature::Resource* feature,
556
556
const int feature_idx) -> tensorflow::Status {
@@ -573,7 +573,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
573
573
col_data->Add (value);
574
574
}
575
575
feature->mutable_data ()->clear ();
576
- return tf ::OkStatus ();
576
+ return absl ::OkStatus ();
577
577
},
578
578
[&](SimpleMLCategoricalSetStringFeature::Resource* feature,
579
579
const int feature_idx) -> tensorflow::Status {
@@ -612,7 +612,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
612
612
col_data->AddVector (tmp_value);
613
613
}
614
614
feature->non_mutex_protected_clear ();
615
- return tf ::OkStatus ();
615
+ return absl ::OkStatus ();
616
616
},
617
617
[&](SimpleMLCategoricalSetIntFeature::Resource* feature,
618
618
const int feature_idx) -> tensorflow::Status {
@@ -664,7 +664,7 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
664
664
col_data->AddVector (tmp_value);
665
665
}
666
666
feature->non_mutex_protected_clear ();
667
- return tf ::OkStatus ();
667
+ return absl ::OkStatus ();
668
668
},
669
669
[&](SimpleMLHashFeature::Resource* feature,
670
670
const int feature_idx) -> tensorflow::Status {
@@ -675,10 +675,10 @@ tf::Status FeatureSet::MoveExamplesFromFeaturesToDataset(
675
675
dataset::VerticalDataset::HashColumn>(feature_idx));
676
676
*col_data->mutable_values () = std::move (*feature->mutable_data ());
677
677
feature->mutable_data ()->clear ();
678
- return tf ::OkStatus ();
678
+ return absl ::OkStatus ();
679
679
}));
680
680
681
- return tf ::OkStatus ();
681
+ return absl ::OkStatus ();
682
682
}
683
683
684
684
int FeatureSet::NumFeatures () const {
@@ -974,7 +974,7 @@ class SimpleMLModelTrainer : public tensorflow::OpKernel {
974
974
feature_set.InitializeDatasetFromFeatures (ctx, guide_, dataset));
975
975
TF_RETURN_IF_ERROR (
976
976
feature_set.MoveExamplesFromFeaturesToDataset (ctx, dataset));
977
- return tf ::OkStatus ();
977
+ return absl ::OkStatus ();
978
978
}
979
979
980
980
bool HasTrainingExamples (tf::OpKernelContext* ctx) {
0 commit comments