Skip to content

Commit

Permalink
[EV] Output error log if EV has been initialized when importing EV pa…
Browse files Browse the repository at this point in the history
…rameters.

Signed-off-by: chenbangduo.cbd <chenbangduo.cbd@alibaba-inc.com>
  • Loading branch information
JackMoriarty committed Feb 20, 2024
1 parent d84837f commit b7b8d51
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 b7b8d51

Please sign in to comment.