tree: 3ebf6579eddd975982db25c84f31939d89fb60b1 [path history] [tgz]
  1. README.md
  2. __init__.py
  3. dataset.py
  4. model.py
  5. requirements.txt
  6. stopwords.py
  7. task.py
  8. top_words.py
  9. train_ml_helpers.py
appengine/monorail/tools/ml/trainer2/README.md

Trainer

Monorail Spam Classifier

To have the trainer run locally, you'll need to supply the --train-file arguments.

TRAIN_FILE=./spam_training_examples.csv
OUTPUT_DIR=/tmp/monospam-local-training/
rm -rf $OUTPUT_DIR
python3 ./task.py \
    --train-file $TRAIN_FILE \
    --job-dir $OUTPUT_DIR \
    --train-steps 1000 \
    --verbosity DEBUG \
    --trainer-type spam

Monorail Component Predictor

To have the trainer run locally, you'll need to supply the --train-file arguments.

TRAIN_FILE=./component_training_examples.csv
OUTPUT_DIR=/tmp/monospam-local-training/
rm -rf $OUTPUT_DIR
python3 ./task.py \
    --train-file $TRAIN_FILE \
    --job-dir $OUTPUT_DIR \
    --train-steps 10000 \
    --eval-steps 1000 \
    --verbosity DEBUG \
    --trainer-type component