Skip to content

Commit 9615401

Browse files
TianyeGGBondclaude
andcommitted
Record the sync-actor invariant behind the removed cache lock
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent a049e71 commit 9615401

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

miles/backends/megatron_utils/actor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,11 @@ def _ensure_cpu_bucket_cache(self):
613613
rebuild. Bucket size cap comes from
614614
``args.miles_model_update_bucket_size_mb`` (cf. F10 S2/S3a-2
615615
startup checks).
616+
617+
No actor-level lock guards ``build_cpu_bucket_cache`` /
618+
``run_sync_session``: train actors must stay default sync Ray actors
619+
(no ``max_concurrency``), so Ray serializes their calls. The cache's
620+
own lock protects its internal state.
616621
"""
617622
if not hasattr(self, "_cpu_bucket_cache") or self._cpu_bucket_cache is None:
618623
from .update_weight.cpu_bucket_cache import CPUBucketCache

0 commit comments

Comments
 (0)