Can't interact with odqa deepavlov (according to medium article)

According to Article:

It claims that after having installed the odqa and running the following line
python -m deeppavlov interact deeppavlov/configs/odqa/en_odqa_infer_wiki.json -d

I run the following code in Python:
from deeppavlov import configs
from deeppavlov.core.commands.infer import build_model
odqa = build_model(configs.odqa.en_odqa_infer_wiki, download = True)
answers = odqa([“Where did guinea pigs originate?”, “When did the Lynmouth floods happen?”, “When is the Bastille Day?”])

Instead of getting the supposed answer:
[“Argentina”, “15-16 August 1952”, “14 July 1789”]
I just get a huge list of warnings and no answer at all.

For some reason whatever of your models I’m trying to run and in which way (either terminal, python or docker, EVERYHTING seems to fail, except the simple NER model) Please respond I haven’t had a response to my posts in 15 days

My log is the following:

2020-04-03 11:48:47.997 INFO in ‘deeppavlov.download’[‘download’] at line 117: Skipped http://files.deeppavlov.ai/datasets/wikipedia/enwiki.tar.gz download because of matching hashes
2020-04-03 11:48:49.46 INFO in ‘deeppavlov.download’[‘download’] at line 117: Skipped http://files.deeppavlov.ai/deeppavlov_data/multi_squad_model_noans_1.1.tar.gz download because of matching hashes
2020-04-03 11:49:20.14 INFO in ‘deeppavlov.download’[‘download’] at line 117: Skipped http://files.deeppavlov.ai/deeppavlov_data/en_odqa.tar.gz download because of matching hashes
[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1076)>
[nltk_data] Error loading stopwords: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1076)>
[nltk_data] Error loading perluniprops: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1076)>
[nltk_data] Error loading nonbreaking_prefixes: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data] unable to get local issuer certificate (_ssl.c:1076)>
2020-04-03 11:49:21.943 INFO in ‘deeppavlov.models.vectorizers.hashing_tfidf_vectorizer’[‘hashing_tfidf_vectorizer’] at line 264: Loading tfidf matrix from /Users/antoniosthanos/.deeppavlov/models/odqa/enwiki_tfidf_matrix.npz
2020-04-03 11:49:52.543 INFO in ‘deeppavlov.dataset_iterators.sqlite_iterator’[‘sqlite_iterator’] at line 57: Connecting to database, path: /Users/antoniosthanos/.deeppavlov/downloads/odqa/enwiki.db
2020-04-03 11:50:03.826 INFO in ‘deeppavlov.dataset_iterators.sqlite_iterator’[‘sqlite_iterator’] at line 112: SQLite iterator: The size of the database is 5180368 documents
2020-04-03 11:50:03.841 INFO in ‘deeppavlov.models.preprocessors.squad_preprocessor’[‘squad_preprocessor’] at line 310: SquadVocabEmbedder: loading saved tokens vocab from /Users/antoniosthanos/.deeppavlov/models/multi_squad_model_noans/emb/vocab_embedder.pckl
2020-04-03 11:50:04.247 INFO in ‘deeppavlov.models.preprocessors.squad_preprocessor’[‘squad_preprocessor’] at line 310: SquadVocabEmbedder: loading saved chars vocab from /Users/antoniosthanos/.deeppavlov/models/multi_squad_model_noans/emb/char_vocab_embedder.pckl
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:37: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:222: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:222: The name tf.train.Optimizer is deprecated. Please use tf.compat.v1.train.Optimizer instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:193: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/common/check_gpu.py:29: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

2020-04-03 11:50:09.135580: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-04-03 11:50:09.159519: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fab51e06530 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-04-03 11:50:09.159532: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:224: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:102: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:139: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

