Skip to content

Commit

Permalink
fix(framework): fix how pytorch DataContainer convert GPU tensor (#2739)
Browse files Browse the repository at this point in the history
  • Loading branch information
larme committed Jul 14, 2022
1 parent 548312c commit 28f0bc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bentoml/_internal/frameworks/common/pytorch.py
Expand Up @@ -144,7 +144,7 @@ def to_payload( # pylint: disable=arguments-differ
batch_dim: int = 0,
plasma_db: "ext.PlasmaClient" | None = Provide[BentoMLContainer.plasma_db],
) -> Payload:
batch = batch.numpy()
batch = batch.cpu().numpy()
if plasma_db:
return cls.create_payload(
plasma_db.put(batch).binary(),
Expand Down

0 comments on commit 28f0bc3

Please sign in to comment.