From f5306b406426530e4df2c250a6b5598b80ba621c Mon Sep 17 00:00:00 2001 From: Piotr Czapla Date: Sat, 20 Apr 2019 14:34:26 +0200 Subject: [PATCH] Add a few examples of commands avaliable in ulmfit-multilingual --- README.md | 15 ++++++++++++++- prepare_poleval.py | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 prepare_poleval.py diff --git a/README.md b/README.md index c29e00f..bd205d4 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,21 @@ Model name: data/wiki/en-100/models/f60k/lstm_orig.m $ python -m ulmfit cls --dataset-path data/imdb --base-lm-path data/wiki/${LANG}-100/models/f60k/lstm_orig.m \ --lang=${LANG} --name orig - train 20 --bs 18 --num-cls-epochs=4 --lr_sched=1cycle --label-smoothing-eps=0.1 ``` - +You can re-evaluate classifiers by running +``` +python -m ulmfit eval --glob="imdb/models/*/lstm_*.m" +``` + +The same command can be used to quickly trian multiple classifiers, by adding the `--name` parameter: +``` +python -m ulmfit eval --glob="imdb/models/*/lstm_nl3.m" --name "nl3-my-test1" --num-cls-epochs 4 --label-smoothing-eps=0.1 --lr_sched=1cycle +``` + +To create a tar with model simply run +``` +python -m ulmfit tar data/imdb/models/f60k/lstm_nl3.m +``` ## data directory strucutre diff --git a/prepare_poleval.py b/prepare_poleval.py new file mode 100644 index 0000000..6706e59 --- /dev/null +++ b/prepare_poleval.py @@ -0,0 +1,2 @@ + +# https://storage.googleapis.com/reddit_comments_polish/comments.csv.gz