Skip to content

Integrating hydra with DQN #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jun 22, 2022
Merged

Conversation

BoboBananas
Copy link
Contributor

Integrated hydra with DQN using structured configs.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 15, 2022
@vmoens vmoens added the enhancement New feature or request label Jun 16, 2022

actor_model_explore = model[0]
if args.ou_exploration:
if args.gSDE:
if cfg.ou_exploration:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we delete ou_exploration and gSDE from DQN? they make no sense here. Ideally they shouldn't even be in the config

…v_dqn

# Conflicts:
#	examples/ddpg/ddpg.py
#	examples/dqn/dqn.py
#	examples/redq/redq.py
#	examples/sac/sac.py
@@ -10,7 +10,6 @@
import hydra
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where do those changes in PPO come from in this PR

@@ -1351,3 +1351,5 @@ class DiscreteModelConfig:
# whether a distributional loss should be used.
atoms: int = 51
# number of atoms used for the distributional loss
gSDE: bool = False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah let's not do that :) No gSDE for discrete actions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@BoboBananas BoboBananas Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed epsilon greedy wrapper which removed the error with action_value being None, is this ok?

Copy link
Collaborator

@vmoens vmoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what we can do about gSDE

Copy link
Collaborator

@vmoens vmoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EGreedyWrapper should still be used

@@ -103,17 +101,8 @@ def main(cfg: "DictConfig"):
)

loss_module, target_net_updater = make_dqn_loss(model, cfg)
model_explore = EGreedyWrapper(model, annealing_num_steps=cfg.annealing_frames).to(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still want that, that's the typical exploration technique for dqn

@@ -124,7 +113,7 @@ def main(cfg: "DictConfig"):

collector = make_collector_offpolicy(
make_env=create_env_fn,
actor_model_explore=model_explore,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep model_explore

@vmoens vmoens merged commit 18e2a41 into pytorch:hydra_integration Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants