ac_alejos
Joined 3 years ago
Karma
64
Submissions
11
Member since
Aug 18
Joined 3 years ago
Since EXGBoost supports loading trained models across different APIs, you can even train using the Python API and then plot using this Elixir API if you prefer.
Elixir now supports XGBoost models (even those trained outside of Elixir) and you can leverage the benefits of Elixir concurrency and distribution to serve your decision tree models using Elixir-Nx's `Nx.Serving` construct.
In this blog post (which you can run as a Livebook), we walk through a full example of training a spam detection model using XGBoost and serving it with Elixir. Check it out!
If you’re talking about scaling this, Elixir is built on the BEAM VM which was originally made for Ericsson and is tailor made for telecom systems.
Its whole paradigm is built around the concept of Let It Fail, which is basically about achieving fault tolerance through isolation and supervision.
So aside from the fact that Elixir+Phoenix is a productive framework that allowed the author to build this in a few days, it also means that it will scale very well with minimal code changes.
For reference, one of the solutions you might use to distribute this in Python is Celery, which is built on RabbitMQ which is built on Erlang, which is the predecessor of Elixir.