vwxyzjn / cleanrl

High-quality single file implementation of Deep Reinforcement Learning algorithms with research-friendly features (PPO, DQN, C51, DDPG, TD3, SAC, PPG)
http://docs.cleanrl.dev
Other
5.41k stars 616 forks source link

Fix dqn model evals #381

Closed sdpkjc closed 1 year ago

sdpkjc commented 1 year ago

Description

Fixes #380

Types of changes

Checklist:

If you need to run benchmark experiments for a performance-impacting changes:

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cleanrl ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2023 9:56pm
sdpkjc commented 1 year ago

Next -> Add test cases

sdpkjc commented 1 year ago

Can we modify the existing test cases to test them, or create a new test file for them?

def test_dqn_jax():
    subprocess.run(
        "python cleanrl/dqn_atari_jax.py --save-model True --learning-starts 10 --total-timesteps 16 --buffer-size 10 --batch-size 4",
        shell=True,
        check=True,
    )
sdpkjc commented 1 year ago

The model evaluation dependency environment is related to the algorithm dependency environment. If we create a new test file for the model evaluation, it will multiply the number of test files. I suggest just adding --save-model True, or something simple way.

vwxyzjn commented 1 year ago

The model evaluation dependency environment is related to the algorithm dependency environment. If we create a new test file for the model evaluation, it will multiply the number of test files. I suggest just adding --save-model True, or something simple way.

This sounds good to me!

sdpkjc commented 1 year ago

Thanks for your review. 👌🫡