tree: 3ebf6579eddd975982db25c84f31939d89fb60b1 [path history] [tgz]
  1. __init__.py
  2. dataset.py
  3. model.py
  4. README.md
  5. requirements.txt
  6. stopwords.py
  7. task.py
  8. top_words.py
  9. train_ml_helpers.py
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