Skip to content

Commit

Permalink
Added predict documentation but unsure
Browse files Browse the repository at this point in the history
  • Loading branch information
milo157 committed Nov 22, 2023
1 parent 515a761 commit 11516fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cerebrium/environments/initial-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ The parameters for your config file are the same as those which you would use as
| `min_replicas` | The minimum number of replicas to run. | int | 0 |
| `max_replicas` | The maximum number of replicas to scale to. | int | \*plan limit |
| `cooldown` | The number of seconds to keep your model warm after each request. It resets after every request | int | 60 |
| `predict-data` | A JSON object for you to test inference on your endpoint when a deployment is made | json | {} |
| `disable-predict` | Whether to disable testing your predict function with input | boolean | false |
## Config File Example
Expand All @@ -67,4 +70,6 @@ disable_animation: false
python_version: 3.9
min_replicas: 0
max_replicas: 30
predict_data: '{"prompt": "The quick brown fox jumps over the lazy dog"}'
disable-predict: false
```
2 changes: 1 addition & 1 deletion cerebrium/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def predict(item, run_id, logger):

# Do something with parameters from item

return {"key": "value}
return {"key": "value"}
```

The Item class is where you define the parameters your model receives as well as their type. Item needs to inherit from BaseModel which uses Pydantic to validate request schemas.
Expand Down

0 comments on commit 11516fa

Please sign in to comment.