Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast inputs type to dictionary. #2585

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Cast inputs type to dictionary.
ostrowskimarcin committed Jan 30, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 7b19171b7bef7e03e47e23e654157abb5d2e4b74
4 changes: 2 additions & 2 deletions torchbenchmark/models/hf_clip/__init__.py
Original file line number Diff line number Diff line change
@@ -51,9 +51,9 @@ def __init__(self, test, device, batch_size=1, extra_args=[]):
text = "the dog is here"
images = [image] * self.batch_size
texts = [text] * self.batch_size
self.inputs = processor(
self.inputs = dict(processor(
text=texts, images=images, return_tensors="pt", padding=True
)
))

# dict_keys(['input_ids', 'attention_mask', 'pixel_values'])
for key in self.inputs: