Skip to content

Instantly share code, notes, and snippets.

View wilbown's full-sized avatar

Wil Bown wilbown

View GitHub Profile
@wilbown
wilbown / data_env.py
Created October 28, 2023 14:33
Simple prediction of data environment for https://github.com/PufferAI
import numpy as np
import gym
from gym.spaces import Box, Discrete, Dict, Tuple
import pufferlib
import pufferlib.emulation
import pufferlib.utils
@wilbown
wilbown / agent_test.py
Created October 28, 2023 14:27
Agent (Policy) test for https://github.com/PufferAI using llama.cpp instead of PyTorch
import numpy as np
import pufferlib.models
import pufferlib.vectorization
import pufferlib.frameworks.cleanrl
import pufferlib.registry.data_env
# import torch
# from torch import nn
@wilbown
wilbown / snr_lr_schedule.py
Created October 23, 2023 13:49
Learning rate schedule (0.0 to 1.0) based on the "signal to noise" of a metric like the current loss.
import numpy as np
class SNR_LR_Schedule:
def __init__(self, beta1=0.99, beta2=0.99, epsilon=1e-16):
self.beta1 = np.float64(beta1)
self.beta2 = np.float64(beta2)
self.epsilon = np.float64(epsilon)
self.var_ma = np.float64(0)
self.var_ema = np.float64(0)
self.var_iter = np.float64(0)
@wilbown
wilbown / keybase.md
Created August 12, 2017 01:49
Keybase Proof of Identity

Keybase proof

I hereby claim:

  • I am wilbown on github.
  • I am wilbown (https://keybase.io/wilbown) on keybase.
  • I have a public key ASBTvg8v40HMFhG1m0RU4qrCxyXEg8UZcniCIKKmxazsfAo

To claim this, I am signing this object: