Compatibility issue with rasa - chatbot

Cannot convert a symbolic Tensor (dialogue_encoder/strided_slice_4:0) to a numpy array.
I am getting this error with using rasa==1.10.3 having tensorflow of 2.2 and numpy==1.18.5

Try to upgrade numpy to numpy 1.19.5
pip install numpy==1.19.5
This should fix the problem.
Also for Rasa's version, I am afraid rasa==1.10.3 is not a supported version. You can check the Compatibility Matrix from here:
https://rasa.com/docs/rasa-x/changelog/compatibility-matrix/

Related

importing base from deap library

i am using python 3.10, pip 22.1.1, setuptools 58.0.0 and deap 1.3.1
when i am imporing base from deap it shoed error and could not fix it.
[error message while importing base][1]
import deap
from deap import base
importing creator and tools worked but base has not been imported.
help me.
[1]: https://i.stack.imgur.com/WWhBY.png
Deap is using Python2 syntax here so Python 3.10 doesn't support it and so there is a syntax error. Before setuptool 58, it uses a builtin tool called 2to3 to automatically convert such Python 2 syntax to corresponding Python 3 one but 2to3 tool is just a temporary solution that helps Python 2 to Python 3 transition more smoothly and since Python 2 is already EOL the 2to3 tool is also dropped since setuptool 58. Without conversion Python 3.10 won't load Python 2 code. Deap developers are aware of the issue and solving it (see this issue). For now, you can downgrade setuptool version to 57 using pip install --upgrade setuptools==57.5 and wait deap to fix the issue.

Got cluster not defined when trying to run cluster.vq.vq() in Scipy lib

I am trying to learn anomaly detection by following :
https://github.com/sayakpaul/FloydHub-Anomaly-Detection-Blog/blob/master/FloydHub%20Anomaly%20Detection%20Blog.ipynb
I installed necessary libraries using:
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
cluster.vq.vq() is included in these libraries. However i am getting name error :
NameError: name 'cluster' is not defined
Any help is appreciated.
Now i solved my own question,
You just need to import:
from scipy.cluster.vq import vq
and instead of cluster.vq.vq(), vq() is enough

Pytorch error on multi-GPU setup: cannot import name 'invoke_remote_python_udf' from 'torch.distributed'

I'm getting this below error when importing Pytorch.
"cannot import name 'invoke_remote_python_udf' from 'torch.distributed'"
I faced the similar problem. For me , the problem was occuring due to mismatch in cuda version. I am using conda environment.
In my system the nvcc --version showed the result as 10.0' , while I had mistakenly install the pytorch for cuda version10.1`
I removed the torch and torchvision and re-installed them using the following command:
conda install pytorch torchvision cuda100 -c pytorch.
Installing the package cuda100 solved the problem.

Upgrading Scipy on IronPython

I'm kind of new to Scipy and IronPython, so please excuse any dummy question I might be asking.
Anyway, I'm trying to upgrade my scipy version to >1.1 on my IronPython 2.7.5 (OS is Windows 7 64bit) but I am not really sure how to do it.
My current scipy version is 1.0.0.
I've tried to run from command prompt:
ipy -X:Frames -m pip install --upgrade scipy
But I'm getting this:
Downloading/unpacking scipy
C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no para
meters
# urllib3/connectionpool.py
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement scipy
Cleaning up...
No distributions at all found for scipy
Any help on how to get it to work will be appreciated. Alternatively, if there are other ways to easily install newer compiled version of scipy on IronPython env, it's also OK - I just need to know.

Checking version of cv2 in python 3.7

I have recently just installed cv2 for python 3.7 on a Mac os (Mojave). I have no problems importing it, but when I try to check the version with
cv2._version_
but I get
AttributeError: module 'cv2' has no attribute '_version'
can anyone help? thanks!
version needs to have double underscores (_)
To check version via python (installed through pip)
import cv2
print(cv2.__version__)
To check version for homebrew installs:
brew info opencv
or
brew info opencv3
(depending on how you installed it)