Open sanand0 opened 2 years ago
Download a dataset here: https://gramener.com/gramex/guide/mlhandler/titanic?_download=titanic.csv&_format=csv
Use this config to test the app:
url:
mlhandler-tutorial:
pattern: /$YAMLURL/ml
handler: MLHandler
kwargs:
data:
url: $YAMLPATH/titanic.csv # Path to the training dataset
# Path where the serialized model, training data and configuration is
# saved
config_dir: $YAMLPATH
model:
# The classification or regression algorithm to use
class: LogisticRegression
# The column to predict
target_col: Survived
# Columns to ignore during training
exclude: [PassengerId, Ticket, Cabin, Name]
# Columns to be treated as categorical variables
cats: [Embarked, SibSp, Parch, Pclass, Sex]
import:
ml:
path: $GRAMEXAPPS/ml/gramex.yaml
YAMLURL: $YAMLURL/app/
MLAPP_KWARGS:
key: mlhandler-tutorial
title: My ML App
Starting with this screen:
./ml
. This should be copy-able. We're generating the URL and letting users know what the URL should be
There are 4 use cases (in order of priority)
When creating an app, use
apps/admin2
as a reference:url
,schedule
,alert
keys with-$*
to allow multiple importsUse
gramex.conf
to read the configuration.