Reinforcement Learning
stable-baselines3
SpaceInvadersNoFrameskip-v4
deep-reinforcement-learning
Eval Results (legacy)
Run this model with HF Jobs
Run prathith/DQNSpaceInvade on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/prathith/DQNSpaceInvade. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/prathith/DQNSpaceInvade on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use prathith/DQNSpaceInvade with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use prathith/DQNSpaceInvade with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="prathith/DQNSpaceInvade", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Initial commit
Browse filesFiles changed (15)
- .gitattributes+1
- README.mdAdded+86
- args.ymlAdded+81
- config.ymlAdded+29
- dqn-SpaceInvadersNoFrameskip-v4.zipAdded+3
- dqn-SpaceInvadersNoFrameskip-v4/_stable_baselines3_versionAdded+1
- dqn-SpaceInvadersNoFrameskip-v4/dataAdded
- dqn-SpaceInvadersNoFrameskip-v4/policy.optimizer.pthAdded+3
- dqn-SpaceInvadersNoFrameskip-v4/policy.pthAdded+3
- dqn-SpaceInvadersNoFrameskip-v4/pytorch_variables.pthAdded+3
- dqn-SpaceInvadersNoFrameskip-v4/system_info.txtAdded+9
- env_kwargs.ymlAdded+1
- replay.mp4Added+3
- results.jsonAdded+1
- train_eval_metrics.zipAdded+3
32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text*.mp4 filter=lfs diff=lfs merge=lfs -text1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586---library_name: stable-baselines3tags:- SpaceInvadersNoFrameskip-v4- deep-reinforcement-learning- reinforcement-learning- stable-baselines3model-index:- name: DQN results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: SpaceInvadersNoFrameskip-v4 type: SpaceInvadersNoFrameskip-v4 metrics: - type: mean_reward value: 5.00 +/- 7.07 name: mean_reward verified: false---
# **DQN** Agent playing **SpaceInvadersNoFrameskip-v4**This is a trained model of a **DQN** agent playing **SpaceInvadersNoFrameskip-v4**using the [stable-baselines3 library](https://github.com/DLR-RM/stable-baselines3)and the [RL Zoo](https://github.com/DLR-RM/rl-baselines3-zoo).
The RL Zoo is a training framework for Stable Baselines3reinforcement learning agents,with hyperparameter optimization and pre-trained agents included.
## Usage (with SB3 RL Zoo)
RL Zoo: https://github.com/DLR-RM/rl-baselines3-zoo<br/>SB3: https://github.com/DLR-RM/stable-baselines3<br/>SB3 Contrib: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib
Install the RL Zoo (with SB3 and SB3-Contrib):```bashpip install rl_zoo3```
```# Download model and save it into the logs/ folderpython -m rl_zoo3.load_from_hub --algo dqn --env SpaceInvadersNoFrameskip-v4 -orga prathith -f logs/python -m rl_zoo3.enjoy --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/```
If you installed the RL Zoo3 via pip (`pip install rl_zoo3`), from anywhere you can do:```python -m rl_zoo3.load_from_hub --algo dqn --env SpaceInvadersNoFrameskip-v4 -orga prathith -f logs/python -m rl_zoo3.enjoy --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/```
## Training (with the RL Zoo)```python -m rl_zoo3.train --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/# Upload the model and generate video (when possible)python -m rl_zoo3.push_to_hub --algo dqn --env SpaceInvadersNoFrameskip-v4 -f logs/ -orga prathith```
## Hyperparameters```pythonOrderedDict([('batch_size', 32), ('buffer_size', 100000), ('env_wrapper', ['stable_baselines3.common.atari_wrappers.AtariWrapper']), ('exploration_final_eps', 0.01), ('exploration_fraction', 0.1), ('frame_stack', 4), ('gradient_steps', 1), ('learning_rate', 0.0001), ('learning_starts', 100000), ('n_timesteps', 100000.0), ('optimize_memory_usage', False), ('policy', 'CnnPolicy'), ('target_update_interval', 1000), ('train_freq', 4), ('normalize', False)])```
# Environment Arguments```python{'render_mode': 'rgb_array'}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081!!python/object/apply:collections.OrderedDict- - - algo - dqn - - conf_file - dqn.yml - - device - auto - - env - SpaceInvadersNoFrameskip-v4 - - env_kwargs - null - - eval_episodes - 5 - - eval_freq - 25000 - - gym_packages - [] - - hyperparams - null - - log_folder - logs/ - - log_interval - -1 - - max_total_trials - null - - n_eval_envs - 1 - - n_evaluations - null - - n_jobs - 1 - - n_startup_trials - 10 - - n_timesteps - -1 - - n_trials - 500 - - no_optim_plots - false - - num_threads - -1 - - optimization_log_path - null - - optimize_hyperparameters - false - - progress - false - - pruner - median - - sampler - tpe - - save_freq - -1 - - save_replay_buffer - false - - seed - 3210939806 - - storage - null - - study_name - null - - tensorboard_log - '' - - track - false - - trained_agent - '' - - truncate_last_trajectory - true - - uuid - false - - vec_env - dummy - - verbose - 1 - - wandb_entity - null - - wandb_project_name - sb3 - - wandb_tags - []1234567891011121314151617181920212223242526272829!!python/object/apply:collections.OrderedDict- - - batch_size - 32 - - buffer_size - 100000 - - env_wrapper - - stable_baselines3.common.atari_wrappers.AtariWrapper - - exploration_final_eps - 0.01 - - exploration_fraction - 0.1 - - frame_stack - 4 - - gradient_steps - 1 - - learning_rate - 0.0001 - - learning_starts - 100000 - - n_timesteps - 100000.0 - - optimize_memory_usage - false - - policy - CnnPolicy - - target_update_interval - 1000 - - train_freq - 4123version https://git-lfs.github.com/spec/v1oid sha256:21c3cfe7334f0259c43ed6fa06268fac1ad7272fb6a19dd53b4f6bd805b78d2dsize 1371332512.0.0123version https://git-lfs.github.com/spec/v1oid sha256:0b69a6cb94f8a9599ea4291f66c0618fbf541f7509cd0bdc82e64322acea359bsize 687123version https://git-lfs.github.com/spec/v1oid sha256:e1ccaa6da27d1789c46c5d211944710b50e4613dcc1c5618a785e5303e1ec6desize 13504937123version https://git-lfs.github.com/spec/v1oid sha256:d030ad8db708280fcae77d87e973102039acd23a11bdecc3db8eb6c0ac940ee1size 431123456789- OS: Linux-5.15.107+-x86_64-with-glibc2.31 # 1 SMP Sat Apr 29 09:15:28 UTC 2023- Python: 3.10.12- Stable-Baselines3: 2.0.0- PyTorch: 2.0.1+cu118- GPU Enabled: True- Numpy: 1.22.4- Cloudpickle: 2.2.1- Gymnasium: 0.28.1- OpenAI Gym: 0.26.21render_mode: rgb_array123version https://git-lfs.github.com/spec/v1oid sha256:61d829c0dd94b8b8116d5df0769a3ba9aa98c617628ce2a6f2a2b875652341f0size 2940511{"mean_reward": 5.0, "std_reward": 7.0710678118654755, "is_deterministic": false, "n_eval_episodes": 10, "eval_datetime": "2023-06-26T14:09:46.081207"}123version https://git-lfs.github.com/spec/v1oid sha256:185084dbd819573f9b824bdc44bab318608581b147b05f12afc6a1f0ae952832size 5836.gitattributes+1
README.mdAdded+86
args.ymlAdded+81
config.ymlAdded+29
dqn-SpaceInvadersNoFrameskip-v4.zipAdded+3
dqn-SpaceInvadersNoFrameskip-v4/_stable_baselines3_versionAdded+1
dqn-SpaceInvadersNoFrameskip-v4/dataAdded
dqn-SpaceInvadersNoFrameskip-v4/policy.optimizer.pthAdded+3
dqn-SpaceInvadersNoFrameskip-v4/policy.pthAdded+3
dqn-SpaceInvadersNoFrameskip-v4/pytorch_variables.pthAdded+3
dqn-SpaceInvadersNoFrameskip-v4/system_info.txtAdded+9
env_kwargs.ymlAdded+1
replay.mp4Added+3
results.jsonAdded+1
train_eval_metrics.zipAdded+3