Hey guys. So I was able to load my model successfully in my local environment and use the interpreter = Interpreter.load(dir)
and interpreter.parse("some phrase")
to extract the RASA-based JSON locally. However, I am having trouble when porting my code into the remote server which is a CentOS 7-based VM. I was using Python 3.7.3 locally, so I installed that exact version and used the requirements.txt output from my local environment to create another virtual environment in my remote server. However, I seem to be running into some tensorflow related issues:
Traceback (most recent call last): File “model_api_service.py”, line 9, in interpreter = Interpreter.load(model_directory) File “/home/username/Rasa-Service/venv/lib/python3.7/site-packages/rasa/nlu/model.py”, line 301, in load return Interpreter.create(model_metadata, component_builder, skip_validation) File “/home/username/Rasa-Service/venv/lib/python3.7/site-packages/rasa/nlu/model.py”, line 323, in create components.validate_requirements(model_metadata.component_classes) File “/home/ramisettyb/Rasa-Service/venv/lib/python3.7/site-packages/rasa/nlu/components.py”, line 48, in validate_requirements ", ".join(failed_imports) Exception: Not all required importable packages are installed. To use this pipeline, you need to install the missing dependencies. Please install the package(s) that contain the module(s): tensorflow
I’m not sure why this error is occurring given that I am running with the exact same packages and versions listed in my local environment and am using the exact same Python version in my CentOS 7 remote VM. For reference, I am using PyCharm IDE to execute it locally. Could this be a operating system incompatibility? My project also consists of the unpacked folder of the tar.gz model file which was copied over to the remote server along with the rest of the project directory contents. I wasn’t able to train the model in the remote server either.
Update: I had my project imported by someone else’s Mac and they were able easily run it after building a virtual environment from my requirements.txt file. So there must be some type of issue with the centOS or the way the machine is setup