Comments (6)
@singhniraj08 Can you please help with above?
from serving.
Apologies for late reply. Going through the old issue, TF Serving batching capability only supports dense tensors and sparse tensors are not supported yet. TensorFlow represents sparse tensors through the tf.sparse.SparseTensor object which is not supported in TF Serving batching.
One workaround I can think of is to convert the sparse tensor to dense tensor using tf.sparse.to_dense before sending it to your model. Let us know if this works for you. Thank you!
from serving.
Hi @singhniraj08 Thanks for your reply. Our TF model accepts those sparse tensors so that would require
- Changing the model to accept dense tensors instead of sparse.
- Sending sparse tensors over network compared to dense tensors improves I/O.
Followup Question:
- Lets say TF serving is running as a separate process with GPUs enabled. Does batching happens on CPU or GPU? If batching happens on GPU then I am thinking can Batching session convert sparse tensors to dense tensors (essentially execute the initial part of graph) and then produce batches? Is this feasible? Or if there is a way to do it - I am happy to contribute
- If batching happens on CPU then sparseToDense will happen on CPU and the whole dense tensor needs to be moved to GPU. Is that feasible?
from serving.
@ndeepesh, Tensorflow model graph utilizes the GPU and batching being a preprocessing step will happen in CPU.
I am not sure if sparse to dense transformation can be implemented on the batching side(as model server code is written in C++), implementing support of sparse tensors in TF Serving will make more sense. I understand your idea of converting spare to dense tensors during preprocessing step but in this case also, you would have to make changes in your model to accept dense tensor instead of sparse tensors.
And if you are concerned about the network latency, you are go through this article which can help you improve the TF Serving performance. Thanks.
from serving.
This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.
from serving.
This issue was closed due to lack of activity after being marked stale for past 7 days.
from serving.
Related Issues (20)
- Unable to compile prediction_service.proto for Golang HOT 4
- TF Serving gets stuck in the polling loop due to a non-existing model provided in config file HOT 3
- Evaluate using Profile-Guided Optimization (PGO) and LLVM BOLT HOT 3
- TensorFlow serving seems to have no version attribute HOT 3
- GPU inference in Docker container fails due to missing libdevice directory HOT 4
- CPU Memory occupied by TF Serving even though serving is on GPU HOT 6
- Version 2.15 release? HOT 7
- Mismatch between TensorRT version used in TF 2.14 GPU docker images for tensorflow/serving and tensorflow/tensorflow causes segfault during inference HOT 1
- Critical Vulnerability HOT 3
- Who to contact for security issues HOT 3
- Difference between Metrics emitted by TF Serving HOT 4
- OP_REQUIRES failed at xla_ops : UNIMPLEMENTED: Could not find compiler for platform CUDA: NOT_FOUND HOT 7
- java.lang.RuntimeException: Unexpected code Response{protocol=http/1.1, code=400, message=Bad Request, url=http://localhost:8501/v1/models/myfruit:predict} HOT 6
- CUDA Graphs support for Tensorflow Serving HOT 2
- OP_REQUIRES failed at xla_compile_on_demand_op.cc:290 : UNIMPLEMENTED: Could not find compiler for platform CUDA: NOT_FOUND HOT 4
- Add health check to Dockerfile HOT 4
- ETA for TensorFlow Runtime Integration?
- Why TF Serving using one CUDA Compute Stream HOT 4
- Ragged Tensor as an output from Tensorflow serving HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serving.