We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41b03ce commit 492215cCopy full SHA for 492215c
train_async.py
@@ -53,7 +53,7 @@ def train(args):
53
54
if (rollout_id + 1) % args.update_weights_interval == 0:
55
# sync generate before update weights to prevent update weight in the middle of generation
56
- rollout_data_curr_ref = ray.get(rollout_data_next_future)
+ rollout_data_curr_ref = ray.get(x) if (x := rollout_data_next_future) is not None else None
57
rollout_data_next_future = None
58
actor_model.update_weights()
59
0 commit comments