Skip to content

Commit

Permalink
Quality fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarques committed Nov 4, 2024
1 parent 7d93b02 commit a441dad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/guidellm/request/emulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ def sample_prompt(self, tokens: int) -> str:


def sample_images(self):
image_indices = self._rng.choice(len(self._images), size=self._config.images, replace=False)
image_indices = self._rng.choice(
len(self._images), size=self._config.images, replace=False,
)

return [self._images[i] for i in image_indices]
2 changes: 2 additions & 0 deletions src/guidellm/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@
"resolve_transformers_dataset_split",
"split_lines_by_punctuation",
"split_text",
"ImageDescriptor",
"load_images",
]
2 changes: 1 addition & 1 deletion src/guidellm/utils/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def load_images(data: str) -> List[ImageDescriptor]:
)
)

return images
return images

0 comments on commit a441dad

Please sign in to comment.