Training data format of '<file>' is 'unk'

Hi, I installed 1.9.3 version of Rasa on a win machine by following the steps mentioned here thats: pip install rasa and rasa init

I started the server using: rasa run -m models --enable-api --log-file out.log --debug

I am trying test the APIs. The /status and /domain APIs work fine, but the API to get the intents of a message is not working (http://localhost:5005/model/test/intents) . I get a 500 error with the below body:

{
    "version": "1.9.3",
    "status": "failure",
    "message": "An unexpected error occurred during evaluation. Error: Unknown data format for file 'C:\\Users\\Harshad\\AppData\\Local\\Temp\\tmptda5w8v7'.",
    "reason": "TestingError",
    "details": {},
    "help": null,
    "code": 500
}

I see the below messages in the logs when I send the request:

2020-03-31 11:28:37 DEBUG    rasa.utils.tensorflow.models  - Loading the model ...
2020-03-31 11:28:38 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-03-31 11:28:38 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-03-31 11:28:39 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-03-31 11:28:39 DEBUG    rasa.nlu.classifiers.diet_classifier  - Failed to load model. Maybe the path 'C:\Users\Harshad\AppData\Local\Temp\tmp2ewly71b\nlu' doesn't exist?
2020-03-31 11:28:39 DEBUG    rasa.nlu.training_data.loading  - Training data format of 'C:\Users\Harshad\AppData\Local\Temp\tmptda5w8v7' is 'unk'.
2020-03-31 11:28:39 DEBUG    rasa.server  - Traceback (most recent call last):
  File "c:\users\harshad\anaconda3\envs\rasa\lib\site-packages\rasa\server.py", line 912, in evaluate_intents
    evaluation = run_evaluation(data_path, nlu_model)
  File "c:\users\harshad\anaconda3\envs\rasa\lib\site-packages\rasa\nlu\test.py", line 1099, in run_evaluation
    test_data = training_data.load_data(data_path, interpreter.model_metadata.language)
  File "c:\users\harshad\anaconda3\envs\rasa\lib\site-packages\rasa\nlu\training_data\loading.py", line 67, in load_data
    data_sets = [_load(f, language) for f in files]
  File "c:\users\harshad\anaconda3\envs\rasa\lib\site-packages\rasa\nlu\training_data\loading.py", line 67, in <listcomp>
    data_sets = [_load(f, language) for f in files]
  File "c:\users\harshad\anaconda3\envs\rasa\lib\site-packages\rasa\nlu\training_data\loading.py", line 133, in _load
    raise ValueError(f"Unknown data format for file '{filename}'.")
ValueError: Unknown data format for file 'C:\Users\Harshad\AppData\Local\Temp\tmptda5w8v7'.

Can anyone please tell me how to resolve this issue?

Show your data Format

In the post body, I tried sending the below, but I get the same error: good morning OR {"text":"good morning"} With the Content-Type as text or JSON

Is this (/model/test/intents) the correct API for getting the intent of a message?

I was using an incorrect API. The one mentioned in the post is not for getting intent of a message. This one is:

http://localhost:5005/model/parse

body - {"text":"good morning"}

Exactly HTTP API is not used to parse message. You can use it to an intent evalutation but then the query parameter will the model name.

1 Like