Giter Club home page Giter Club logo

Comments (3)

szalpal avatar szalpal commented on May 30, 2024

Hi @dumbPy !

Apologies for the late response.

I envision 2 scenarios you can follow:

  1. You want to have a single model.dali (i.e. serialized DALI pipeline) model for all of your YOLO models. In this scenario, since the DALI pipeline is already serialized, your best chance would be to use fn.external_source and feed the model with the input. Unfortunately, Triton does not make it easy to pass constants specified in config.pbtxt. However, you could work this around. If you set up a Python Backend model before the DALI model, Python model might have knowledge about the shape of the YOLO model. This way, Python model can take the user input and pass it (at the minimal cost) to DALI together with the resize parameter.
  2. The other option is to keep unserialized DALI model and then deploy it. Obviously, it's not something that can be always convenient. However, if you have a deployment step before running the server and choosing the YOLO input shape, you can parameterize DALI pipeline serialization:
@pipeline_def
def pipe(rx, ry):
    inp = fn.external_source(...)
    resized = fn.resize(inp, resize_x=rx, resize_y=ry, ...)
    return resized

[...]
def serialize():
    args = args.parse_args()  # argparse in one way to pass the cmdline parameters...
    p = pipe(rx=args.rx, ry=args.ry, ...)
    p.serialize(...)

I hope this is going to help.

from dali_backend.

dumbPy avatar dumbPy commented on May 30, 2024

Hi @szalpal
thank you, and sorry for my late reply 😅

Yes, Solution 2 is what I ended up going with since it's doesn't take much time to compile, while deploying a model.
Thanks a lot..

from dali_backend.

chajath avatar chajath commented on May 30, 2024

could you elaborate on option 2 please? do we serialize DALI pipeline on-the-fly in the triton container?

from dali_backend.

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.