# What is returned by model/train API?

**URL:** <https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833>\
**Category:** Rasa Open Source\
**Created:** [October 15, 2019, 12:59pm UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833 "2019-10-15T12:59:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Menon](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anand\_Menon](https://forum.rasa.com/u/Anand_Menon)\
**Post date:** [October 15, 2019, 12:59pm UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/1 "2019-10-15T12:59:28Z")

</div>

Hi,

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](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??

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [October 22, 2019, 11:12am UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/2 "2019-10-22T11:12:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Anand\_Menon](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anand\_Menon](https://forum.rasa.com/u/Anand_Menon)\
**Post date:** [October 22, 2019, 1:21pm UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/3 "2019-10-22T13:21:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [October 23, 2019, 6:39am UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/4 "2019-10-23T06:39:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [October 23, 2019, 6:44am UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/5 "2019-10-23T06:44:24Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Anand\_Menon](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@Anand\_Menon](https://forum.rasa.com/u/Anand_Menon)\
**Post date:** [October 24, 2019, 12:58pm UTC](https://forum.rasa.com/t/what-is-returned-by-model-train-api/19833/6 "2019-10-24T12:58:44Z")

</div>

@dakshvar22 sure thanks
