# Why call \`importer.get\_domain()\` so many times in a training?

**URL:** <https://forum.rasa.com/t/why-call-importer-get-domain-so-many-times-in-a-training/20262>\
**Category:** Rasa Open Source\
**Created:** [October 24, 2019, 3:07am UTC](https://forum.rasa.com/t/why-call-importer-get-domain-so-many-times-in-a-training/20262 "2019-10-24T03:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlielin](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@charlielin](https://forum.rasa.com/u/charlielin)\
**Post date:** [October 24, 2019, 3:07am UTC](https://forum.rasa.com/t/why-call-importer-get-domain-so-many-times-in-a-training/20262/1 "2019-10-24T03:07:24Z")

</div>

Hey guys:

I am confusing about how to use `importer.get_domain()`, also `get_stories()` and `get_nlu_data()`. in the code, everytime if domain is needed, call `domain = await impter.get_domain()`. Is there any trick here? Or can we just call it once, and deliver it as a param? like the pic below, once you call `get_stories()`, call the `get_domain()` ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/463215245632f2705ba0d3407197c43dcf4ff2de.png)

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [October 25, 2019, 7:57am UTC](https://forum.rasa.com/t/why-call-importer-get-domain-so-many-times-in-a-training/20262/2 "2019-10-25T07:57:53Z")

</div>

Each of these functions needs to call the domain separately, as it’s not ensured that they’re all going to run, since each of these functions can be overwritten with a custom function. If you’re writing your own code, I don’t think I see any reason why you couldn’t call it once and then pass that value if you like 🙂

---

<div class="post-metadata">

**Author:** ![charlielin](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@charlielin](https://forum.rasa.com/u/charlielin)\
**Post date:** [October 25, 2019, 10:16am UTC](https://forum.rasa.com/t/why-call-importer-get-domain-so-many-times-in-a-training/20262/3 "2019-10-25T10:16:03Z")

</div>

Thanks 😀
