File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
sota-implementations/grpo Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -354,7 +354,8 @@ def train(
354
354
with timeit ("update_policy_weights" ):
355
355
torchrl_logger .info ("Updating policy weights..." )
356
356
weight_updater .push_weights (policy_training )
357
- torch .cuda .empty_cache ()
357
+ # TODO: do we need this? Does it interfere with other processes?
358
+ # torch.cuda.empty_cache()
358
359
gc .collect ()
359
360
360
361
# Checkpointing disabled to prevent disk space issues
@@ -380,7 +381,8 @@ def train(
380
381
381
382
# Clear memory
382
383
del loss_val
383
- torch .cuda .empty_cache ()
384
+ # TODO: do we need this? Does it interfere with other processes?
385
+ # torch.cuda.empty_cache()
384
386
gc .collect ()
385
387
386
388
pbar .close ()
Original file line number Diff line number Diff line change @@ -288,7 +288,8 @@ def train(
288
288
289
289
# Clear memory
290
290
del loss_val
291
- torch .cuda .empty_cache ()
291
+ # TODO: do we need this? Does it interfere with other processes?
292
+ # torch.cuda.empty_cache()
292
293
gc .collect ()
293
294
294
295
# Update metrics
@@ -387,7 +388,8 @@ def train(
387
388
with timeit ("update_policy_weights" ):
388
389
torchrl_logger .info ("Updating policy weights..." )
389
390
weight_updater .push_weights (policy_training )
390
- torch .cuda .empty_cache ()
391
+ # TODO: do we need this? Does it interfere with other processes?
392
+ # torch.cuda.empty_cache()
391
393
gc .collect ()
392
394
393
395
timeit .print (prefix = "timeit" )
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ class RayLLMCollector(LLMCollector):
69
69
>>> for data in collector: # non-blocking
70
70
... # expensive operation - collector is collecting data
71
71
72
+ This is somehwat equivalent to using :class:`~torchrl.collectors.MultiSyncDataCollector` (`sync_iter=True`) or
73
+ :class:`~torchrl.collectors.MultiAsyncDataCollector` (`sync_iter=False`).
72
74
Defaults to `True`.
73
75
verbose (bool, optional): if ``True``, the collector will print progress information.
74
76
Defaults to `False`.
You can’t perform that action at this time.
0 commit comments