Rasa version: 2.0.0rc4 on Windows 10 1909
Python version: 3.8
After doing a fresh install in a clean venv, numpy shows some VisibleDeprecationWarnings during training a model:
lib\site-packages\rasa\nlu\classifiers\diet_classifier.py:648: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
model_data.add_features(key, sub_key, [np.array(_features)])lib\site-packages\rasa\utils\tensorflow\model_data.py:587: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
final_data[key][sub_key].append(np.concatenate(np.array(f)))lib\site-packages\rasa\utils\tensorflow\model_data_utils.py:197: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
attribute_features = {MASK: [np.array(attribute_masks)]}
Also note that a clean install is producing dependency conflicts:
pip check
tensorflow 2.3.1 has requirement numpy<1.19.0,>=1.16.0, but you have numpy 1.19.2.
Tested and the warnings are visible in Rasa==2.0.0 as well because of the numpy version being installed is 1.19.2 while the maximum version supported by tensorflow is 1.18.5. Will create a PR to pin the numpy version.
tensorflow==2.3.1 explicitly specifies that the support version of numpy should be <1.19.0 thus running poetry update updates the dependencies and includes the following line to the lockfile:
numpy = ">=1.16.0,<1.19.0"
I will prepare a PR that updates the dependencies.
Most helpful comment
tensorflow==2.3.1explicitly specifies that the support version ofnumpyshould be<1.19.0thus runningpoetry updateupdates the dependencies and includes the following line to the lockfile:I will prepare a PR that updates the dependencies.