aiva: Python client fails to start when receiving info or warning message from imported python modules

hi @kengz!

(hopefully I am not mistaken) it looks like client.py will fail to start and return an error as soon as any message is received, regardless of the type of message (warning, info, not necessarily errors).

Here is how I got to this conclusion:

  1. I grabbed the dnn_titanic_train.py (actually all AI scripts too) from AIVA v3 and brought them over to my local clone of AIVA v4
  2. I installed all required python modules in my virtual env, especially tensorflow with GPU support

==> When starting the node app (npm start --debug), I get the following: ERROR I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally

This actually not an error message, when starting a python console and running import tensorflow, several messages telling me the successfully loaded cuda libs. I can also run the MNIST training example from TF, etc.

So, to double-check it wasn’t caused by the GPU-TF version, I made another virtual env, this time with the CPU tensorflow version. Then I got warning messages from tensorflow: ERROR <...>/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 <...>, DeprecationWarning) which I took care of by upgrading the dnn_titanic_train.py code so that it works on tensorflow v0.11RC1 (also DNNClassifier class has changed, etc.).

Then I got another tensorflow warning I couldn’t get past: ERROR WARNING:tensorflow:float64 is not supported by many models, consider casting to float32 which should be released in the official tensorflow v0.11 (link to issue).

In theory, to make it work, I would have to go back to tensorflow v0.9 or earlier (provided I don’t encounter other warning messages). Also we can forget about the GPU tensorflow.

Bottomline, these messages are not error messages but are interpreted as such. Do you confirm this problem?

Thanks for your insight!

(btw, I’m on the cgkb branch but it shouldn’t matter I think)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

You are probably onto something with this idea. I modified the src/start-io.js so that it launches the python3 of my virtualenv:

    lang = _.replace(lang, 'python3', PYPATH)
    global.log.info(`AYA Starting socketIO client for ${lang} at ${process.env.IOPORT}`) // you'll see below why I put AYA as a marker

and I got this output:

[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] DEBUG import js lib from client.js
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] INFO Starting socketIO client for js at 6466
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] INFO AYA Starting socketIO client for /path/to/virtualenv/python at 6466
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] DEBUG Set TELEGRAM PORT: 8443
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] DEBUG ngrok options: {
  "proto": "http",
  "addr": 8443,
  "authtoken": "XXX"
}
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] INFO Starting socketIO client for python3 at 6466
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] ERROR Traceback (most recent call last):
  File "/path/to/aiva/node_modules/spacy-nlp/src/client.py", line 12, in <module>
    import websocket
ImportError: No module named 'websocket'

[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] DEBUG js XXX joined, 3 remains
[Tue Nov 01 2016 16:14:30 GMT+0000 (utc)] ERROR An incompatible websocket library is conflicting with the one we need.
You can remove the incompatible library and install the correct one

Note that the client.py is properly started with the correct python env: AYA Starting socketIO client for /path/to/virtualenv/python at 6466

but then we see this one: Starting socketIO client for python3 at 6466

meaning it’s starting a new python process, using the default system env (which doesn’t have modules installed, hence the websocket import error). So the question is: where is this new python instruction starter coming from? I searched the entire AIVA directory for a logging that is Starting socketIO client for (and other variations) but couldn’t find anything except the explicit Starting socketIO client for js at here. I looked at other usage of the variable ioClientCmds without success either.

It must be coming from somewhere right?