vene / marseille

Mining Argument Structures with Expressive Inference (Linear and LSTM Engines)
BSD 3-Clause "New" or "Revised" License
63 stars 29 forks source link

DeprecationWarning #7

Closed anikethjr closed 6 years ago

anikethjr commented 6 years ago

Hey,

I followed the instructions in the README and tried training the rnn-struct model. While running python -m experiments.exp_train_test cdcp --method rnn-struct --model strict I get the following warning multiple times:

/data/defacto/env/lib/python3.5/site-packages/sklearn/preprocessing/label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.

Complete Output:

[dynet] random seed: 3187696204
[dynet] allocating memory: 512MB
[dynet] memory allocation done.
2018-04-03 19:55:42,096 - root - INFO - rnn-struct strict on cdcp ({'max_iter': 10, 'mlp_dropout': 0.2})
2018-04-03 19:55:56,745 - root - INFO - Setting node class weights fact: 1.0, policy: 1.0, reference: 1.0, testimony: 1.0, value: 1.0
2018-04-03 19:55:56,745 - root - INFO - Setting link class weights False: 1.0, True: 30.359851988899166
2018-04-03 19:55:56,745 - root - INFO - Overriding n_embeds to glove size 300
2018-04-03 19:55:56,752 - root - INFO - Initializing embeddings...
2018-04-03 19:55:57,006 - root - INFO - ...done
[epoch=1 eta=0.001 clips=568 updates=579] Iter 0 loss 0.5513
74.4% integer, 24.4% fractional, 1.2% not solved
[epoch=2 eta=0.001 clips=544 updates=567] Iter 1 loss 0.5325
84.9% integer, 13.9% fractional, 1.2% not solved
[epoch=3 eta=0.001 clips=502 updates=560] Iter 2 loss 0.5270
83.0% integer, 16.2% fractional, 0.9% not solved
[epoch=4 eta=0.001 clips=465 updates=541] Iter 3 loss 0.5169
84.5% integer, 13.8% fractional, 1.7% not solved
[epoch=5 eta=0.001 clips=435 updates=540] Iter 4 loss 0.5120
82.3% integer, 15.8% fractional, 1.9% not solved
[epoch=6 eta=0.001 clips=418 updates=535] Iter 5 loss 0.5089
84.7% integer, 12.9% fractional, 2.4% not solved
[epoch=7 eta=0.001 clips=437 updates=526] Iter 6 loss 0.5083
85.0% integer, 12.6% fractional, 2.4% not solved
[epoch=8 eta=0.001 clips=425 updates=513] Iter 7 loss 0.4793
86.6% integer, 11.9% fractional, 1.5% not solved
[epoch=9 eta=0.001 clips=395 updates=489] Iter 8 loss 0.4506
82.3% integer, 16.0% fractional, 1.7% not solved
[epoch=10 eta=0.001 clips=373 updates=459] Iter 9 loss 0.4102
85.0% integer, 13.1% fractional, 1.9% not solved
2018-04-03 21:22:50,187 - root - INFO - Training time: 579.24s/iteration (1.00s/doc-iter)
/data/defacto/env/lib/python3.5/site-packages/sklearn/preprocessing/label.py:151: DeprecationWarning: The truth value of an empty array is ambi
guous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
  if diff:
/data/defacto/env/lib/python3.5/site-packages/sklearn/preprocessing/label.py:151: DeprecationWarning: The truth value of an empty array is ambi
guous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
.
.
.
.
2018-04-03 21:23:48,273 - root - INFO - Prediction time: 0.37s/doc
2018-04-03 21:23:48,274 - root - INFO - Test inference status: 100.0% integer

Also, I am not able to run python -m experiments.plot_test_results.py cdcp which gives the following error:

/data/defacto/env/bin/python: Error while finding spec for 'experiments.plot_test_results.py' (AttributeError: module 'experiments.plot_test_results' has no attribute '__path__')

vene commented 6 years ago

deprecation warnings are just warnings, they do not cause any further issues, you can safely ignore them. You can probably fix it by updating your scikit-learn version.

As for the second issue, you have a typo: the command should be:

python -m experiments.plot_test_results cdcp

note that there is no .py at the end, because we are talking about modules, not files.