Skip to content

Commit 484eb9c

Browse files
committed
fix legacy code
1 parent e5f9a9c commit 484eb9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_collector.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,12 @@ def create_env():
15761576

15771577
# Create shared memory weight sync scheme
15781578
weight_sync_scheme = SharedMemWeightSyncScheme()
1579-
weight_sync_scheme.register_shared_weights("policy", policy_weights)
1579+
# Use the new init_on_sender API with params_map
1580+
# All 3 workers share the same CPU weights in shared memory
1581+
weight_sync_scheme.init_on_sender(
1582+
model_id="policy",
1583+
params_map={0: policy_weights, 1: policy_weights, 2: policy_weights},
1584+
)
15801585

15811586
collector_class = (
15821587
MultiSyncDataCollector if not use_async else MultiaSyncDataCollector

0 commit comments

Comments
 (0)