1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/ludwig/README.md

71 lines
2.0 KiB
Markdown
Raw Normal View History

2019-12-06 22:38:30 +02:00
ludwig
======
[Ludwig][1] is a toolbox that allows to train and test deep learning models
without the need to write code.
## up and running
```bash
$ mkdir -p data
$ vim data/model.yaml
$ wget http://boston.lti.cs.cmu.edu/classes/95-865-K/HW/HW2/epinions.zip
$ unzip epinions.zip
$ mv epinions/epinions-1.csv data/train.csv
$ mv epinions/epinions-2.csv data/predict.csv
$ tree data
├── model.yaml
├── predict.csv
└── train.csv
$ docker-compose run --rm train
$ docker-compose run --rm visualize
$ docker-compose run --rm predict
$ docker-compose up -d serve
$ curl http://127.0.0.1:8000/predict -X POST -F 'text=taking photos and recording videos'
{
"class_predictions": "Camera",
"class_probabilities_<UNK>": 9.438252263072044e-11,
"class_probabilities_Auto": 0.32920214533805847,
"class_probabilities_Camera": 0.6707978248596191,
"class_probability": 0.6707978248596191
}
$ curl http://127.0.0.1:8000/predict -X POST -F 'text=looking to buy a new sports car'
{
"class_predictions": "Auto",
"class_probabilities_<UNK>": 1.900043131457165e-15,
"class_probabilities_Auto": 0.9999126195907593,
"class_probabilities_Camera": 8.738834003452212e-05,
"class_probability": 0.9999126195907593
}
$ tree -L 3 data
├── model.yaml
├── predict.csv
├── train.csv
├── results
2019-12-09 02:33:02 +02:00
│   └── experiment_example
2019-12-06 22:38:30 +02:00
│   ├── description.json
│   ├── model
│   └── training_statistics.json
├── results_0
│   ├── class_predictions.csv
│   ├── class_predictions.npy
│   ├── class_probabilities.csv
│   ├── class_probabilities.npy
│   ├── class_probability.csv
│   └── class_probability.npy
└── visualize
├── learning_curves_class_accuracy.png
├── learning_curves_class_hits_at_k.png
├── learning_curves_class_loss.png
├── learning_curves_combined_accuracy.png
└── learning_curves_combined_loss.png
```
[1]: https://uber.github.io/ludwig/