GithubHelp home page GithubHelp logo

Comments (2)

ianlivingstone avatar ianlivingstone commented on April 19, 2024 1

@morgangiraud once you have completed your investigation, could you post your notes here?

from tf-encrypted.

morgangiraud avatar morgangiraud commented on April 19, 2024

Multiple questions arise from this:

Why TF serving can be interesting for us

It specifically handle the usecase of load once and serve multiple request which is mandatory for our usage due to the overhead of network optimisation done by TF when loading a distributed graph.

It's also made for model versioning, updates and rollback which can be nice in the long run.

Does our models can be loaded in TF serving

As long as we keep using Tensorflow functions under the hood to build our graph, we are fine.

TF serving provides signatures for regression, calssification and a generic prediction. Those are used to create a gRPC API and/or a REST API. Those APIs consume JSON, convert and route it for your graph inputs automatically. As long as the graph is only containing native C++ functions, one can load its graph using TF Serving.

Note that we can build new C++ ops and add them to a custom TF build, that will be used to build a custom TF Serving.

Can we do distributed Tensorflow Serving

There is currently no use cases for Google to implement it there is no obvious reason why distributing computation for inference would speed up the said inference.

But, hopefully, at least one guy wanted to do it and he has been kind enough to post his exploration on StackOverflow here.

Based on his notes, I gave it a go and see if I could save a distributed model on localhost with a cluster and use it in RF Serving out of the box: spent 1h30 building using bazel to end up erroring...

First good point:

  • all the needed bits are here to do distributed computation using TensorFlow Serving and TF clusters.

Second good point:

  • When defining a model and save it. Devices are saved by default, meaning that as long as you define your cluster and keep it online. TF Serving is just using the graph which handles the distributed computation.

Potential bad points:

  • This is not officialy supported so might run into multiple problems
    • Model versioning might be broken.
    • What happens if the master node stops?
    • What happens if anhy stops actually?
    • Error handling maybe?

TODO

Actually seeing if it works out of the box or you have to build from scratch. I'll retry inside a docker env soon

Interesting feedback from zendesk

https://medium.com/zendesk-engineering/how-zendesk-serves-tensorflow-models-in-production-751ee22f0f4b

1 year old though, things have improved since

from tf-encrypted.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.