pyinfer
pyinfer copied to clipboard
Unpack dict like inputs
- 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.