Skip to content

Commit

Permalink
[RLlib] Issue 28428: QMix not working w/ GPUs. (ray-project#31299)
Browse files Browse the repository at this point in the history
Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
  • Loading branch information
sven1977 authored and tamohannes committed Jan 25, 2023
1 parent 90d532a commit 933a07a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions rllib/algorithms/qmix/qmix.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def __init__(self):
self.optim_eps = 0.00001
self.grad_clip = 10

# QMix-torch overrides the TorchPolicy's learn_on_batch w/o specifying a
# alternative `learn_on_loaded_batch` alternative for the GPU.
# TODO: This hack will be resolved once we move all algorithms to the new
# RLModule/RLTrainer APIs.
self.simple_optimizer = True

# Override some of AlgorithmConfig's default values with QMix-specific values.
# .training()
self.lr = 0.0005
Expand Down
2 changes: 1 addition & 1 deletion rllib/policy/torch_policy_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def __init__(

# Backward compatibility workaround so Policy will call self.loss() directly.
# TODO(jungong): clean up after all policies are migrated to new sub-class
# implementation.
# implementation.
self._loss = None

# Store, which params (by index within the model's list of
Expand Down

0 comments on commit 933a07a

Please sign in to comment.