-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51f031f
commit fac3d34
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
37 changes: 37 additions & 0 deletions
37
mlops/unit_4_triggering/markdowns/online_inference_guide.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Sample online inference | ||
|
||
Use the following CURL command to get real-time predictions: | ||
|
||
```curl | ||
curl --location 'http://localhost:6789/api/runs' \ | ||
--header 'Authorization: Bearer fire' \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'Cookie: lng=en' \ | ||
--data '{ | ||
"run": { | ||
"pipeline_uuid": "predict", | ||
"block_uuid": "inference", | ||
"variables": { | ||
"inputs": [ | ||
{ | ||
"DOLocationID": "239", | ||
"PULocationID": "236", | ||
"trip_distance": 1.98 | ||
}, | ||
{ | ||
"DOLocationID": "170", | ||
"PULocationID": "65", | ||
"trip_distance": 6.54 | ||
} | ||
] | ||
} | ||
} | ||
}' | ||
``` | ||
|
||
## Note | ||
|
||
The `Authorization` header is using this pipeline’s API trigger’s token value. | ||
The token value is set to `fire` for this project. | ||
If you create a new trigger, that token will change. | ||
Only use a fixed token for testing or demonstration purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters