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:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
+3 -7
View File
@@ -19,9 +19,7 @@ _CONFIG_FILENAME = "config.json"
class FileMapper:
"""
FileMapper maps KV blocks (given by their hash) to file names.
"""
"""FileMapper maps KV blocks (given by their hash) to file names."""
def __init__(
self,
@@ -41,8 +39,7 @@ class FileMapper:
replicated_layout: bool = False,
canonical_format: str | None = None,
):
"""
Initialize the file mapper. Each worker constructs its own, but
"""Initialize the file mapper. Each worker constructs its own, but
`config.json` is shared across workers since rank lives outside the hash.
When `parallel_agnostic=True`, tp/pp/pcp/dcp are forced to 1 and rank
to 0 so multiple parallelism layouts collapse into the same folder.
@@ -136,8 +133,7 @@ class FileMapper:
@staticmethod
def _compute_base_path(root_dir: str, fields: dict) -> str:
"""
Layout: <root_dir>/<safe_model_name>_<sha256-prefix>/.
"""Layout: <root_dir>/<safe_model_name>_<sha256-prefix>/.
safe_model_name replaces '/' with '_' so HuggingFace IDs don't nest.
"""
canonical = json.dumps(fields, sort_keys=True, separators=(",", ":"))