This message was deleted.
# ask-for-help
s
This message was deleted.
j
Looks like this has to do with how you are calling the runner's method? also, is there any reasons why are you using our internal apis?
f
I'm invoking it with
logits_tensor = await runner.async_run(batch)
, being
batch
a
Dict[str, torch.Tensor]
I'm using the internal APIs because I didn't want to pass just the name of the model as it's being done in the example in the docs. I'm already invoking
bentoml.pytorch.get()
in the
service.py
because I need to read some
custom_objects
from it. So I thought it would be better to pass the instance I already have. Maybe it was not really necessary? Is there actually any downside of having two instances of a BentoModel in memory?
j
Is there actually any downside of having two instances of a BentoModel in memory
it takes up more memory? 🙂 otherwise there's not really a downside. It's recommended to use our public API unless you really know what you're doing! have you tested with the public API instead?
anyway your original error has to do with
def __call__(self, **batch):
you should do this
await runner.async_run(**batch)