-
Notifications
You must be signed in to change notification settings - Fork 835
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
executor: tags do not propagate through inference graph #1474
Comments
The current executor will pass the payloads through it won't modify any payloads. I assume this is why you just see the response meta from the final model. |
The question is how much we need to preserve functionality provided by For just context of |
Just to define a behaviour we want to preserve I suggest to consider minimal scenario:
The means by which it happens should not be a concern of the user. Before we move handling of metadata to headers (not sure if we gonna do it even at this point) the fix for that could happen at the python wrapper / microservice level. I really wouldn't want require from users to define def predict(self, data, names, meta):
self._meta = meta as this will just become ugly boilerplate. |
Should not forget to verify if graphs with |
#1481 Seems to have right now a working solution to the problem. curl -X POST -H 'Content-Type: application/json' \
-d '{"meta": {"some": "input meta"}, "data": {"names": ["get"], "ndarray": ["data"]}}' \
http://localhost:8003/seldon/seldon/step-experiments/api/v0.1/predictions | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 658 100 577 100 81 10122 1421 --:--:-- --:--:-- --:--:-- 11543
{
"meta": {
"puid": "lruk80c6r9f4m3r2fqt61r0ns1",
"tags": {
"current": "three",
"one": "yes",
"value_at_one": [
"data"
],
"two": "yes",
"value_at_two": [
"one"
],
"three": "yes",
"value_at_three": [
"two"
]
},
"routing": {
"step-one": -1,
"step-two": -1
},
"requestPath": {
"step-three": "seldon-experiments:step-3",
"step-one": "seldon-experiments:step-1",
"step-two": "seldon-experiments:step-2"
},
"metrics": []
},
"data": {
"names": [],
"ndarray": [
"two"
]
}
} and here is with executor curl -X POST -H 'Content-Type: application/json' \
-d '{"meta": {"some": "input meta"}, "data": {"names": ["get"], "ndarray": ["data"]}}' \
http://localhost:8003/seldon/seldon/step-experiments/api/v0.1/predictions | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 267 100 186 100 81 5166 2250 --:--:-- --:--:-- --:--:-- 7416
{
"data": {
"names": [],
"ndarray": [
"two"
]
},
"meta": {
"tags": {
"current": "three",
"one": "yes",
"three": "yes",
"two": "yes",
"value_at_one": [
"data"
],
"value_at_three": [
"two"
],
"value_at_two": [
"one"
]
}
}
} |
And here is test with GRPC. Engine: cd /home/rskolasinski/work/seldon-core/executor/proto && grpcurl -d '{"data": {"names": ["get"], "ndarray": ["data"]}}' -rpc-header seldon:step-experiments-grpc -rpc-header namespace:seldon -plaintext -proto ./prediction.proto 0.0.0.0:8003 seldon.protos.Seldon/Predict | jq .
{
"meta": {
"puid": "ph3cafjilu65adnrke44to9kvj",
"tags": {
"current": "three",
"one": "yes",
"three": "yes",
"two": "yes",
"value_at_one": [
"data"
],
"value_at_three": [
"two"
],
"value_at_two": [
"one"
]
},
"routing": {
"step-one": -1,
"step-two": -1
},
"requestPath": {
"step-one": "seldon-experiments-grpc:step-1",
"step-three": "seldon-experiments-grpc:step-3",
"step-two": "seldon-experiments-grpc:step-2"
}
},
"data": {
"ndarray": [
"two"
]
}
} Executor: cd /home/rskolasinski/work/seldon-core/executor/proto && grpcurl -d '{"data": {"names": ["get"], "ndarray": ["data"]}}' -rpc-header seldon:step-experiments-grpc -rpc-header namespace:seldon -plaintext -proto ./prediction.proto 0.0.0.0:8003 seldon.protos.Seldon/Predict | jq .
{
"meta": {
"tags": {
"current": "three",
"one": "yes",
"three": "yes",
"two": "yes",
"value_at_one": [
"data"
],
"value_at_three": [
"two"
],
"value_at_two": [
"one"
]
}
},
"data": {
"ndarray": [
"two"
]
}
} |
Just updated PR with applying fix to more methods and adding unit tests. |
The PR does not (and probably won't) contain fix to |
* Fix tags propagation with Executor, closes #1474 * fix broken log formatting * apply style fix and increase flakiness
I'm still having some problems related to this. Basically, all models create tags and the Transformer Output needs to read them before forwarding the result of Model 3. I'm using Seldon 1.1 with REST requests. The problem is that I can only see the tags from Model 3 inside Transformer.
|
I think transform output should have the meta. @RafalSkolasinski ? |
@gmattar It seems that aggregate methods are not passing |
For example, same requests with
engine
and with
executor
both performed using
1.0.3-SNAPSHOT
and for following seldon deployment:(see models here)
Issue related to #1362 in order to provide backwards compatibility with behaviour present with engine.
The text was updated successfully, but these errors were encountered: