Skip to content
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

feature(zjow): envpoool env example in new pipeline #746

Closed
wants to merge 308 commits into from

Conversation

zjowowen
Copy link
Collaborator

@zjowowen zjowowen commented Nov 1, 2023

No description provided.

@PaParaZz1 PaParaZz1 added the enhancement New feature or request label Nov 1, 2023
ding/envs/env_manager/envpool_env_manager.py Outdated Show resolved Hide resolved
)

def __init__(self, cfg: EasyDict) -> None:
self._cfg = cfg
self._cfg = self.default_config()
self._cfg.update(cfg)
Copy link
Member

Choose a reason for hiding this comment

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

why merge config here, we have already merged the config of env manager in compile_config function

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are two env manager config, one for evaluator and one for collector. It's too complicated to use compile_config with auto=True.
I suggest use compile_config with auto=False.

ding/envs/env_manager/envpool_env_manager.py Outdated Show resolved Hide resolved
ding/envs/env_manager/envpool_env_manager.py Outdated Show resolved Hide resolved
ding/envs/env_manager/envpool_env_manager.py Outdated Show resolved Hide resolved
ding/example/dqn_envpool_nstep.py Outdated Show resolved Hide resolved
ding/example/dqn_envpool_nstep.py Outdated Show resolved Hide resolved
ding/example/dqn_envpool_nstep.py Outdated Show resolved Hide resolved
ding/policy/common_utils.py Outdated Show resolved Hide resolved
)
)
#task.use(CkptSaver(policy, cfg.exp_name, train_freq=1000))
task.use(termination_checker(max_env_step=10000000))
Copy link
Member

Choose a reason for hiding this comment

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

use int(1e7)

)
task.use(data_pusher(cfg, buffer_))
task.use(EnvpoolOffPolicyLearner(cfg, policy, buffer_))
task.use(online_logger(train_show_freq=10))
Copy link
Member

Choose a reason for hiding this comment

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

why use two logger


def main(cfg):
logging.getLogger().setLevel(logging.INFO)
cfg.exp_name = 'Pong-v5-DQN-envpool-' + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
Copy link
Member

Choose a reason for hiding this comment

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

why modify this

'episodic_life': True, # collector: True
'reward_clip': False, # collector: True
'gray_scale': cfg.env.get('gray_scale', True),
'stack_num': cfg.env.get('stack_num', 4),
Copy link
Member

Choose a reason for hiding this comment

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

move some keys to default config and user config

@PaParaZz1
Copy link
Member

This PR will be continually updated in #753.

@PaParaZz1 PaParaZz1 closed this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants