# Promoting ML jobs from Pre-Prod to Prod (Different Environments)

**URL:** <https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [April 16, 2021, 6:03pm UTC](https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412 "2021-04-16T18:03:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohan-boogeyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohan-boogeyman/32/81377_2.png) [@Rohan-boogeyman](https://discuss.elastic.co/u/Rohan-boogeyman)\
**Post date:** [April 16, 2021, 6:03pm UTC](https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412/1 "2021-04-16T18:03:19Z")

</div>

Hello,

I've come accross a situation where i am trying to promote our ML models from one environment to another - was curious if there's any way of doing it thru some CI/CD Pipeline or if anyone has implemented something that's more inclined towards automation vs Manually creating Jobs everytime?  
Same thing goes for watcher as well.

---

<div class="post-metadata">

**Author:** ![lcawley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lcawley/32/58441_2.png) [@lcawley](https://discuss.elastic.co/u/lcawley)\
**Post date:** [April 19, 2021, 11:31pm UTC](https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412/2 "2021-04-19T23:31:50Z")

</div>

Hello!

If you are using supervised machine learning ( classification or regression analysis), there is indeed a method you can follow to export and import your trained models. See [Trained models | Machine Learning in the Elastic Stack [7.12] | Elastic](https://www.elastic.co/guide/en/machine-learning/current/ml-trained-models.html#export-import)

If you are using anomaly detection jobs, there isn't an equivalent "get trained models" API, but you can collect the configuration information via "[get datafeeds"](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html) and ["get anomaly detection jobs"](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html) APIs and use those details to recreate the jobs in the your new environment.

---

<div class="post-metadata">

**Author:** ![Rohan-boogeyman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rohan-boogeyman/32/81377_2.png) [@Rohan-boogeyman](https://discuss.elastic.co/u/Rohan-boogeyman)\
**Post date:** [April 30, 2021, 2:12am UTC](https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412/3 "2021-04-30T02:12:24Z")

</div>

> [@lcawley](#):
>
> u are using supervised machine learning ( classification or regression analysis), there is ind

Great, Thank you! 🙂 that API should help

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 28, 2021, 2:12am UTC](https://discuss.elastic.co/t/promoting-ml-jobs-from-pre-prod-to-prod-different-environments/270412/4 "2021-05-28T02:12:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
