https://github.com/twilio-labs/ml-training-api
A service template for asynchronous machine learning model training
https://github.com/twilio-labs/ml-training-api
machine-learning python
Last synced: about 1 year ago
JSON representation
A service template for asynchronous machine learning model training
- Host: GitHub
- URL: https://github.com/twilio-labs/ml-training-api
- Owner: twilio-labs
- License: mit
- Created: 2021-02-05T18:42:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-24T05:01:08.000Z (over 1 year ago)
- Last Synced: 2025-05-07T14:58:37.315Z (about 1 year ago)
- Topics: machine-learning, python
- Language: Python
- Homepage:
- Size: 4.61 MB
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ml-training-api
[](https://www.twilio.com/labs)
This is a simple python service template for training machine learning models asynchronously.
## Falcon + Celery
Example of how to handle training machine learning models asynchronously with Falcon, Celery, and message queues

### Quick Start
Spin up the containers:
```sh
$ docker-compose up -d --build
```
Open your browser to http://localhost:8000/ping to view the app or to http://localhost:5555 to view the Flower dashboard.
Trigger a new task with hyperparameters (optional):
```sh
$ curl -X POST http://localhost:8000/create \
-d '{"alpha":0.5}' \
-H "Content-Type: application/json"
```
Check the status:
```sh
$ curl http://localhost:8000/status/
```
The [model](https://github.com/twilio-labs/ml-training-api/tree/main/src/model) used in this repo is a general text classficiation model built using td-idf features and naive bayes model. But you can plug in any model of your own choice.
## Let's work together
Everything in this toolkit is released under [Twilio Labs](https://www.twilio.com/docs/labs) and fully open-source. If you find any problems with this, [please file an issue](https://github.com/twilio-labs/ml-training-api/issues) or even create a pull request to work together with us on the toolkit. We would love to hear your ideas and feedback!
## License
MIT