@@ -60,6 +60,17 @@ By installing `inference-cli` you gain access to the `inference rf-cloud` comman
60
60
managed components of the Roboflow Platform — including ` batch-processing ` and ` data-staging ` , the core components of
61
61
the Roboflow Batch Processing offering.
62
62
63
+ !!! hint "Inference CLI setup"
64
+
65
+ To follow the tutorial you must install `inference-cli` and export your Roboflow API key.
66
+
67
+ ```bash
68
+ pip install inference-cli
69
+ export ROBOFLOW_API_KEY="YOUR-API-KEY-GOES-HERE"
70
+ ```
71
+
72
+ If you struggle to find the API key, check our [guide](https://docs.roboflow.com/api-reference/authentication).
73
+
63
74
The typical flow of interaction with the CLI is as follows:
64
75
65
76
First, ingest data into the platform. For images, use the following command:
@@ -89,20 +100,32 @@ Once the data is ingested - you can trigger batch job.
89
100
For images, use the following command:
90
101
91
102
``` bash
92
- inference rf-cloud batch-processing process-images-with-workflow --workflow-id < workflow-id> --batch-id < batch-id>
103
+ inference rf-cloud batch-processing process-images-with-workflow \
104
+ --workflow-id < workflow-id> \
105
+ --batch-id < batch-id> \
106
+ --machine-type gpu
93
107
```
94
108
95
109
For videos:
96
110
97
111
``` bash
98
- inference rf-cloud batch-processing process-videos-with-workflow --workflow-id < workflow-id> --batch-id < batch-id>
112
+ inference rf-cloud batch-processing process-videos-with-workflow \
113
+ --workflow-id < workflow-id> \
114
+ --batch-id < batch-id> \
115
+ --machine-type gpu \
116
+ --max-video-fps < your-desired-fps>
99
117
```
100
118
101
119
!!! hint "How would I know ` <workflow-id> ` ?"
102
120
103
121
Workflow ID can be found in Roboflow App - open Workflow Editor of selected Workflow, hit "Deploy" button
104
122
and find identifier in code snippet.
105
123
124
+ !!! hint "GPU vs CPU"
125
+
126
+ By default, processing run on CPU device, but if you require extra compute power - use `--machine-type gpu`
127
+ option of the above commands.
128
+
106
129
Command will ** display the ID of the job** , which can be used to check the job status:
107
130
108
131
``` bash
@@ -176,7 +199,7 @@ potential costs.
176
199
* Certain Workflow blocks requiring access to env variables and local storage (like File Sink and Environment
177
200
Secret Store) are blacklisted and will not execute.
178
201
179
- * Service only works with Workflows that define ** singe ** input image parameter.
202
+ * Service only works with Workflows that define ** single ** input image parameter.
180
203
181
204
182
205
## Technical Details of Batch Processing
@@ -191,7 +214,7 @@ for processing (each batch is processed by a single job).
191
214
output batch that you can retrieve later. We ** advise** using ` export ` stage outputs, as they are optimized for
192
215
network transfer (content is compressed / packed into an archive).
193
216
194
- * A running job in the ` processing ` tage can be aborted using both the UI and CLI.
217
+ * A running job in the ` processing ` stage can be aborted using both the UI and CLI.
195
218
196
219
* An aborted or failed job can be restarted using the mentioned tools.
197
220
0 commit comments