What is returned by model/train API?


As per the documentation of HTTP API

model/train would return 200 Zipped Rasa model

My question is instead of storing the zipped Model inside the models directory i would like to get this model and push it some where like an S3 bucket.

what if i write a code like

model = requests.post(‘http://localhost:8002/model/train’,headers=headers,data=json.dumps(data)).content

what does model var would hold ? name of the model or the model itself

If i print the model variable it would return something like a binary string b’\x1f\x8b\x08\x08\x99\xb7\xa5]\x02\xffcore-20191015-174209.tar\x00\xec\xbdY\x8f\xabZ\xba…’ which i cant figure out.

Is this model name or can i be able to convert it some format like pickle and be used to load the latest trained model??

@Anand_Menon This post https://stackoverflow.com/a/14260592/3001665 should help you with how to capture the zipped content.

Hi @dakshvar22,

Thanks for the info.I have figured that out and was able to compress the api response back to a zipped file using gzip.

Now the other challenge i am facing is with finding the accuracy logs of model after training.I would like to persist the accuracy score of both the NLU and core on to a database for future evaluation.So is there any way to get the accuracy info as well after completing the training.

You could have added that info as well to the fingerprint.json

If you run the evaluation command rasa test on your trained model, you’ll get intent_report.json which you can attach to your zip.

@Anand_Menon If you want this to be added to the stack, please open a feature request on GH repo and we can discuss about its applicability there.

@dakshvar22 sure thanks