Skip to content

Conversation

@kangyizhang
Copy link
Contributor

@kangyizhang kangyizhang commented Jan 2, 2020

Add a new API in the node binding to return the number of loaded TF SavedModel in the backend. This will help testing and users could get a better understanding of the backend.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@kangyizhang kangyizhang changed the title [WIP][node]Add binding function to get number of loaded SavedModel [node]Add node binding api to get number of loaded SavedModel Jan 6, 2020
@kangyizhang kangyizhang requested a review from dsmilkov January 6, 2020 19:42
Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 8 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov and @kangyizhang)


tfjs-node/binding/tfjs_backend.cc, line 1221 at r1 (raw file):

}

napi_value TFJSBackend::GetNumOfSavedModel(napi_env env) {

add "s" at the end: GetNumOfSavedModels


tfjs-node/binding/tfjs_backend.cc, line 1223 at r1 (raw file):

napi_value TFJSBackend::GetNumOfSavedModel(napi_env env) {
  napi_status nstatus;
  napi_value number_of_savedmodel;

nit: rename to "num_saved_models" to be consistent with the snake casting


tfjs-node/binding/tfjs_binding.cc, line 227 at r1 (raw file):

}

static napi_value GetNumOfSavedModel(napi_env env, napi_callback_info info) {

same here, add "s" at the end


tfjs-node/src/nodejs_kernel_backend.ts, line 1967 at r1 (raw file):

  }

  getNumOfSavedModel() {

same here, add "s" at the end. Uou can also shorten it to "getNumModels"

Copy link
Contributor Author

@kangyizhang kangyizhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained


tfjs-node/binding/tfjs_backend.cc, line 1221 at r1 (raw file):

Previously, dsmilkov (Daniel Smilkov) wrote…

add "s" at the end: GetNumOfSavedModels

Done.


tfjs-node/binding/tfjs_backend.cc, line 1223 at r1 (raw file):

Previously, dsmilkov (Daniel Smilkov) wrote…

nit: rename to "num_saved_models" to be consistent with the snake casting

Done.


tfjs-node/binding/tfjs_binding.cc, line 227 at r1 (raw file):

Previously, dsmilkov (Daniel Smilkov) wrote…

same here, add "s" at the end

Done.


tfjs-node/src/nodejs_kernel_backend.ts, line 1967 at r1 (raw file):

Previously, dsmilkov (Daniel Smilkov) wrote…

same here, add "s" at the end. Uou can also shorten it to "getNumModels"

Done.

@kangyizhang kangyizhang merged commit c2d5564 into master Jan 6, 2020
@kangyizhang kangyizhang deleted the node-num branch January 6, 2020 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants