Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -53,7 +53,7 @@ def _bitmask_to_token_ids(bitmask_row: torch.Tensor, vocab_size: int) -> list[in
|
||||
|
||||
|
||||
class BeamSearchOfflineMixin(OfflineInferenceMixin):
|
||||
"""Offline inference for beam search"""
|
||||
"""Offline inference for beam search."""
|
||||
|
||||
def beam_search(
|
||||
self,
|
||||
@@ -63,8 +63,7 @@ class BeamSearchOfflineMixin(OfflineInferenceMixin):
|
||||
use_tqdm: bool = False,
|
||||
concurrency_limit: int | None = None,
|
||||
) -> list[BeamSearchOutput]:
|
||||
"""
|
||||
Generate sequences using beam search.
|
||||
"""Generate sequences using beam search.
|
||||
|
||||
Args:
|
||||
prompts: A list of prompts. Each prompt can be a string or a list
|
||||
@@ -74,6 +73,7 @@ class BeamSearchOfflineMixin(OfflineInferenceMixin):
|
||||
use_tqdm: Whether to use tqdm to display the progress bar.
|
||||
concurrency_limit: The maximum number of concurrent requests.
|
||||
If None, the number of concurrent requests is unlimited.
|
||||
|
||||
"""
|
||||
# TODO: how does beam search work together with length penalty,
|
||||
# frequency, penalty, and stopping criteria, etc.?
|
||||
|
||||
@@ -20,7 +20,7 @@ from .utils import BeamSearchSequence, create_sort_beams_key_function
|
||||
|
||||
|
||||
class BeamSearchOnlineMixin(ABC):
|
||||
"""online serving for beam search"""
|
||||
"""online serving for beam search."""
|
||||
|
||||
renderer: BaseRenderer
|
||||
engine_client: EngineClient
|
||||
|
||||
Reference in New Issue
Block a user