@@ -26,9 +26,8 @@ Before making choice of an interface, install model's package requirements
26
26
27
27
python -m deeppavlov install < config_path>
28
28
29
- * where ``<config_path> `` is path to the chosen model's config file (e.g.
30
- ``deeppavlov/configs/classifiers/insults_kaggle_bert.json ``) or just name without
31
- `.json ` extension (e.g. ``insults_kaggle_bert ``)
29
+ * where ``<config_path> `` is model name without ``.json `` extension (e.g. ``insults_kaggle_bert ``) or path to the
30
+ chosen model's config file (e.g. ``deeppavlov/configs/classifiers/insults_kaggle_bert.json ``)
32
31
33
32
34
33
Command line interface (CLI)
@@ -38,19 +37,18 @@ To get predictions from a model interactively through CLI, run
38
37
39
38
.. code :: bash
40
39
41
- python -m deeppavlov interact < config_path> [-d]
40
+ python -m deeppavlov interact < config_path> [-d] [-i]
42
41
43
- * ``-d `` downloads required data -- pretrained model files and embeddings
44
- (optional).
42
+ * ``-d `` downloads required data -- pretrained model files and embeddings (optional).
43
+ * `` -i `` installs model requirements (optional).
45
44
46
45
You can train it in the same simple way:
47
46
48
47
.. code :: bash
49
48
50
- python -m deeppavlov train < config_path> [-d]
49
+ python -m deeppavlov train < config_path> [-d] [-i]
51
50
52
- Dataset will be downloaded regardless of whether there was ``-d `` flag or
53
- not.
51
+ Dataset will be downloaded regardless of whether there was ``-d `` flag or not.
54
52
55
53
To train on your own data, you need to modify dataset reader path in the
56
54
`train section doc <configuration.html#Train-config >`__. The data format is
@@ -60,9 +58,10 @@ There are even more actions you can perform with configs:
60
58
61
59
.. code :: bash
62
60
63
- python -m deeppavlov < action> < config_path> [-d]
61
+ python -m deeppavlov < action> < config_path> [-d] [-i]
64
62
65
63
* ``<action> `` can be
64
+ * ``install `` to install model requirements (same as ``-i ``),
66
65
* ``download `` to download model's data (same as ``-d ``),
67
66
* ``train `` to train the model on the data specified in the config file,
68
67
* ``evaluate `` to calculate metrics on the same dataset,
@@ -71,10 +70,11 @@ There are even more actions you can perform with configs:
71
70
</integrations/rest_api>`),
72
71
* ``risesocket `` to run a socket API server (see :doc: `docs
73
72
</integrations/socket_api>`),
74
- * ``predict `` to get prediction for samples from `stdin ` or from
75
- `<file_path> ` if ``-f <file_path> `` is specified.
73
+ * ``predict `` to get prediction for samples from `` stdin ` ` or from
74
+ `` <file_path> ` ` if ``-f <file_path> `` is specified.
76
75
* ``<config_path> `` specifies path (or name) of model's config file
77
76
* ``-d `` downloads required data
77
+ * ``-i `` installs model requirements
78
78
79
79
80
80
Python
@@ -86,13 +86,15 @@ To get predictions from a model interactively through Python, run
86
86
87
87
from deeppavlov import build_model
88
88
89
- model = build_model(< config_path> , download = True )
89
+ model = build_model(< config_path> , install = True , download = True )
90
90
91
91
# get predictions for 'input_text1', 'input_text2'
92
92
model([' input_text1' , ' input_text2' ])
93
93
94
- * where ``download=True `` downloads required data from web -- pretrained model
95
- files and embeddings (optional),
94
+ where
95
+
96
+ * ``install=True `` installs model requirements (optional),
97
+ * ``download=True `` downloads required data from web -- pretrained model files and embeddings (optional),
96
98
* ``<config_path> `` is path to the chosen model's config file (e.g.
97
99
``"deeppavlov/configs/ner/ner_ontonotes_bert_mult.json" ``) or
98
100
``deeppavlov.configs `` attribute (e.g.
@@ -104,13 +106,12 @@ You can train it in the same simple way:
104
106
105
107
from deeppavlov import train_model
106
108
107
- model = train_model(< config_path> , download = True )
109
+ model = train_model(< config_path> , install = True , download = True )
108
110
109
111
* ``download=True `` downloads pretrained model, therefore the pretrained
110
112
model will be, first, loaded and then trained (optional).
111
113
112
- Dataset will be downloaded regardless of whether there was ``-d `` flag or
113
- not.
114
+ Dataset will be downloaded regardless of whether there was ``-d `` flag or not.
114
115
115
116
To train on your own data, you need to modify dataset reader path in the
116
117
`train section doc <configuration.html#Train-config >`__. The data format is
@@ -122,7 +123,7 @@ You can also calculate metrics on the dataset specified in your config file:
122
123
123
124
from deeppavlov import evaluate_model
124
125
125
- model = evaluate_model(< config_path> , download = True )
126
+ model = evaluate_model(< config_path> , install = True , download = True )
126
127
127
128
128
129
Using GPU
@@ -173,10 +174,10 @@ You can find a list of our out-of-the-box models `below <#out-of-the-box-pretrai
173
174
Docker images
174
175
~~~~~~~~~~~~~
175
176
176
- You can run DeepPavlov models in :doc: `riseapi </integrations/rest_api >` mode
177
- via Docker without installing DP . Both your CPU and GPU (we support NVIDIA graphic
178
- processors) can be utilised, please refer our `CPU <https://hub.docker.com/r/deeppavlov/base-cpu >`_
179
- and ` GPU < https://hub.docker.com/r/deeppavlov/base-gpu >`_ Docker images run instructions.
177
+ You can run DeepPavlov models in :doc: `riseapi </integrations/rest_api >` mode or start Jupyter server
178
+ via Docker without installing DeepPavlov . Both your CPU and GPU (we support NVIDIA graphic
179
+ processors) can be utilised, please refer our `Docker <https://hub.docker.com/r/deeppavlov/deeppavlov >`_
180
+ images run instructions.
180
181
181
182
182
183
Out-of-the-box pretrained models
0 commit comments