Skip to content

Commit

Permalink
add interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
tommydangerous committed May 14, 2024
1 parent 51f031f commit fac3d34
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
Empty file.
37 changes: 37 additions & 0 deletions mlops/unit_4_triggering/markdowns/online_inference_guide.md
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.
17 changes: 17 additions & 0 deletions mlops/unit_4_triggering/pipelines/predict/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ blocks:
type: global_data_product
upstream_blocks: []
uuid: model
- all_upstream_blocks_executed: true
color: null
configuration:
file_source:
path: unit_4_triggering/markdowns/online_inference_guide.md
downstream_blocks: []
executor_config: null
executor_type: local_python
has_callback: false
language: markdown
name: online inference guide
retry_config: null
status: updated
timeout: null
type: markdown
upstream_blocks: []
uuid: online_inference_guide
- all_upstream_blocks_executed: true
color: teal
configuration:
Expand Down

0 comments on commit fac3d34

Please sign in to comment.