Skip to content

Commit

Permalink
[Embedding] Log error when EV has been initialized in EV Import OP. (#…
Browse files Browse the repository at this point in the history
…971)

Signed-off-by: chenbangduo.cbd <[email protected]>
  • Loading branch information
JackMoriarty authored Feb 22, 2024
1 parent 70b32df commit eb5f30d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tensorflow/core/kernels/kv_variable_restore_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ class KvResourceImportV3Op: public AsyncOpKernel {

core::ScopedUnref unref_me(ev);

// EV should not be initialized at this time.
if (ev->IsInitialized()) {
LOG(ERROR) << "Import parameter for EV (" << name_string
<< ") failed, this EV has already been initialized.";
}

auto do_compute = [this, context, file_name_string, ev,
name_string, done] () {
BundleReader reader(Env::Default(), file_name_string);
Expand Down

0 comments on commit eb5f30d

Please sign in to comment.