2020-04-03 11:50:10.186 INFO in ‘deeppavlov.core.layers.tf_layers’[‘tf_layers’] at line 615:
Warning! tf.contrib.cudnn_rnn.CudnnCompatibleGRUCell is used. It is okay for inference mode, but if you train your model with this cell it could NOT be used with tf.contrib.cudnn_rnn.CudnnGRUCell later.
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py:122: GRUCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.GRUCell, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/layers/tf_layers.py:591: MultiRNNCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/layers/tf_layers.py:596: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.RNN(cell), which is equivalent to this API
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py:133: Layer.add_variable (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
Please use layer.add_weight method instead.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py:139: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py:155: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/layers/tf_layers.py:808: calling reverse_sequence (from tensorflow.python.ops.array_ops) with seq_dim is deprecated and will be removed in a future version.
Instructions for updating:
seq_dim is deprecated, use seq_axis instead
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/python/util/deprecation.py:507: calling reverse_sequence (from tensorflow.python.ops.array_ops) with batch_dim is deprecated and will be removed in a future version.
Instructions for updating:
batch_dim is deprecated, use batch_axis instead
2020-04-03 11:50:11.29 INFO in ‘deeppavlov.core.layers.tf_layers’[‘tf_layers’] at line 615:
Warning! tf.contrib.cudnn_rnn.CudnnCompatibleGRUCell is used. It is okay for inference mode, but if you train your model with this cell it could NOT be used with tf.contrib.cudnn_rnn.CudnnGRUCell later.
2020-04-03 11:50:11.131 INFO in ‘deeppavlov.core.layers.tf_layers’[‘tf_layers’] at line 615:
Warning! tf.contrib.cudnn_rnn.CudnnCompatibleGRUCell is used. It is okay for inference mode, but if you train your model with this cell it could NOT be used with tf.contrib.cudnn_rnn.CudnnGRUCell later.
2020-04-03 11:50:11.206 INFO in ‘deeppavlov.core.layers.tf_layers’[‘tf_layers’] at line 615:
Warning! tf.contrib.cudnn_rnn.CudnnCompatibleGRUCell is used. It is okay for inference mode, but if you train your model with this cell it could NOT be used with tf.contrib.cudnn_rnn.CudnnGRUCell later.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/utils.py:87: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/utils.py:101: The name tf.AUTO_REUSE is deprecated. Please use tf.compat.v1.AUTO_REUSE instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/utils.py:171: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.Dense instead.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tensorflow_core/python/layers/core.py:187: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
Please use layer.__call__ method instead.
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:193: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/utils.py:139: The name tf.get_variable_scope is deprecated. Please use tf.compat.v1.get_variable_scope instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:203: The name tf.matrix_band_part is deprecated. Please use tf.linalg.band_part instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:212: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.

See tf.nn.softmax_cross_entropy_with_logits_v2.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:127: The name tf.get_collection is deprecated. Please use tf.compat.v1.get_collection instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:127: The name tf.GraphKeys is deprecated. Please use tf.compat.v1.GraphKeys instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/squad/squad.py:93: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.

WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:50: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
2020-04-03 11:50:27.4 INFO in ‘deeppavlov.core.models.tf_model’[‘tf_model’] at line 51: [loading model from /Users/antoniosthanos/.deeppavlov/models/multi_squad_model_noans/model]
WARNING:tensorflow:From /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/core/models/tf_model.py:54: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/deeppavlov/models/doc_retrieval/logit_ranker.py:65: FutureWarning: LogitRanker.call() API will be changed in the future release. Instead of returning Tuple(List[str], List[float] will return Tuple(List[List[str]], List[List[float]]).
’ Tuple(List[List[str]], List[List[float]]).’, FutureWarning)

Process finished with exit code 0

Dear @kostis95,
You are right, there are a lot of WARNINGS in the output, however nothing CRITICAL had happened, so answers should contain answers to the questions. But the answers might be different from what you are expecting from the tutorial. We are continuously improving our ODQA model, that’s why you might experience some inconsistency in answers, however, overall the model’s performance improved drastically.

Yes okay warnings are fine, but there is no output the last line is just:
Process finished with exit code 0
As you can see…, I’m following the whole example, just 5 lines of code. What could be wrong?

Please add print(answers) to your code

Ah yes I put that in there, but still the answers of the three questions are incorrect. According to the example the following three questions are asked:
“Where did guinea pigs originate?”,
“When did the Lynmouth floods happen?”,
“When is the Bastille Day?”

The answers:
‘Andes of South America’,
’1804’,
’ '

The answers are supposed to be: [“Argentina”, “15-16 August 1952”, “14 July 1789”]
So all three are incorrect and even the first answer is not argentina.

So what am I supposed to do about that?