Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Remove most mentions of python -m allennlp.run (#1264)
Browse files Browse the repository at this point in the history
* Remove most mentions of python -m allennlp.run

* Print 'allennlp' as program in run.
  • Loading branch information
schmmd authored May 22, 2018
1 parent 7b9d6a2 commit ed3697c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ just run `docker run -it -p 8000:8000 --rm allennlp/allennlp:v0.4.2` to get an e
You can now test your installation with `./scripts/verify.py`.

Our Docker image contains the AllenNLP source rather than a `pip` installation. Consequently, the `allennlp` commandline tool is not
installed and you will have to use `python -m allennlp.run` instead.
installed and you will have to use `./bin/allennlp` instead.

### Installing from source

Expand All @@ -81,7 +81,7 @@ Create a Python 3.6 virtual environment, and install the necessary requirements
Changing the flag to false if you don't want to be able to run tests.
Note that if you use the source installation, you won't be able to use the `allennlp`
command but rather you'll need to run `python -m allennlp.run`.
command but rather you'll need to run `./bin/allennlp`.
You can test your installation with `./scripts/verify.py`.
Expand Down
2 changes: 1 addition & 1 deletion allennlp/commands/dry_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.. code-block:: bash
$ allennlp dry-run --help
usage: python -m allennlp.run dry-run [-h] -s SERIALIZATION_DIR [-o OVERRIDES]
usage: allennlp dry-run [-h] -s SERIALIZATION_DIR [-o OVERRIDES]
[--include-package INCLUDE_PACKAGE]
param_path
Expand Down
2 changes: 1 addition & 1 deletion allennlp/commands/elmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.. code-block:: bash
$ allennlp elmo --help
usage: python -m allennlp.run elmo [-h] (--all | --top | --average)
usage: allennlp elmo [-h] (--all | --top | --average)
[--vocab-path VOCAB_PATH]
[--options-file OPTIONS_FILE]
[--weight-file WEIGHT_FILE]
Expand Down
2 changes: 1 addition & 1 deletion allennlp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
from allennlp.commands import main # pylint: disable=wrong-import-position

if __name__ == "__main__":
main(prog="python -m allennlp.run")
main(prog="allennlp")
Empty file modified bin/allennlp
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Now to run the demo, you can `cd` to the root AllenNLP directory and run the
following.

```
python -m allennlp.run serve
./bin/allennlp serve
```

You may need to force refresh your web browser.
Expand Down
4 changes: 2 additions & 2 deletions tutorials/getting_started/using_pretrained_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ is a "Prediction" button that reveals the following example.

```bash
echo '{"sentence": "Did Uriah honestly think he could beat The Legend of Zelda in under three hours?"}' > ner-examples.jsonl
python -m allennlp.run predict \
allennlp predict \
https://s3-us-west-2.amazonaws.com/allennlp/models/ner-model-2018.04.26.tar.gz \
ner-examples.jsonl
```
Expand All @@ -26,7 +26,7 @@ Here is an example of running the above example but specifying
explicitly.

```bash
python -m allennlp.run predict \
allennlp predict \
https://s3-us-west-2.amazonaws.com/allennlp/models/ner-model-2018.04.26.tar.gz \
ner-examples.jsonl \
--predictor sentence-tagger
Expand Down

0 comments on commit ed3697c

Please sign in to comment.