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
@@ -76,7 +76,6 @@ class LogprobsProcessor:
|
||||
logprobs_lists: the lists of logprob tokens, logprobs, and ranks.
|
||||
|
||||
"""
|
||||
|
||||
assert self.num_logprobs is not None
|
||||
assert self.logprobs is not None
|
||||
assert self.cumulative_logprob is not None
|
||||
@@ -129,7 +128,6 @@ class LogprobsProcessor:
|
||||
tensors.
|
||||
|
||||
"""
|
||||
|
||||
# Prompt logprobs are enabled.
|
||||
assert self.num_prompt_logprobs is not None
|
||||
assert self.prompt_logprobs is not None
|
||||
@@ -187,7 +185,7 @@ class LogprobsProcessor:
|
||||
)
|
||||
|
||||
def pop_prompt_logprobs(self) -> PromptLogprobs | None:
|
||||
"""Pop and return all request prompt logprobs
|
||||
"""Pop and return all request prompt logprobs.
|
||||
|
||||
The logprobs processor aggregates prompt chunk logprobs
|
||||
over one or more prefill chunks. This method returns
|
||||
@@ -199,6 +197,7 @@ class LogprobsProcessor:
|
||||
Returns:
|
||||
None if prompt logprobs are disabled for this request.
|
||||
List of all prompt logprobs, otherwise.
|
||||
|
||||
"""
|
||||
plp = self.prompt_logprobs
|
||||
if plp:
|
||||
@@ -223,6 +222,7 @@ class LogprobsProcessor:
|
||||
|
||||
Returns:
|
||||
List of sampled token IDs, oldest first, most recent last.
|
||||
|
||||
"""
|
||||
if not logprobs_source:
|
||||
return []
|
||||
@@ -265,6 +265,7 @@ class LogprobsProcessor:
|
||||
Returns:
|
||||
The corrected decoded string, or empty string if the byte
|
||||
sequence is genuinely incomplete at this point.
|
||||
|
||||
"""
|
||||
assert self.tokenizer is not None
|
||||
|
||||
@@ -325,6 +326,7 @@ class LogprobsProcessor:
|
||||
context_token_ids: Preceding sampled token IDs providing
|
||||
sequential context. If None, extracted from
|
||||
self.logprobs.
|
||||
|
||||
"""
|
||||
if context_token_ids is None:
|
||||
context_token_ids = self._get_sampled_context_ids(self.logprobs)
|
||||
|
||||
Reference in New Issue
Block a user