Installing newest versions of Python tensorflowjs libraries?

73 views
Skip to first unread message

David Brewer

unread,
Jun 14, 2019, 5:41:03 PM6/14/19
to TensorFlow.js Discussion
Hello! I'd like to install the latest version of the tensorflowjs_converter tool (v1.2.1) because it seems to add some new features that I'd like to use around converting models coming from AutoML. However, it looks like this latest version isn't available from pip yet. Installing tensorflowjs from pip yields version 1.1.2 instead.

Is there a particular schedule under which new tagged versions of these libraries are packaged for pip? Or, is there another mechanism I should be using to most easily try out new versions which haven't yet been packaged?

Thanks!

David

Ping Yu

unread,
Jun 16, 2019, 11:43:45 PM6/16/19
to David Brewer, TensorFlow.js Discussion
Hi David

Thank you for the reminder, we have just published the tensorflowjs 1.2.1 pip package.

Ping

--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/81fba92e-1a8b-4bc4-8f91-8287e908269c%40tensorflow.org.

David Brewer

unread,
Jun 17, 2019, 11:53:27 AM6/17/19
to TensorFlow.js Discussion, david....@instrument.com
Thanks, much appreciated!

David


On Sunday, June 16, 2019 at 8:43:45 PM UTC-7, Ping Yu wrote:
Hi David

Thank you for the reminder, we have just published the tensorflowjs 1.2.1 pip package.

Ping

On Fri, Jun 14, 2019 at 2:41 PM David Brewer <david...@instrument.com> wrote:
Hello! I'd like to install the latest version of the tensorflowjs_converter tool (v1.2.1) because it seems to add some new features that I'd like to use around converting models coming from AutoML. However, it looks like this latest version isn't available from pip yet. Installing tensorflowjs from pip yields version 1.1.2 instead.

Is there a particular schedule under which new tagged versions of these libraries are packaged for pip? Or, is there another mechanism I should be using to most easily try out new versions which haven't yet been packaged?

Thanks!

David

--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tf...@tensorflow.org.

jerr...@gmail.com

unread,
Jun 17, 2019, 2:58:07 PM6/17/19
to Ping Yu, David Brewer, tf...@tensorflow.org

Hi,

 

I just installed TensorFlowJS 1.2.1 and it has a requirement on numpy 1.15.1.  But the tensorflow nightly, installed when following the instructions at https://github.com/tensorflow/tfjs-converter,  calls numpy.code_multiarray_umath’ which is not in numpy 1.15.1.  As a result the tfjs model converter threw a module not found error and was unable to convert my model tf.keras model.

 

I upgraded numpy to 1.16.4 (current), which flagged this error (ERROR: tensorflowjs 1.2.1 has requirement numpy==1.15.1, but you'll have numpy 1.16.4 which is incompatible).  But,  was able to convert my tf.keras model. 

 

So it worked, but I am not sure if this was the correct way to fix this.  Please let me know if there is a better workaround.

 

Thanks,

 

Jerry

Nikhil Thorat

unread,
Jun 17, 2019, 4:16:22 PM6/17/19
to jerry kurata, Ping Yu, David Brewer, TensorFlow.js Discussion
Hi Jerry,

Are you running this in a virtualenv? It may be a good idea to create a separate virtualenv just for the converter to isolate its dependencies (rather than have it stomp on your global deps).

jerr...@gmail.com

unread,
Jun 17, 2019, 4:33:13 PM6/17/19
to Nikhil Thorat, Ping Yu, David Brewer, TensorFlow.js Discussion

Hi Nikhil,

 

I followed the instructions at this page in the repo, https://github.com/tensorflow/tfjs-converter,  to create the python environment.  Perhaps these were incorrect/old?

 

Anyway, I am happy to try other instructions.  Just point me at them!

 

Jerry

Nikhil Thorat

unread,
Jun 17, 2019, 4:38:08 PM6/17/19
to jerry kurata, Ping Yu, David Brewer, TensorFlow.js Discussion
Great point. Ping, can you update the documentation to advise usage in a virtualenv?

I think it should be as simple as creating a virtualenv (or a pipenv) before step 1 and proceeding as the instructions say!

jerr...@gmail.com

unread,
Jun 17, 2019, 4:41:21 PM6/17/19
to Nikhil Thorat, Ping Yu, David Brewer, TensorFlow.js Discussion

Nikhil,

 

As step 0 said, I did run  pipenv to load python 3.6.8, and then create the venv.  The went on to step 1 to install tensorflowjs

Nikhil Thorat

unread,
Jun 17, 2019, 4:43:51 PM6/17/19
to jerry kurata, Ping Yu, David Brewer, TensorFlow.js Discussion
Ah! Apologies, Ping, ignore me re: documentation :)

So inside a pipenv you shouldn't have other dependencies at all that cause a conflict so it's surprising that you saw a numpy compatibility issue. Could you double check that it's executing in a virtualenv?

Alternatively this may mean that two of our packages have dependencies on numpy that are incompatible. Ping, can you check this?

Sasha Illarionov

unread,
Jun 17, 2019, 6:13:10 PM6/17/19
to TensorFlow.js Discussion, jerr...@gmail.com, pi...@google.com, david....@instrument.com
Fixing this might be as simple as bumping the numpy version, as we have already done for tensorflowjs 0.8.x (see https://github.com/tensorflow/tfjs-converter/blob/0.8.x/python/requirements.txt).

To unsubscribe from this group and stop receiving emails from it, send an email to tf...@tensorflow.org.

--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tf...@tensorflow.org.

--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to tf...@tensorflow.org.

Daniel Smilkov

unread,
Jun 17, 2019, 6:17:12 PM6/17/19
to Sasha Illarionov, TensorFlow.js Discussion, jerr...@gmail.com, Ping Yu, david....@instrument.com
That makes sense. Sasha, would you be willing to send a quick PR to the converter? Thank you!

Daniel


To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/4cdee8d4-45d3-46ee-8c6f-f85d151fdbf3%40tensorflow.org.
Reply all
Reply to author
Forward
0 new messages