Repository navigation
Conversation
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
There was a problem hiding this comment.
Code Review
This pull request introduces a persistent rollout queue and distributed fully-asynchronous rollout transport using the straw library, allowing prompt tasks, partial rollouts, and training batches to be persisted on shared storage. It also implements Score Centering (SC) to stabilize off-policy reinforcement learning, supporting both top-k and top-p sampling, and integrates R3 routing replay with straw for lazy loading of expert routes. Additionally, support for the supa accelerator backend is added, and the legacy train_async.py script is removed in favor of a unified train.py entrypoint. Feedback on the changes suggests using getattr fallbacks when accessing reference.torch_dtype and self.args.routing_replay_prefetch_microbatches to prevent potential AttributeError runtime crashes.
| kwargs = { | ||
| "device": (torch.device("cpu") if isinstance(reference, (TensorRef, DiskTensorRef)) else reference.device), | ||
| "dtype": (reference.torch_dtype if isinstance(reference, (TensorRef, DiskTensorRef)) else reference.dtype), | ||
| } |
There was a problem hiding this comment.
Accessing reference.torch_dtype directly on reference might raise an AttributeError if reference is an instance of straw.tensor.TensorRef and it does not implement torch_dtype (since dtype is stored as a string representation in straw.tensor.TensorRef). To ensure robustness and prevent potential runtime errors, consider using a fallback to map the string dtype to a torch.dtype object using getattr.
| kwargs = { | |
| "device": (torch.device("cpu") if isinstance(reference, (TensorRef, DiskTensorRef)) else reference.device), | |
| "dtype": (reference.torch_dtype if isinstance(reference, (TensorRef, DiskTensorRef)) else reference.dtype), | |
| } | |
| kwargs = { | |
| "device": (torch.device("cpu") if isinstance(reference, (TensorRef, DiskTensorRef)) else reference.device), | |
| "dtype": ( | |
| getattr(reference, "torch_dtype", None) or getattr(torch, reference.dtype) | |
| if isinstance(reference, (TensorRef, DiskTensorRef)) | |
| else reference.dtype | |
| ), | |
| } |
| if disk_prefetcher is None: | ||
| disk_prefetcher = RoutedExpertsMicrobatchPrefetcher(self.args.routing_replay_prefetch_microbatches) |
There was a problem hiding this comment.
If routing_replay_prefetch_microbatches is not defined or configured in self.args, accessing self.args.routing_replay_prefetch_microbatches directly will raise an AttributeError. Consider using getattr with a sensible default value (e.g., 1) to prevent potential runtime crashes.
if disk_prefetcher is None:
disk_prefetcher = RoutedExpertsMicrobatchPrefetcher(
getattr(self.args, "routing_replay_prefetch_microbatches", 1)
)Signed-off-by: aoshen02 <aoshen@inferact.ai>
92cd9f4 to
eaa075d
Compare
|
Validation update (2026-09-30): H200-0 candidate-image E2E passed rollout-only archive export, Straw |
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Stacked sync
Depends on #456. This PR mirrors Slime #2432 at
bbba9465026f5c16064201d3c84d4552dcf7df57; review the incremental diff against fork PR #6. Do not merge before #456.Changes
straw-queue>=0.1.2.Validation
aosheninferact/vime@sha256:1ad4d005f6c5f6b0d6e38b16e821fa525021bc5d6deeeea644e3047463453113(notlatest).No automatic merge or production image promotion.