RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.94k stars 4.64k forks source link

[Errno 2] No such file or directory: './models/nlu/default/entity\\metadata.json' #3230

Closed alvipranandha closed 5 years ago

alvipranandha commented 5 years ago
**Rasa version**: 0.14.0 **Python version**: 3.6.3 : : Anaconda, Inc **Operating system** (windows, osx, ...): Windows 10 Enterprise Build 1809 **Issue**: Hi guys, I'm trying to run a model with a config.yml below and my dataset consisted 5 intents and 12 entities and around 2k rows of dataset. But after some epochs it appeared an error like this : 2019-04-10 12:19:40.783034: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 Epochs: 100%|███████████████████████████████████████████████| 1500/1500 [10:06<00:00, 4.85it/s, loss=0.007, acc=0.997] Traceback (most recent call last): File "C:\Users\Alvi\Anaconda3\lib\site-packages\rasa_nlu\model.py", line 74, in load data = utils.read_json_file(metadata_file) File "C:\Users\Alvi\Anaconda3\lib\site-packages\rasa_nlu\utils\__init__.py", line 211, in read_json_file content = read_file(filename) File "C:\Users\Alvi\Anaconda3\lib\site-packages\rasa_nlu\utils\__init__.py", line 205, in read_file with io.open(filename, encoding=encoding) as f: FileNotFoundError: [Errno 2] No such file or directory: './models/nlu/default/entity\\metadata.json' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "nlu_model.py", line 30, in run() File "nlu_model.py", line 22, in run interpreter = Interpreter.load('./models/nlu/default/entity') File "C:\Users\Alvi\Anaconda3\lib\site-packages\rasa_nlu\model.py", line 288, in load model_metadata = Metadata.load(model_dir) File "C:\Users\Alvi\Anaconda3\lib\site-packages\rasa_nlu\model.py", line 79, in load "from '{}'. {}".format(abspath, e)) rasa_nlu.model.InvalidProjectError: Failed to load model metadata from 'C:\Users\Alvi\Data Engineer\Rasa_Top_Five_Categories\models\nlu\default\entity\metadata.json'. [Errno 2] No such file or directory: './models/nlu/default/entity\\metadata.json' **Content of configuration file (config.yml)**: ```yml language: "en" pipeline: - name: "tokenizer_whitespace" - name: "ner_crf" - name: "intent_featurizer_count_vectors" - name: "intent_classifier_tensorflow_embedding" batch_size: [64, 256] epochs: 1500 embed_dim: 20 ``` **Content of domain file (domain.yml)** (if used & relevant): ```yaml I'm not using domain.yml because i'm just focused on entity extraction ```
akelad commented 5 years ago

Thanks for raising this issue, @wochinge will get back to you about it soon.

sushilr007 commented 5 years ago

Try "\" not '/' This works for me. python -m rasa_core.run -d models\current\dialogue -u models\nlu\default\chat --endpoints endpoints.yml

wochinge commented 5 years ago

Thanks @sushilr007 Windows uses indeed a different path separator: https://en.wikipedia.org/wiki/Path_(computing)

@alvipranandha does this fix your issue?

alvipranandha commented 5 years ago

Thank you for helped me @akelad and @wochinge it was fixed

sushilr007 commented 5 years ago

@wochinge Yes it worked for me. :)