Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the blessed CLI strategy in bert_server and ner-server #28

Merged
merged 3 commits into from
Jun 19, 2020
Merged

Use the blessed CLI strategy in bert_server and ner-server #28

merged 3 commits into from
Jun 19, 2020

Conversation

evanmcclure
Copy link
Member

Closes #26

@evanmcclure
Copy link
Member Author

Console output that shows the usage of the bert_server now follows.

Top-level help message:

$ ./bert_server
NAME:
   bert_server - A demo for question-answering based on BERT.

USAGE:
   bert_server [global options] command [command options] [arguments...]

COMMANDS:
   run      Run the bert_server.
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

Command help message

$ ./bert_server help run
NAME:
   bert_server run - Run the bert_server.

USAGE:
   bert_server run --model=<path> [--address=<address>] [--tls-cert-file=<cert>] [--tls-key-file=<key>] [--tls-disable]

DESCRIPTION:
   Run the bert_server indicating the model path (NOT the model file).

OPTIONS:
   --address value          Changes the bind address of the server. (default: "0.0.0.0:1987")
   --model value, -m value  The path of the model to load.
   --tls-cert-file value    Specifies the path of the TLS certificate file. (default: "/etc/ssl/certs/spago/server.crt")
   --tls-key-file value     Specifies the path of the private key for the certificate. (default: "/etc/ssl/certs/spago/server.key")
   --tls-disable            Specifies that TLS is disabled.

@evanmcclure
Copy link
Member Author

The output of the usage of the ner-server is now shown.

Top-level help message:

$ ./ner-server 
NAME:
   ner-server - A demo for named entities recognition.

USAGE:
   ner-server [global options] command [command options] [arguments...]

COMMANDS:
   run      Run the ner-server.
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

Command usage:

$ ./ner-server help run
NAME:
   ner-server run - Run the ner-server.

USAGE:
   ner-server run --model=<model-name> [--models=<path>] [--port=<port>]

DESCRIPTION:
   You must indicate the directory that contains the spaGO neural models.

OPTIONS:
   --port value        Specifies the port to bind the server to. (default: 1987)
   --models value      Specifies the path to the models. (default: "/Users/emcclure/.spago")
   --model-name value  Specifies the name of the model to use.
   

@matteo-grella matteo-grella merged commit 160e210 into nlpodyssey:main Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port new CLI flags strategy from hugging_face_importer to bert_server and ner-server
3 participants