Skip to content

Commit

Permalink
cli -> jsonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
himkt committed Apr 18, 2020
1 parent ffe05e9 commit 4ab6b9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions allennlp/allennlp_jsonnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
This script is based on the example of allentune (https://github.com/allenai/allentune).
In this example, we optimize the validation accuracy of
sentiment classification using AllenNLP cli.
sentiment classification using an AllenNLP jsonnet config file.
Since it is too time-consuming to use the training dataset,
we here use the validation dataset instead.
We have the following two ways to execute this example:
(1) Execute this code directly.
$ python allennlp_cli.py
$ python allennlp_jsonnet.py
(2) Execute through CLI.
$ STUDY_NAME=`optuna create-study --direction maximize --storage sqlite:///example.db`
$ optuna study optimize allennlp_cli.py objective --n-trials=100 --study $STUDY_NAME \
$ optuna study optimize allennlp_jsonnet.py objective --n-trials=100 --study $STUDY_NAME \
--storage sqlite:///example.db
"""
Expand Down

0 comments on commit 4ab6b9f

Please sign in to comment.