Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3cfa91b
Modify predictor validation struct accordingly
RobertLucian Dec 15, 2020
f833586
Merge branch 'master' into improvement/python-api-spec
RobertLucian Dec 15, 2020
d13b743
More validations for models
RobertLucian Dec 15, 2020
dc0fda9
Model resource extraction in Python stack
RobertLucian Dec 15, 2020
aa6e338
Fixes for DML on Python
RobertLucian Dec 15, 2020
7fe6d0f
Fix models not showing up in cortex get
RobertLucian Dec 15, 2020
da93dbd
Telemetry & misc
RobertLucian Dec 15, 2020
6bc7c64
DML fixes
RobertLucian Dec 15, 2020
bd09727
Merge branch 'master' into improvement/python-api-spec
RobertLucian Dec 16, 2020
15bdde5
Add dynamic_model_loading to the docs
RobertLucian Dec 16, 2020
12095cc
Fix test examples
RobertLucian Dec 16, 2020
268c297
Disallow DML for BatchAPI kind
RobertLucian Dec 16, 2020
9258050
Merge branch 'master' into feature/single-model-paths
RobertLucian Dec 16, 2020
c8c9aa6
Merge branch 'master' into improvement/python-api-spec
vishalbollu Dec 17, 2020
e3b09e8
Support ONNX model file paths
RobertLucian Dec 17, 2020
26e5e58
Move model_path field inside the models section
RobertLucian Dec 17, 2020
0f09a21
Fixes on the go-side + some docs
RobertLucian Dec 17, 2020
6fa13b4
Fixes for the Python side
RobertLucian Dec 18, 2020
927e2f5
Merge branch 'master' into improvement/python-api-spec
RobertLucian Dec 18, 2020
8f4f72e
Merge branch 'improvement/python-api-spec' into feature/single-model-…
RobertLucian Dec 18, 2020
e8bfc53
Update docs
RobertLucian Dec 18, 2020
7c79acd
Merge branch 'master' into improvement/python-api-spec
RobertLucian Dec 18, 2020
a906fff
Rename models:model_path to models:path
RobertLucian Dec 18, 2020
d2f5184
Merge branch 'improvement/python-api-spec' into feature/single-model-…
RobertLucian Dec 18, 2020
220f7fa
Misc changes
RobertLucian Dec 18, 2020
de694bf
Merge branch 'improvement/python-api-spec' into feature/single-model-…
RobertLucian Dec 18, 2020
43086b6
Fix merge conflicts from 'master' into feature/single-model-paths
RobertLucian Dec 22, 2020
c980ba8
Address review comments
RobertLucian Dec 22, 2020
e000387
Merge branch 'master' into feature/single-model-paths
RobertLucian Dec 22, 2020
08e7f02
Fix validation
RobertLucian Dec 22, 2020
f25c2f2
Merge branch 'master' into feature/single-model-paths
RobertLucian Dec 22, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test examples
  • Loading branch information
RobertLucian committed Dec 16, 2020
commit 12095ccd85de7b47524e7c07a7c23834edd3e51c
3 changes: 2 additions & 1 deletion test/live-reloading/python/mpg-estimator/cortex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
predictor:
type: python
path: predictor.py
model_path: s3://cortex-examples/sklearn/mpg-estimator/linreg/
dynamic_model_loading:
model_path: s3://cortex-examples/sklearn/mpg-estimator/linreg/
10 changes: 5 additions & 5 deletions test/model-caching/python/mpg-estimator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export ENDPOINT=your-api-endpoint
Make a request version `1` of the `mpg-estimator` model:

```bash
curl "${ENDPOINT}?model=resnet50&version=1" -X POST -H "Content-Type: application/json" -d @sample.json
curl "${ENDPOINT}?version=1" -X POST -H "Content-Type: application/json" -d @sample.json
```

The expected response is:
Expand All @@ -45,13 +45,13 @@ At this point, there is one model loaded into memory (as specified by `cache_siz
Make a request version `2` of the `mpg-estimator` model:

```bash
curl "${ENDPOINT}?model=mobilenet" -X POST -H "Content-Type: application/json" -d @sample.json
curl "${ENDPOINT}?version=2" -X POST -H "Content-Type: application/json" -d @sample.json
```

The expected response is:

```json
{"prediction": 26.929889872154185, "model": {"name": "mpg-estimator", "version": "1"}}
{"prediction": 26.929889872154185, "model": {"name": "mpg-estimator", "version": "2"}}
```

### Version 3
Expand All @@ -61,13 +61,13 @@ With the following request, version 2 of the model will have to be evicted from
Make a request version `3` of the `mpg-estimator` model:

```bash
curl "${ENDPOINT}?model=shufflenet" -X POST -H "Content-Type: application/json" -d @sample.json
curl "${ENDPOINT}?version=3" -X POST -H "Content-Type: application/json" -d @sample.json
```

The expected response is:

```json
{"prediction": 26.929889872154185, "model": {"name": "mpg-estimator", "version": "1"}}
{"prediction": 26.929889872154185, "model": {"name": "mpg-estimator", "version": "3"}}
```

---
Expand Down
13 changes: 7 additions & 6 deletions test/model-caching/python/mpg-estimator/cortex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
predictor:
type: python
path: predictor.py
models:
paths:
- name: mpg-estimator
model_path: s3://cortex-examples/sklearn/mpg-estimator/linreg/
cache_size: 1
disk_cache_size: 2
dynamic_model_loading:
models:
paths:
- name: mpg-estimator
model_path: s3://cortex-examples/sklearn/mpg-estimator/linreg/
cache_size: 1
disk_cache_size: 2
2 changes: 1 addition & 1 deletion test/model-caching/python/mpg-estimator/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def load_model(self, model_path):
return mlflow.sklearn.load_model(model_path)

def predict(self, payload, query_params):
model_name = query_params["model"]
model_name = "mpg-estimator"
model_version = query_params.get("version", "latest")

model = self.client.get_model(model_name, model_version)
Expand Down