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
@@ -28,8 +28,7 @@ batchsize_forward_time: defaultdict = defaultdict(list)
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BatchDescriptor:
|
||||
"""
|
||||
Batch descriptor for cudagraph dispatching. We should keep the num of
|
||||
"""Batch descriptor for cudagraph dispatching. We should keep the num of
|
||||
items as minimal as possible to properly and uniquely describe the padded
|
||||
batch for cudagraph.
|
||||
"""
|
||||
@@ -100,8 +99,7 @@ class DPMetadata:
|
||||
|
||||
@contextmanager
|
||||
def sp_local_sizes(self, sequence_parallel_size: int):
|
||||
"""
|
||||
Context manager for setting self.local_sizes. Same as self.chunked_sizes
|
||||
"""Context manager for setting self.local_sizes. Same as self.chunked_sizes
|
||||
but without any chunking.
|
||||
"""
|
||||
self.local_sizes = _compute_sp_num_tokens(
|
||||
@@ -211,7 +209,8 @@ def is_forward_context_available() -> bool:
|
||||
|
||||
def in_piecewise_cudagraph() -> bool:
|
||||
"""Whether the current forward runs in piecewise cudagraph mode (graph
|
||||
segments separated by eager breaks), at capture or replay time."""
|
||||
segments separated by eager breaks), at capture or replay time.
|
||||
"""
|
||||
return (
|
||||
is_forward_context_available()
|
||||
and get_forward_context().cudagraph_runtime_mode == CUDAGraphMode.PIECEWISE
|
||||
|
||||
Reference in New Issue
Block a user