Giter VIP home page Giter VIP logo

Comments (2)

VivekPanyam avatar VivekPanyam commented on June 13, 2024

As we talked about offline, this sounds good to me.

Some additional thoughts that you should feel free to ignore (or we should create a separate issue about if they sound useful):

  • It would be great to also include the option of a model taking multiple dicts as inputs instead of just one (so if a model takes in a string dict and a tensor dict, Neuropod will supply both). This would have the benefit of supporting older versions of Torch as well. It should be a fairly straightforward change to implement this.
  • Neuropod already supports several output types (Tensor, Dict[str, Tensor], named tuples, Dict[str, List[str]], tuple of dicts to support multiple return types, etc). Adding the ability to return Dict[str, Union[List[str], torch.Tensor]] would be nice if we are going to support that type as an input

These are definitely not required as part of this task (and should not all be put in the same PR), but some things to consider if you're interested in improving the TorchScript model interface.


Permalink version of the code snippet linked in original issue above:

// TODO(vip): This assumes a model only takes in string "tensors" or tensors, but not both
// Refactor to add support for both and add documentation

from neuropod.

VivekPanyam avatar VivekPanyam commented on June 13, 2024

Implemented in #543

from neuropod.

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.