-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Loosen model interface checks #1621
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
base: master
Are you sure you want to change the base?
Conversation
@shkwsk my tfs model uses 10 features, but my grpc request sends 11 features (the 10 features the models needs + 1 additional feature (called dummy - which the model does not need))
when you want to do a/b testing as follows, lets say the grpc client sends a request with 20 features:
currently tensorflow serving would not allow that. cc @rmothukuru |
@geraldstanje It seems to be the same as your issue, but from the error messages you show, it looks like you're using the RESTful API. The RESTful API may be able to do the same fix, but I don't have a good idea right now. |
@shkwsk thanks for the pr - lets get it merged. |
@geraldstanje In any case, I'll be waiting for the official reviewer's comments. |
@geraldstanje |
@shkwsk ok. let me test over the weekend. |
@shkwsk do you have a script to builds the tfs docker image which is based on your branch? |
@geraldstanje |
@shkwsk i tried, but that field since Dockerfile.devel clones https://github.com/tensorflow/serving... but your code is in https://github.com/shkwsk/serving/tree/shkwsk-patch1
any idea? |
@geraldstanje diff --git a/tensorflow_serving/tools/docker/Dockerfile.devel b/tensorflow_serving/tools/docker/Dockerfile.devel
index fb247c1..3ac4a35 100644
--- a/tensorflow_serving/tools/docker/Dockerfile.devel
+++ b/tensorflow_serving/tools/docker/Dockerfile.devel
@@ -88,8 +88,8 @@ RUN mkdir /bazel && \
# Download TF Serving sources (optionally at specific commit).
WORKDIR /tensorflow-serving
-RUN git clone --branch=${TF_SERVING_VERSION_GIT_BRANCH} https://github.com/tensorflow/serving . && \
- git remote add upstream https://github.com/tensorflow/serving.git && \
+RUN git clone --branch=${TF_SERVING_VERSION_GIT_BRANCH} https://github.com/shkwsk/serving . && \
+ git remote add upstream https://github.com/tensorflow/serving.git && \
if [ "${TF_SERVING_VERSION_GIT_COMMIT}" != "head" ]; then git checkout ${TF_SERVING_VERSION_GIT_COMMIT} ; fi |
@geraldstanje Thanks for your testing! |
i think having different # of features in request compared to that what model expects -- is usually an indicator of training vs serving "skew". you are assuming here that its kosher to send request with more features than the model expects. This may be OK for your scenario, but might be an indicator of bad model pushed to serving in other cases (and you will want to fail the request in such cases, for monitoring to alert appropriately). IOW i am not convinced that this change is safe for all situations and its OK to loosen this check. |
@netfs But I need this patch for model migration on the running service. If you are not convinced to loosen the validation checks by default, how about adding the option to choose to loosen? |
why can't versioning be used to do this safely? IOW send versioned requests. And maybe use labels to make the transition usable [0].
|
@netfs It is difficult to manage the status of all servers while distributing the file to each server. I update multiple models daily on our S3 bucket, and run AB tests between the updated models. |
you still need to notify the client to switch its inference request to contain different set of features (corresponding to the new B version of the model) -- no? how is this switch different than asking client to also use a different explicit version?
|
@netfs @shkwsk @chrisolston any progress on that? |
Hello.
This patch loosens the checking of the model interface in gRPC Predict API.
If the key of "request.inputs()" satisfies the required key of "signature.inputs()", the request is predictable.
This allows you to add features to a running gRPC client server at any given time, even though they are not used for prediction.
The advantage of this patch is that the API of the model is backwards compatible when AB testing a model with added features on a running service.
Let me know what you think.