Skip to content

Instantly share code, notes, and snippets.

View AdamGleave's full-sized avatar

Adam Gleave AdamGleave

View GitHub Profile
@AdamGleave
AdamGleave / sacred_config.json
Created September 24, 2019 23:12
Extract Sacred config entries
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
import collections
import json
import os
import pickle
import re
from typing import Any, Callable, Iterable, Mapping, Optional, Tuple
@AdamGleave
AdamGleave / grab_frame.py
Created September 20, 2019 11:15
Saving frame from Gym environment
"""Extract a frame from the initial state of an environment for illustration purposes.
Lets user interactively move the camera, then takes a screenshot when ready."""
import argparse
import select
import sys
import time
import gym
@AdamGleave
AdamGleave / standalone.py
Created September 11, 2019 13:11
Sacred for hyperparameter sweep
import sacred
standalone_ex = sacred.Experiment('standalone')
@standalone_ex.config
def default_config():
a = 1
b = 2