Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c2380dd
Commit the generated discovery service protobuf stubs
A9isha Aug 18, 2026
44a6f4a
Make cluster hardware and the HF token overridable in k8s_launcher
A9isha Aug 26, 2026
66a5aca
feat: add RaidenSynchronizer.release_host_arrays()
khatwanimohit Aug 25, 2026
31faca7
Add the RLVllmSampler adapter and its wire-format metadata converter
A9isha Aug 28, 2026
e1422dd
Make the SAMPLER=vllm rollout node bring up a MaxText model on TPU
A9isha Aug 28, 2026
a6ae3e0
Name the offending variables when manifest preflight fails
A9isha Aug 28, 2026
20cbf7a
TEMPORARY: log what the sampler actually returned
A9isha Aug 28, 2026
526d260
Sync trainer weights before the first rollout dispatch
A9isha Aug 28, 2026
7836e9a
Report bound tensor and element counts with sync checksums
A9isha Aug 28, 2026
8bef6eb
Optimize Raiden weight sync host memory and support MaxText trainer d…
YixuanWang-99 Sep 2, 2026
c46b832
Address review feedback: explicitly pass vllm config in run_trainer_n…
YixuanWang-99 Sep 2, 2026
1ce9aeb
Support host-stage weight sync, strip .value suffixes, and add CPU no…
YixuanWang-99 Sep 3, 2026
4fc354c
Add launch_raiden.sh unified launcher for distributed RL workloads wi…
YixuanWang-99 Sep 3, 2026
a831deb
Update default container image to yixuann-debug-raiden-0903-2 in laun…
YixuanWang-99 Sep 3, 2026
5af6e07
Update default container image to yixuann-raiden-debug-0903-2 in laun…
YixuanWang-99 Sep 3, 2026
3e38bdf
Fix k8s 63-char label limit on TRAINER_ID and add selective start com…
YixuanWang-99 Sep 4, 2026
71c9e00
Support multi-replica rollouts, drain rollout queue eagerly, and set …
YixuanWang-99 Sep 4, 2026
1fabb4a
Register Raiden FFI handlers with JAX, parameterize HF secret, and up…
YixuanWang-99 Sep 4, 2026
79b69c8
Enhance Raiden weight sync, multi-axis sharding, and distributed depl…
YixuanWang-99 Sep 5, 2026
8ff76ca
Fix Qwen3.5-35B Raiden weight sync: align trainer TP to rollout TP, e…
YixuanWang-99 Sep 6, 2026
bee926f
Add --use-weight-converter CLI flag support in launch_raiden.sh
YixuanWang-99 Sep 6, 2026
d7f98e9
Improve code quality and error handling for Raiden weight sync across…
YixuanWang-99 Sep 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions launch_raiden.sh
4 changes: 2 additions & 2 deletions requirements/maxtext_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
maxtext @ git+https://github.com/AI-Hypercomputer/maxtext.git@8c2e29218c01b6287ba85e8d0dc9555561f7634c
maxtext-vllm-adapter @ git+https://github.com/AI-Hypercomputer/maxtext.git@8c2e29218c01b6287ba85e8d0dc9555561f7634c#subdirectory=src/maxtext/integration/vllm
maxtext @ git+https://github.com/AI-Hypercomputer/maxtext.git@d3178f4ef123e5515ebead1204f0c3be79f0b32d
maxtext-vllm-adapter @ git+https://github.com/AI-Hypercomputer/maxtext.git@d3178f4ef123e5515ebead1204f0c3be79f0b32d#subdirectory=src/maxtext/integration/vllm
aqtp
tokamax>=0.0.4
drjax>=0.1.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def test_checksums_grand_total(self):
sync = raiden_synchronizer.RaidenSynchronizer("rollout", self._state())
sums = sync.checksums()
self.assertEqual(sums["__grand_total__"], 8.0 + 3.0)
self.assertLen(sums, 3) # two sampled tensors + grand total
self.assertEqual(sums["__tensor_count__"], 2)
self.assertEqual(sums["__element_count__"], 11)
self.assertLen(sums, 5) # two sampled tensors + grand total + tensor/element counts

def test_work_unit_metadata_shards_and_addresses(self):
sync = raiden_synchronizer.RaidenSynchronizer(
Expand Down
8 changes: 5 additions & 3 deletions tunix/experimental/common/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,11 @@ def _get_step_attr(step, attr):
if raw_reward is None:
raw_reward = getattr(traj, "reward", 0.0)
try:
env_reward = float(raw_reward or 0.0)
except (ValueError, TypeError):
env_reward = 0.0
env_reward = float(0.0 if raw_reward is None else raw_reward)
except (ValueError, TypeError) as exc:
raise ValueError(
f"Invalid reward '{raw_reward}' for request '{request_id}': must be a float."
) from exc

return cls(
request_id=request_id,
Expand Down
18 changes: 18 additions & 0 deletions tunix/experimental/distributed/deployment/yaml_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@ def main() -> None:
default="sleep infinity",
help="Command to run on startup",
)
parser.add_argument(
"--hf_token_secret_name",
default=os.environ.get("HF_TOKEN_SECRET_NAME", "hf-token-secret"),
help="Kubernetes secret name containing HF_TOKEN",
)
parser.add_argument(
"--namespace",
default=os.environ.get("K8S_NAMESPACE", "default"),
help="Kubernetes namespace (default: default)",
)
parser.add_argument(
"--queue_name",
default=os.environ.get("KUEUE_QUEUE_NAME", ""),
help="Kueue local queue name (optional)",
)

args = parser.parse_args()

Expand Down Expand Up @@ -164,6 +179,9 @@ def main() -> None:
USER_CONTAINER_IMAGE=args.worker_container_image,
USER_CONTAINER_PORT=args.worker_container_port,
STARTUP_COMMAND=args.worker_startup_command,
HF_TOKEN_SECRET_NAME=args.hf_token_secret_name,
NAMESPACE=args.namespace or "default",
QUEUE_NAME=args.queue_name,
)
print(content)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
name: ${JOBSET_NAME}
namespace: default
namespace: ${NAMESPACE}
spec:
failurePolicy:
maxRestarts: 3
restartStrategy: Recreate
network:
enableDNSHostnames: true
Expand All @@ -40,12 +41,17 @@ spec:
# ensure exclusive access to the node
alpha.jobset.sigs.k8s.io/exclusive-topology: kubernetes.io/hostname
spec:
priorityClassName: medium
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: Never
terminationGracePeriodSeconds: 10
nodeSelector:
node.kubernetes.io/instance-type: ${CPU_MACHINE}
tolerations:
- key: "cloud.google.com/gke-nodepool"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: ${USER_CONTAINER}
image: ${USER_CONTAINER_IMAGE}
Expand Down Expand Up @@ -83,6 +89,12 @@ spec:
exit $$EXIT_CODE
env:
# Injects the JobSet Name
- name: HF_TOKEN
valueFrom:
secretKeyRef:
name: ${HF_TOKEN_SECRET_NAME}
key: HF_TOKEN
optional: true
- name: JOBSET_NAME
valueFrom:
fieldRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
name: ${JOBSET_NAME}
namespace: default
namespace: ${NAMESPACE}
spec:
coordinator:
replicatedJob: proc
failurePolicy:
maxRestarts: 3
restartStrategy: Recreate
network:
enableDNSHostnames: true
Expand All @@ -38,6 +39,7 @@ spec:
parallelism: 1
template:
spec:
priorityClassName: medium
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: Never
Expand Down Expand Up @@ -152,6 +154,12 @@ spec:
exit $$EXIT_CODE
env:
# Injects the JobSet Name
- name: HF_TOKEN
valueFrom:
secretKeyRef:
name: ${HF_TOKEN_SECRET_NAME}
key: HF_TOKEN
optional: true
- name: JOBSET_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -197,6 +205,7 @@ spec:
# kueue.x-k8s.io/podset-slice-required-topology: cloud.google.com/gke-tpu-slice-${PODSET_SLICE_TOPOLOGY}-id
# kueue.x-k8s.io/podset-slice-size: "${PODSET_SLICE_SIZE}"
spec:
priorityClassName: medium
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: OnFailure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ apiVersion: jobset.x-k8s.io/v1alpha2
kind: JobSet
metadata:
name: ${JOBSET_NAME}
namespace: default
namespace: ${NAMESPACE}
spec:
failurePolicy:
maxRestarts: 3
restartStrategy: Recreate
network:
enableDNSHostnames: true
Expand All @@ -33,6 +34,7 @@ spec:
parallelism: ${PARALLELISM}
template:
spec:
priorityClassName: medium
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: OnFailure
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from tunix.experimental.distributed.runtime.discovery import discovery_service_pb2 as tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2

GRPC_GENERATED_VERSION = '1.81.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True

if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in tunix/experimental/distributed/runtime/discovery/discovery_service_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)


class DiscoveryServiceStub:
"""Discovery service used by distributed workers to register their coordinates.
"""

def __init__(self, channel):
"""Constructor.

Args:
channel: A grpc.Channel.
"""
self.Register = channel.unary_unary(
'/tunix.experimental.distributed.runtime.discovery.DiscoveryService/Register',
request_serializer=tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterRequest.SerializeToString,
response_deserializer=tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterResponse.FromString,
_registered_method=True)


class DiscoveryServiceServicer:
"""Discovery service used by distributed workers to register their coordinates.
"""

def Register(self, request, context):
"""Registers a worker node with the discovery service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_DiscoveryServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Register': grpc.unary_unary_rpc_method_handler(
servicer.Register,
request_deserializer=tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterRequest.FromString,
response_serializer=tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'tunix.experimental.distributed.runtime.discovery.DiscoveryService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('tunix.experimental.distributed.runtime.discovery.DiscoveryService', rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
class DiscoveryService:
"""Discovery service used by distributed workers to register their coordinates.
"""

@staticmethod
def Register(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/tunix.experimental.distributed.runtime.discovery.DiscoveryService/Register',
tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterRequest.SerializeToString,
tunix_dot_experimental_dot_distributed_dot_runtime_dot_discovery_dot_discovery__service__pb2.RegisterResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
Loading