Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document SC 1.1 compatibility with different s2i wrappers #1602

Merged
merged 4 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions doc/source/reference/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,43 @@ For those wishing to use the deprecated Java engine service orchestrator see [th
### Upgrading process


### Wrapper compatibility table

To verify if 1.1 Seldon Core is compatible with older s2i wrapper versions we conducted a simple test with a one-node model.
Model has been deployed both with REST and GRPC API with both new orchestrator and the deprecated Java engine.
Test verifies if model can successfully serve inference requests.

**NOTE:** Full support of custom metrics and tags with new orchestrator is only available from Python wrapper version 0.19.
If you need to use older version of Python wrapper you can continue to use Java engine as described above until the next release.


| Language Wrapper | Version | API Type | New Orchestrator | Deprecated Java engine | Notes |
|------------------|---------------|----------|-------------------|------------------------|-----------------------------------------|
| Python | 0.19 | both | yes | yes | full support of custom metrics and tags |
adriangonz marked this conversation as resolved.
Show resolved Hide resolved
| Python | 0.11 ... 0.18 | both | yes | yes | |
| Python | 0.10 | REST | no | yes | |
| Python | 0.10 | GRPC | yes | yes | |
| Python | < 0.10 | GRPC | ? | ? | |
| Java | 0.2 & 0.1 | REST | yes | yes | minor difference in request format |
| Java | 0.2 & 0.1 | GRPC | yes | yes | |


Example of request format difference with Java wrapper deployed with REST API:
1. Using new orchestrator:
```bash
curl -s -X POST \
-d 'json={"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
localhost:8003/seldon/seldon/compat-rest-java-02-executor/api/v1.0/predictions
```

2. Using deprecated Java engine:
```bash
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"data": {"names": ["a", "b"], "ndarray": [[1.0, 2.0]]}}' \
localhost:8003/seldon/seldon/compat-rest-java-02-engine/api/v1.0/predictions
```


## Upgrading to 0.5.2 from previous versions

This version included significant improvements and features, including the addition of pre-packaged model servers, fixing several critical bugs.
Expand Down
267 changes: 267 additions & 0 deletions incubating/wrappers/s2i/compatibility-tests/Makefile

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions incubating/wrappers/s2i/compatibility-tests/Model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import logging
import os


class Model:

def predict(self, features, names=[], meta=[]):
logging.info(f"My id is {id(self)}")
logging.info(f"OS pid is {os.getpid()}")
logging.info(f"model features: {features}")
logging.info(f"model names: {names}")
logging.info(f"model meta: {meta}")
return features.tolist()

def tags(self):
return {"a": 1, "b": 2}

def metrics(self):
return [
{"type": "COUNTER", "key": "mycounter", "value": 1, "tags": {"mytag": "mytagvalue"}},
{"type": "GAUGE", "key": "mygauge", "value": 100},
{"type": "TIMER", "key": "mytimer", "value": 20.2},
]
Loading