Skip to content

Commit 0516176

Browse files
committed
Update
[ghstack-poisoned]
1 parent 3ce8cdc commit 0516176

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

examples/collectors/weight_sync_standalone.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def example_multiprocess_sync():
129129
print(
130130
f"Main: Worker completed. Worker's weight sum: {model_state['weight_sum']:.4f}"
131131
)
132-
print(f"✓ Weight synchronization successful!")
132+
print("Weight synchronization successful!")
133133

134134

135135
def example_shared_memory_sync():
@@ -163,7 +163,7 @@ def example_shared_memory_sync():
163163
weights_td["weight"].fill_(2.0)
164164
weights_td["bias"].fill_(1.0)
165165

166-
print(f"Main: Sending weights via shared memory...")
166+
print("Main: Sending weights via shared memory...")
167167
sender.update_weights(weights_td)
168168

169169
# Workers automatically see updates via shared memory!
@@ -179,7 +179,7 @@ def example_shared_memory_sync():
179179
print(
180180
f"Main: Worker completed. Worker's weight sum: {model_state['weight_sum']:.4f}"
181181
)
182-
print(f"✓ Shared memory synchronization successful!")
182+
print("Shared memory synchronization successful!")
183183

184184

185185
def main():

test/test_weightsync.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
import torch
1111
import torch.nn as nn
1212
from tensordict import TensorDict
13-
from tensordict.nn import TensorDictModule
1413
from torch import multiprocessing as mp
15-
from torchrl.collectors import SyncDataCollector
16-
from torchrl.envs import GymEnv
1714

1815
from torchrl.weight_update.weight_sync_schemes import (
1916
_resolve_model,

0 commit comments

Comments
 (0)