Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 34271e9

Browse files
author
Peter Izsak
authored
Rename CLI commands (#123)
* move server module out from nlp_architect * update docs
1 parent 060f0cd commit 34271e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+110
-333
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Features:
5454
* [Dynet]
5555

5656
* Essential utilities for working with NLP models - Text/String pre-processing, IO, data-manipulation, metrics, embeddings.
57-
* Plug-able REST API server to serve models via REST API
5857

5958
## Installing NLP Architect
6059

@@ -129,7 +128,6 @@ The main design guidelines are:
129128
* Generic dataset loaders, textual data processing utilities, and miscellaneous utilities that support NLP model development (loaders, text processors, io, metrics, etc.)
130129
* Procedures for defining processes for training, inference, optimization or any kind of elaborate script.
131130
* Pythonic API for using models for inference
132-
* REST API servers with ability to serve trained models via HTTP
133131
* Extensive model documentation and tutorials
134132

135133
### Note

docs-source/source/code_docs/service.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
Service class documentation
1818
###########################
1919

20-
.. autoclass:: nlp_architect.server.service.Service
21-
2220
.. autoclass:: nlp_architect.common.core_nlp_doc.CoreNLPDoc
2321

2422
.. autoclass:: nlp_architect.common.high_level_doc.HighLevelDoc

docs-source/source/generated_api/nlp_architect_api_index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
nlp_architect.nn
1313
nlp_architect.pipelines
1414
nlp_architect.procedures
15-
nlp_architect.server
1615
nlp_architect.solutions
1716
nlp_architect.utils

docs-source/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
:caption: For Developers
7474

7575
nlp_architect API <generated_api/nlp_architect_api_index.rst>
76-
REST Server <service.rst>
7776
developer_guide.rst
7877

7978
.. _https://github.com/NervanaSystems/nlp-architect: https://github.com/NervanaSystems/nlp-architect

docs-source/source/main.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Features:
4949
* Dynet
5050

5151
* Essential utilities for working with NLP models - Text/String pre-processing, IO, data-manipulation, metrics, embeddings.
52-
* Plug-able REST API server to serve models via REST API
5352

5453

5554
Library design philosophy
@@ -66,7 +65,6 @@ The main design guidelines are:
6665
* Generic dataset loaders, textual data processing utilities, and miscellaneous utilities that support NLP model development (loaders, text processors, io, metrics, etc.)
6766
* ``Procedures`` for defining processes for training, inference, optimization or any kind of elaborate script.
6867
* Pythonic API for using models for inference
69-
* REST API servers with ability to serve trained models via HTTP
7068
* Extensive model documentation and tutorials
7169

7270
Disclaimer

docs-source/source/quantized_bert.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ To train Quantized BERT use the following code snippet:
9494

9595
.. code-block:: bash
9696
97-
nlp_architect train transformer_glue \
97+
nlp-train transformer_glue \
9898
--task_name mrpc \
9999
--model_name_or_path bert-base-uncased \
100100
--model_type quant_bert \
@@ -115,7 +115,7 @@ following code snippet:
115115

116116
.. code-block:: bash
117117
118-
nlp_architect run transformer_glue \
118+
nlp-inference transformer_glue \
119119
--model_path /tmp/mrpc-8bit \
120120
--task_name mrpc \
121121
--model_type quant_bert \

docs-source/source/quick_start.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ NLP Architect has the following packages:
6767
+---------------------------+-------------------------------------------------------+
6868
| `nlp_architect.procedures`| Procedure scripts |
6969
+---------------------------+-------------------------------------------------------+
70-
| `nlp_architect.server` | API Server and demos UI |
71-
+---------------------------+-------------------------------------------------------+
7270
| `nlp_architect.solutions` | Solution applications |
7371
+---------------------------+-------------------------------------------------------+
7472
| `nlp_architect.utils` | Misc. I/O, metric, pre-processing and text utilities |
@@ -85,16 +83,11 @@ NLP Architect comes with a CLI application that helps users run procedures and p
8583
The CLI is in development and some functionality is not complete
8684
and will be added in future versions
8785

88-
The list of possible options can be obtained by ``nlp_architect -h``:
89-
90-
``nlp_architect`` commands:
86+
NLP Architect commands:
9187

9288
.. code-block:: text
9389
94-
train Train a model from the library
95-
run Run a model from the library
96-
process Run a data processor from the library
97-
solution Run a solution process from the library
98-
serve Server a trained model using REST service
90+
nlp-train Train a model from the library
91+
nlp-inference Run a model from the library
9992
100-
Use ``nlp_architect <command> -h`` for per command usage instructions.
93+
Use ``nlp-train/inference -h`` for per command usage instructions.

docs-source/source/service.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,28 @@ Currently we provide 4 services:
3232

3333
The server has two main components:
3434

35-
- :py:class:`Service <nlp_architect.server.service.Service>` which is a representation of each model's API.
36-
- ``nlp_architect.server.serve`` module which is a `hug <http://www.hug.rest/>`_ application which handles processing of HTTP requests and initiating calls to the desired model.
35+
- :py:class:`Service <server.service.Service>` which is a representation of each model's API.
36+
- ``server.serve`` module which is a `hug <http://www.hug.rest/>`_ application which handles processing of HTTP requests and initiating calls to the desired model.
3737

3838
The server supports extending with new services using provided API classes, see `Annotation Structure Types - Server Responses`_ for more details.
3939

4040
Running NLP Architect Server
4141
============================
42+
Install requirements
43+
--------------------
44+
The server requires extra python packages:
45+
46+
.. code:: bash
47+
48+
pip install -r server/requirements.txt
49+
4250
Starting the server
4351
-------------------
4452
To run the server run the following command:
4553

4654
.. code:: bash
4755
48-
nlp_architect server -p 8080
56+
hug -f serve.py -p 8080
4957
5058
The server will run locally on port 8080 and can be queried on ``/inference`` directive.
5159

@@ -179,7 +187,7 @@ Adding new services
179187
===================
180188
Adding a new service to the server
181189
----------------------------------
182-
All the services are declared in a ``JSON`` file found at ``nlp_architect/server/services.json``.
190+
All the services are declared in a ``JSON`` file found at ``server/services.json``.
183191

184192
In order to add a new service to the server you need to go over 3 steps:
185193

docs-source/source/service_deploy.rst

Lines changed: 0 additions & 224 deletions
This file was deleted.

0 commit comments

Comments
 (0)