Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Tensorflow.js dependency the right way #97

Closed
vvmnnnkv opened this issue Feb 8, 2020 · 0 comments · Fixed by #98
Closed

Include Tensorflow.js dependency the right way #97

vvmnnnkv opened this issue Feb 8, 2020 · 0 comments · Fixed by #98
Assignees

Comments

@vvmnnnkv
Copy link
Member

vvmnnnkv commented Feb 8, 2020

Problem

  1. syft.js demo app throws several warnings during startup:
webgl backend was already registered. Reusing existing backend factory.
cpu backend was already registered. Reusing existing backend factory.
Platform browser has already been set. Overwriting the platform with [object Object].
syft.js/src/_helpers.js 33:6-23
"export 'hasOwnProperty' (imported as 'tf') was not found in '@tensorflow/tfjs'
  1. Unit tests display lots of warnings like these:
    console.warn node_modules/@tensorflow/tfjs-core/dist/log.js:26
      
      ============================
      Hi there �. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @t
ensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
      ============================

Expected behavior

1 - It seems that TFJS library is being initialized multiple times. We prefer to produce the bundle where the library is NOT included in syft.js itself, instead it is expected to be loaded separately (like in demo app).

2 - It would be nice to suppress these warnings, or use tfjs-node specifically for unit tests to avoid them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant