Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Test failure #15

Open
mrlucas opened this issue Oct 6, 2019 · 1 comment
Open

Test failure #15

mrlucas opened this issue Oct 6, 2019 · 1 comment

Comments

@mrlucas
Copy link

mrlucas commented Oct 6, 2019

Hi, I'm getting a test failure.
Here's the list of commands I used to install. This is on a fresh Debian Stretch vm (9.11):
apt install curl
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt update
apt install nodejs
apt-get install -y git ssh tar gzip ca-certificates build-essential sqlite3 ffmpeg
apt-get install python-dev portaudio19-dev
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install python_speech_features h5py numpy scipy keras tensorflow zerorpc sounddevice psutil
git clone https://github.com/adblockradio/adblockradio.git
cd adblockradio/
npm install
npm test

Below is the full output of "npm test", the most telling of the errors seems to be:
File "/root/adblockradio/predictor-ml/mlpredict.py", line 57, in get_session
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=gpu_fraction)
AttributeError: 'module' object has no attribute 'GPUOptions'

It sounds like it may be a dependency version issue? There is no GPU passed through to the vm, which may also be a factor.

adblockradio@1.0.0 test /root/adblockradio
mocha --delay test/file.js && mocha --delay test/file.js --mljs && mocha --delay test/online.js && mocha --delay test/online.js --mljs && mocha --delay test/offline.js && mocha --delay test/offline.js --mljs

[2019-10-06T12:53:22.667Z] warn post-processing: updating ML model is not possible when analysing files. skip.
[2019-10-06T12:53:22.671Z] warn post-processing: updating hotlist DB is not possible when analysing files. skip.
[2019-10-06T12:53:22.672Z] warn post-processing: updating hotlist DB is not possible when analysing files. skip.
[2019-10-06T12:53:22.673Z] warn post-processing: not possible (yet?) to stop the processing of files. please kill the process instead.
[2019-10-06T12:53:22.674Z] info test-file: refresh attempted. result=false
[2019-10-06T12:53:23.177Z] info checkModelUpdates: /root/adblockradio/model/France_RTL/model.keras.tar.gz is up to date
[2019-10-06T12:53:23.863Z] info checkModelUpdates: /root/adblockradio/model/France_RTL/hotlist.sqlite.tar.gz is up to date
[2019-10-06T12:53:23.864Z] info predictor: run predictor on file /root/adblockradio/test/file.mp3 with config={"predInterval":1,"saveDuration":10,"enablePredictorMl":true,"enablePredictorHotlist":true,"saveMetadata":true,"verbose":false,"modelPath":"/root/adblockradio/model","hotlistFile":"France_RTL/hotlist.sqlite","modelUpdates":true,"modelUpdateInterval":60,"JSPredictorMl":false,"modelFile":"France_RTL/model.keras"}
[2019-10-06T12:53:23.874Z] debug predictor: readAmount=44100 bytes
[2019-10-06T12:53:23.878Z] info pred-hotlist: open hotlist db /root/adblockradio/model/France_RTL/hotlist.sqlite (memory=true)
[2019-10-06T12:53:23.881Z] info pred-ml: France_RTL Python predictor. __dirname=/root/adblockradio/predictor-ml env: PKG=false Electron=false
[2019-10-06T12:53:24.063Z] info pred-hotlist: /root/adblockradio/model/France_RTL/hotlist.sqlite db found
[2019-10-06T12:53:24.311Z] info pred-hotlist: France_RTL: Hotlist ready
[2019-10-06T12:53:25.119Z] info predictor: decoding finished
[2019-10-06T12:53:27.056Z] error pred-ml: France_RTL mlpredict child stderr data: Traceback (most recent call last):

[2019-10-06T12:53:27.057Z] error pred-ml: France_RTL mlpredict child stderr data: File "/root/adblockradio/predictor-ml/mlpredict.py", line 64, in

[2019-10-06T12:53:27.059Z] error pred-ml: France_RTL mlpredict child stderr data: tensorflow_backend.set_session(get_session())
File "/root/adblockradio/predictor-ml/mlpredict.py", line 57, in get_session
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=gpu_fraction)
AttributeError: 'module' object has no attribute 'GPUOptions'

[2019-10-06T12:54:22.027Z] error test-file: analysis timed out or was too slow. kill it.

File analysis (Python child process)
1) should have emitted data
2) should have reached the end of the file
✓ should reject attempts to reload ML model, hotlist DB or metadata scraper during analysis.
✓ should not have thrown errors
3) should have exited properly
4) should write results in JSON format

2 passing (46ms)
4 failing

  1. File analysis (Python child process)
    should have emitted data:

    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

assert(gotData)

  + expected - actual

  -false
  +true

  at Context.<anonymous> (test/file.js:93:4)
  1. File analysis (Python child process)
    should have reached the end of the file:

    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

assert(finished)

  + expected - actual

  -false
  +true

  at Context.<anonymous> (test/file.js:98:4)
  1. File analysis (Python child process)
    should have exited properly:
    AssertionError [ERR_ASSERTION]: null == 0
    at Context. (test/file.js:112:11)

  2. File analysis (Python child process)
    should write results in JSON format:

    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

assert(fileOutputIsSane)

  + expected - actual

  -false
  +true

  at Context.<anonymous> (test/file.js:117:4)

npm ERR! Test failed. See above for more details.

@dest4
Copy link
Member

dest4 commented Oct 8, 2019

Thanks for the nice report. It's difficult to update Tensorflow across the whole backend, but I'll have to do it and better manage version pinning.

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

No branches or pull requests

2 participants