Reinforcement Learning
stable-baselines3
TensorBoard
dqn
Reinforcement Learning
Atari
Pac-Man
Eval Results (legacy)
Instructions to use ledmands/ALE-Pacman-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use ledmands/ALE-Pacman-v5 with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="ledmands/ALE-Pacman-v5", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Download get_config.py from ledmands/ALE-Pacman-v5: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/ledmands/ALE-Pacman-v5/resolve/main/get_config.py
- Command line
-
hf download hf://ledmands/ALE-Pacman-v5/get_config.py
-
curl -L -o get_config.py https://huggingface.co/ledmands/ALE-Pacman-v5/resolve/main/get_config.py
1.05 kB
| import zipfile | |
| import json | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("-f", "--filepath", help="Specify a filepath to an agent's zip file, .zip extension required.", type=str, required=True) | |
| parser.add_argument("-s", "--savefile", help="Specify a name and location for the saved configuration file. Will be saved in .json format.", default="config") | |
| args = parser.parse_args() | |
| filepath = args.filepath | |
| savefile = args.savefile | |
| archive = zipfile.ZipFile(filepath, "r") | |
| file = archive.open("data") | |
| json_file = json.loads(file.read().decode("utf-8")) | |
| # Only want to remove serialized objects from dictionary | |
| val_to_remove = ":serialized:" | |
| for key in json_file.keys(): | |
| # So if each value is a type dict, then I want to iterate through it and remove the serialized key | |
| if type(json_file[key]) is dict: | |
| if val_to_remove in json_file[key].keys(): | |
| json_file[key].pop(val_to_remove) | |
| with open(f"{savefile}.json", "w") as outfile: | |
| outfile.write(json.dumps(json_file, indent=2)) | |
| file.close() | |