Can't train models

Traceback (most recent call last): File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main “main”, mod_spec) File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code exec(code, run_globals) File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/main.py”, line 102, in main() File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/main.py”, line 91, in main cmdline_arguments.func(cmdline_arguments) File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/cli/train.py”, line 112, in train_core additional_arguments=additional_arguments, File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/train.py”, line 272, in train_core additional_arguments=additional_arguments, File “uvloop/loop.pyx”, line 1456, in uvloop.loop.Loop.run_until_complete File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/train.py”, line 328, in train_core_async additional_arguments=additional_arguments, File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/train.py”, line 361, in _train_core_with_validated_data additional_arguments=additional_arguments, File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/core/train.py”, line 43, in train policies = config.load(policy_config) File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/core/config.py”, line 28, in load return PolicyEnsemble.from_dict(config_data) File “/home/ips/rasa/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py”, line 319, in from_dict “”.format(policy_name) rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded. Please make sure the name is a valid policy. (venv) ips@ips-H81M-S:~/rasa/rasa$ python -m rasa train nlu -o ./models -c projects/nlu_config.yml --domain projects/domain.yml --u projects/nlu.md -vv usage: rasa [-h] [–version] {init,run,shell,train,interactive,test,visualize,data,export,x} … rasa: error: unrecognized arguments: -o ./models --domain projects/domain.yml --u projects/nlu.md

hey @darpant-289 could you share output of pip list after activating venv you have? was rasa installed correctly?

Also share screenshot of terminal. error message you shared is not formatted. & just use rasa train for training inside venv, it is not required to pass any other arguments.

yes sure

absl-py 0.9.0 aio-pika 6.8.0 aiofiles 0.6.0 aiohttp 3.6.3 aiormq 3.3.1 alembic 1.5.8 APScheduler 3.6.3 astor 0.8.1 astunparse 1.6.3 async-generator 1.10 async-timeout 3.0.1 attrs 19.3.0 bidict 0.21.2 blis 0.4.1 boto3 1.17.48 botocore 1.20.48 cachetools 4.2.1 catalogue 1.0.0 certifi 2020.12.5 cffi 1.14.5 chardet 3.0.4 cloudpickle 1.2.2 colorclass 2.2.0 coloredlogs 10.0 colorhash 1.0.3 contextvars 2.4 cryptography 2.9.2 cycler 0.10.0 cymem 2.0.5 decorator 4.4.2 dm-tree 0.1.5 dnspython 1.16.0 docopt 0.6.2 en-core-web-md 2.2.5 fbmessenger 6.0.0 future 0.18.2 gast 0.2.2 gevent 1.4.0 gitdb 4.0.7 GitPython 3.1.14 google-auth 1.28.1 google-auth-oauthlib 0.4.4 google-pasta 0.2.0 greenlet 1.0.0 grpcio 1.37.0 h11 0.8.1 h2 3.2.0 h5py 2.10.0 hpack 3.0.0 hstspreload 2020.12.22 httpcore 0.11.1 httplib2 0.19.1 httptools 0.1.1 httpx 0.9.3 humanfriendly 9.1 hyperframe 5.2.0 idna 2.10 idna-ssl 1.1.0 immutables 0.15 importlib-metadata 3.10.0 isodate 0.6.0 jmespath 0.10.0 joblib 0.15.1 jsonpickle 1.3 jsonschema 3.2.0 kafka-python 1.4.7 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.3.1 Mako 1.1.4 Markdown 3.3.4 MarkupSafe 1.1.1 matplotlib 3.1.3 mattermostwrapper 2.2 multidict 4.7.6 murmurhash 1.0.5 networkx 2.4 numpy 1.18.5 oauth2client 4.1.3 oauthlib 3.1.0 opt-einsum 3.3.0 packaging 19.0 pamqp 2.3.0 pika 1.1.0 Pillow 8.2.0 pip 21.0.1 pkg-resources 0.0.0 plac 1.1.3 preshed 3.0.5 prompt-toolkit 2.0.10 protobuf 3.15.8 psycopg2-binary 2.8.6 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.20 pydot 1.4.2 PyJWT 1.7.1 pykwalify 1.7.0 pymongo 3.8.0 pyparsing 2.4.7 pyrsistent 0.17.3 PySocks 1.7.1 pyTelegramBotAPI 3.7.7 python-crfsuite 0.9.7 python-dateutil 2.8.1 python-editor 1.0.4 python-engineio 3.11.2 python-socketio 4.4.0 python-telegram-bot 11.1.0 pytz 2019.3 PyYAML 5.4.1 questionary 1.5.2 rasa 1.9.7 rasa-sdk 1.10.3 rasa-x 0.27.2 redis 3.5.3 regex 2020.9.27 requests 2.25.1 requests-oauthlib 1.3.0 requests-toolbelt 0.9.1 rfc3986 1.4.0 rocketchat-API 0.6.36 rsa 4.7.2 ruamel.yaml 0.15.100 ruamel.yaml.clib 0.2.2 s3transfer 0.3.6 sanic 19.12.2 Sanic-Cors 0.10.0.post3 sanic-jwt 1.3.2 Sanic-Plugins-Framework 0.9.5 scikit-learn 0.22.2.post1 scipy 1.5.4 sentry-sdk 0.19.5 setuptools 56.0.0 six 1.15.0 sklearn-crfsuite 0.3.6 slackclient 2.9.3 smmap 4.0.0 sniffio 1.2.0 spacy 2.2.4 SQLAlchemy 1.3.24 srsly 1.0.5 tabulate 0.8.9 tensorboard 1.15.0 tensorboard-plugin-wit 1.8.0 tensorflow 1.15.0 tensorflow-addons 0.12.0 tensorflow-cpu 1.15.0 tensorflow-estimator 1.15.1 tensorflow-hub 0.7.0 tensorflow-probability 0.7.0 tensorflow-text 2.3.0 termcolor 1.1.0 terminaltables 3.1.0 thinc 7.4.0 threadpoolctl 2.1.0 tqdm 4.31.1 twilio 6.26.3 typeguard 2.12.0 typing-extensions 3.7.4.3 tzlocal 2.1 ujson 1.35 urllib3 1.26.4 uvloop 0.14.0 wasabi 0.8.2 wcwidth 0.2.5 webexteamssdk 1.1.1 websockets 8.1 Werkzeug 1.0.1 wheel 0.36.2 wrapt 1.12.1 yarl 1.5.1 zipp 3.4.1

looks like very old rasa release.

okay then , what should I do?

can you please help?

I think you should migrate to newer rasa version. There are lot of breaking changes though. If your bot is not using custom actions or forms, then you should migrate. else it is your call. You can read about migration here & here

If you are just starting out, then definitely go with newer version.

If I give command like this : rasa train but it gives below error: No training data given. Please provide stories and NLU data in order to train a Rasa model using the ‘–data’ argument.

if I give command like this: python -m rasa train core -s data/stories.md -d domain.yml --config config.yml

Then it show error like this: rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded. Please make sure the name is a valid policy.

yeah, I get it. But I am not sure about old versions of rasa, maybe someone else from community could help you with that.

Okay thanks