# Bring Your Own Machine Learning Model in Ignition?

**URL:** <https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258>\
**Category:** Ignition\
**Tags:** machinelearning, ignition81, perspective, scripting\
**Created:** [June 20, 2023, 8:01am UTC](https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258 "2023-06-20T08:01:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Killmonger](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Killmonger](https://forum.inductiveautomation.com/u/Killmonger)\
**Post date:** [June 20, 2023, 8:01am UTC](https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258/1 "2023-06-20T08:01:36Z")

</div>

Hi,

I have a pre-trained ML model. I want to bring the same into my perspective project and do my predictions on a dataset that is generated live from the machine from a bunch of tags (either in the form of a dataset tag or a pydataset). Then I want to invoke my model on certain tag triggers on that dataset and use the inference from my model to write to certain tags. How do I achieve this? I have explored the forum and also the ML Manager from Ignition Exchange. ML manager has its own algorithms where we can train and store the model. But that does not quite fit my use-case.

Any help will be much appreciated. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 20, 2023, 11:27am UTC](https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258/2 "2023-06-20T11:27:51Z")

</div>

How do you run this model? If it isn't jython-compatible, you will need to run it in its own process. Either as a parallel system service with an API, or using java's `ProcessBuilder` tooling (from jython). Neither is trivial.

---

<div class="post-metadata">

**Author:** ![Praneel\_Joshi](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@Praneel\_Joshi](https://forum.inductiveautomation.com/u/Praneel_Joshi)\
**Post date:** [January 3, 2024, 10:18pm UTC](https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258/3 "2024-01-03T22:18:02Z")

</div>

any thoughts on the secure implementations of something like the parallel system API? giving external servers the right to autonomously write to tags sounds risky.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 3, 2024, 10:50pm UTC](https://forum.inductiveautomation.com/t/bring-your-own-machine-learning-model-in-ignition/75258/4 "2024-01-03T22:50:50Z")

</div>

The parallel system service with an API, the way I meant it, would be where the model lives. Ignition's own internal scripting would drive the model and retrieve results via the external process' API. The external API would not be calling into Ignition to write to tags--all tag writes would be still be controlled by Ignition's scripts.
