Skip to content
/ exppy Public

Random assorted python code from small experiments and blog posts.

Notifications You must be signed in to change notification settings

jfpettit/exppy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exppy

This repository holds code for experiments and code associated with blog posts that I write. Check out my blog here.

Files:

  1. optuna_rl.py Code from the blog post Weird RL with Hyperparameter Optimizers. Part 2 of the blog post introduces a Streamlit webapp.
  2. atari_mask.py Code from the blog post Breaking a Pong-playing RL agent.

Setup

Clone the repository and install it:

git clone https://github.com/jfpettit/exppy.git
cd exppy
pip install -e .

If you don't want to install it as a package, then you don't need to, and you can run each file individually using python file_name.py --args, provided that you've got all of the required packages installed.

Running

If you have opted to install it, then you can run things by invoking python -m:

python -m exppy.file_name

For example, print out the help message from the Optuna RL code:

python -m exppy.optuna_rl --help

Usage in files

You can import from the exppy module like a normal python package:

from exppy.atari_mask import ImageObsMask
from exppy.optuna_rl import Runner, run_policy, video_rollout
import gym

env = gym.make("BreakoutNoFrameskip-v4")
env = ImageObsMask(env)

About

Random assorted python code from small experiments and blog posts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages