evolutionengine
Hi guys, sorry if this sounds like a silly question, I am a beginner in general. I would like to know how are you implementing machine learning into your apps. A couple of scenarios I could think of are -
- Interact with a ML service in python over REST or similar.
- Calling python scripts using erlport or thrift.
Are there any suggestions or other approaches ?
I am trying to build a Phoenix app and planning to use ML to build custom user feed, recommendations and spam filter.
Thanks.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ityonemo
here’s one guide. I’m going to look for the other one that I saw:
ityonemo
above one only works if you are using tensorflow. this one is a more general python interop story:
evolutionengine
Thanks, checking it out!
patrickdm
Hello and welcome, there are a few posts in the forum that you could find interesting:
Hth
ityonemo
just a caution, unless I’m mistaken I would say except for tensorflex, the others are still experimental and not ready for prod deployment.
sym_num
Thank you for introducing my DeepPipe. Currently I am developing DeepPipe2. DP1 was slow and wrong. DP2 utilizes GPU for practical speed. I have finished implementing CNN. I’m also working on RNN for natural language processing.
leifericf
Another approach to incorporate machine learning components into Elixir applications is to interoperate with other languages such as Python, e.g. through ports, NIFs, etc.
Erlang/OTP gives us other means to interface with- or incorporate external code, each with varying degrees of ease and robustness guarantees. See the Erlang Interoperability Tutorial for details.
Chapter 15 (Interfacing Techniques) of Programming Erlang by Joe Armstrong also contains some valuable information on this topic. Pages 233 through 242.
Here is an excellent article by @alvises which shows how to do this through Elixir. Elixir Mix ep. #91 goes into this article and related topics in more depth together with its author.
Erlang/OTP has excellent support for interoperability, which is one of its strengths. It might make more sense to leverage the existing Python libraries for machine learning in this way.
You can also develop your machine learning model as a separate application using Python and expose it through and API. TensorFlow comes with its own mechanisms for model serving. Then you can make use said API within your Elixir application and create an Elixir wrapper if needed. One benefit of using an Elixir port instead is that you can put your machine learning model behind a GenServer and supervise it as you would any other process in Elixir.
Another alternative is to develop and train your machine learning model using Python, and then bring the resulting model artefact into Elixir. You can serve and expose the model through an API written in Elixir. Have a look at out Tensorflex by @anshuman23 for inspiration on how this can be accomplished for neural network models through TensorFlow bindings.
Yet another approach which I have been thinking about lately is to embed the Python interpreter into Erlang/OTP or Elixir, and then use Elixir’s excellent meta-programming facilities (e.g. macros) to create a domain-specific language (DSL) specifically for machine learning. Supervision trees and GenServer could be used to spawn new processes representing instances of the Python interpreter to “cross-compile” the Elixir-based DSL to Python code and execute it. I found an old thread in the Erlang mailing list on this topic and an abandoned project on GitHub. This would likely require a considerable amount of effort, but could be an interesting way to vastly expand the libraries available in Elixir by essentially opening the door to all Python packages out there. Using ports is simpler.
Lastly, here are two related forum threads which contain some relevant information:
evolutionengine
Thanks for the detailed response.
leifericf
You’re very welcome, my friend!
Did you try some of those approaches?