pyinfer icon indicating copy to clipboard operation
pyinfer copied to clipboard

Unpack dict like inputs

Open cdpierse opened this issue 3 years ago • 0 comments

  • Currently inputs that are dict-like cannot be unpacked into the model during a run.
  • For example when running a hugging face model with inputs from a tokenizer the input type is custom class that is dict like. To run the model with these inputs you would call model(**inputs) but with the current implementation of pyinfer this is not possible.

Possible Solutions

  • add checks for types of input and decide whether to unpack based on those checks.
  • allow user to specify input needs unpacking via parameter, this is probably the best option as it allows for custom class types to be unpacked.

cdpierse avatar Nov 25 '20 14:11 cdpierse