Skip to content

Commit fac3d34

Browse files
add interactions
1 parent 51f031f commit fac3d34

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

mlops/unit_4_triggering/markdowns/__init__.py

Whitespace-only changes.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Sample online inference
2+
3+
Use the following CURL command to get real-time predictions:
4+
5+
```curl
6+
curl --location 'http://localhost:6789/api/runs' \
7+
--header 'Authorization: Bearer fire' \
8+
--header 'Content-Type: application/json' \
9+
--header 'Cookie: lng=en' \
10+
--data '{
11+
"run": {
12+
"pipeline_uuid": "predict",
13+
"block_uuid": "inference",
14+
"variables": {
15+
"inputs": [
16+
{
17+
"DOLocationID": "239",
18+
"PULocationID": "236",
19+
"trip_distance": 1.98
20+
},
21+
{
22+
"DOLocationID": "170",
23+
"PULocationID": "65",
24+
"trip_distance": 6.54
25+
}
26+
]
27+
}
28+
}
29+
}'
30+
```
31+
32+
## Note
33+
34+
The `Authorization` header is using this pipeline’s API trigger’s token value.
35+
The token value is set to `fire` for this project.
36+
If you create a new trigger, that token will change.
37+
Only use a fixed token for testing or demonstration purposes.

mlops/unit_4_triggering/pipelines/predict/metadata.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ blocks:
1919
type: global_data_product
2020
upstream_blocks: []
2121
uuid: model
22+
- all_upstream_blocks_executed: true
23+
color: null
24+
configuration:
25+
file_source:
26+
path: unit_4_triggering/markdowns/online_inference_guide.md
27+
downstream_blocks: []
28+
executor_config: null
29+
executor_type: local_python
30+
has_callback: false
31+
language: markdown
32+
name: online inference guide
33+
retry_config: null
34+
status: updated
35+
timeout: null
36+
type: markdown
37+
upstream_blocks: []
38+
uuid: online_inference_guide
2239
- all_upstream_blocks_executed: true
2340
color: teal
2441
configuration:

0 commit comments

Comments
 (0)