Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 9f9d165

Browse files
authored
Update server docs to use v2 infer endpoints (#1643)
1 parent 1ff44cd commit 9f9d165

File tree

12 files changed

+26
-25
lines changed

12 files changed

+26
-25
lines changed

docs/use-cases/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Making a request:
7272
import requests
7373

7474
# Uvicorn is running on this port
75-
url = 'http://0.0.0.0:5543/predict'
75+
url = 'http://0.0.0.0:5543/v2/models/sentiment_analysis/infer'
7676

7777
# send the data
7878
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}

docs/use-cases/cv/embedding-extraction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ deepsparse.server --config_file config.yaml
9393
Make requests to the server:
9494
```python
9595
import requests, json
96-
url = "http://0.0.0.0:5543/predict/from_files"
96+
url = "http://0.0.0.0:5543/v2/models/embedding_extraction-0/infer/from_files"
9797
paths = ["lion.jpeg"]
9898
files = [("request", open(img, 'rb')) for img in paths]
9999
resp = requests.post(url=url, files=files)

docs/use-cases/cv/image-segmentation-yolact.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Run inference:
188188
import requests
189189
import json
190190

191-
url = 'http://0.0.0.0:5543/predict/from_files'
191+
url = 'http://0.0.0.0:5543/v2/models/yolact/infer/from_files'
192192
path = ['thailand.jpeg'] # list of images for inference
193193
files = [('request', open(img, 'rb')) for img in path]
194194
resp = requests.post(url=url, files=files)
@@ -217,7 +217,7 @@ Run inference:
217217
import requests
218218
import json
219219

220-
url = 'http://0.0.0.0:5543/predict/from_files'
220+
url = 'http://0.0.0.0:5543/v2/models/yolact/infer/from_files'
221221
path = ['thailand.jpeg'] # list of images for inference
222222
files = [('request', open(img, 'rb')) for img in path]
223223
resp = requests.post(url=url, files=files)

docs/use-cases/cv/object-detection-yolov5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Making a request.
230230
import requests
231231
import json
232232

233-
url = 'http://0.0.0.0:5543/predict/from_files'
233+
url = 'http://0.0.0.0:5543/v2/models/yolo/infer/from_files'
234234
path = ['basilica.jpg'] # list of images for inference
235235
files = [('request', open(img, 'rb')) for img in path]
236236
resp = requests.post(url=url, files=files)
@@ -271,7 +271,7 @@ Making a request:
271271
```python
272272
import requests, json
273273

274-
url = 'http://0.0.0.0:5543/predict/from_files'
274+
url = 'http://0.0.0.0:5543/v2/models/yolo/infer/from_files'
275275
path = ['basilica.jpg'] # list of images for inference
276276
files = [('request', open(img, 'rb')) for img in path]
277277
resp = requests.post(url=url, files=files)

docs/use-cases/general/scheduler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Run inference:
158158
import requests
159159

160160
# Uvicorn is running on this port
161-
url = 'http://0.0.0.0:5543/predict'
161+
url = 'http://0.0.0.0:5543/v2/models/sentiment_analysis/infer'
162162

163163
# send the data
164164
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}

docs/use-cases/nlp/question-answering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Here is an example client request, using the Python requests library for formatt
230230
import requests
231231

232232
# Uvicorn is running on this port
233-
url = 'http://0.0.0.0:5543/predict'
233+
url = 'http://0.0.0.0:5543/v2/models/question_answering/infer'
234234

235235
# send the data
236236
obj = {

docs/use-cases/nlp/sentiment-analysis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Here is an example client request, using the Python `requests` library for forma
259259
import requests
260260

261261
# Uvicorn is running on this port
262-
url = 'http://0.0.0.0:5543/predict'
262+
url = 'http://0.0.0.0:5543/v2/models/sentiment_analysis/infer'
263263

264264
# send the data
265265
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}
@@ -297,7 +297,7 @@ Making a request:
297297
import requests
298298

299299
# Uvicorn is running on this port
300-
url = 'http://0.0.0.0:5543/predict'
300+
url = 'http://0.0.0.0:5543/v2/models/sentiment_analysis/infer'
301301

302302
# send the data
303303
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}

docs/use-cases/nlp/text-classification.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Making a request:
325325
import requests
326326

327327
# Uvicorn is running on this port
328-
url = 'http://0.0.0.0:5543/predict'
328+
url = 'http://0.0.0.0:5543/v2/models/text_classification/infer'
329329

330330
# send the data
331331
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}
@@ -351,14 +351,15 @@ Making a request:
351351
import requests
352352

353353
# Uvicorn is running on this port
354-
url = 'http://0.0.0.0:5543/predict'
354+
url = "http://0.0.0.0:5543/v2/models/text_classification/infer"
355355

356356
# send the data
357357
obj = {
358-
"sequences": [[
359-
"The text classification pipeline is fast and easy to use!",
360-
"The pipeline for text classification makes it simple to get started"
361-
]]}
358+
"sequences": [
359+
["The pipeline for text classification makes it simple to get started"],
360+
["The text classification pipeline is fast and easy to use!"],
361+
]
362+
}
362363
resp = requests.post(url=url, json=obj)
363364

364365
# recieve the post-processed output
@@ -391,7 +392,7 @@ Making a request:
391392
import requests
392393

393394
# Uvicorn is running on this port
394-
url = 'http://0.0.0.0:5543/predict'
395+
url = 'http://0.0.0.0:5543/v2/models/text_classification/infer'
395396

396397
# send the data
397398
obj = {"sequences": "Sending requests to DeepSparse Server is fast and easy!"}

docs/use-cases/nlp/token-classification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Here is an example client request, using the Python requests library for formatt
228228
import requests
229229

230230
# Uvicorn is running on this port
231-
url = 'http://0.0.0.0:5543/predict'
231+
url = 'http://0.0.0.0:5543/v2/models/token_classification/infer'
232232
# send the data
233233
obj = {"inputs": "Mary is flying from Nairobi to New York to attend a conference"}
234234
resp = requests.post(url=url, json=obj)
@@ -261,7 +261,7 @@ Making a request:
261261
import requests
262262

263263
# Uvicorn is running on this port
264-
url = 'http://0.0.0.0:5543/predict'
264+
url = 'http://0.0.0.0:5543/v2/models/token_classification/infer'
265265

266266
# send the data
267267
obj = {"inputs": "Mary is flying from Nairobi to New York to attend a conference",}

docs/use-cases/nlp/transformers-embedding-extraction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Here is an example client request, using the Python `requests` library for forma
155155
import requests
156156

157157
# Uvicorn is running on this port
158-
url = 'http://0.0.0.0:5543/predict'
158+
url = 'http://0.0.0.0:5543/v2/models/transformers_embedding_extraction/infer'
159159

160160
# send the data
161161
obj = {"inputs": "The transformers embedding extraction Pipeline is the best!"}
@@ -191,7 +191,7 @@ Making requests:
191191
```python
192192
import requests, json
193193
# Uvicorn is running on this port
194-
url = 'http://0.0.0.0:5543/predict'
194+
url = 'http://0.0.0.0:5543/v2/models/transformers_embedding_extraction/infer'
195195

196196
# send the data
197197
obj = {"inputs": "The transformers embedding extraction Pipeline is the best!"}

0 commit comments

Comments
 (0)