This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const assert = require('assert'); | |
const fs = require('fs'); | |
const stream = require('stream'); | |
const _ = require('lodash'); | |
const fastCsv = require('fast-csv'); | |
const { metrohash64 } = require('metrohash'); | |
const { | |
Bool, Utf8, Int32, Int64, Float32, Float64, Struct, Dictionary, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import datetime | |
import itertools | |
import os | |
import numpy as np | |
import ray | |
from ray import tune | |
import tensorflow as tf | |
import tree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from experiments import load_results | |
TASKS = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE(hartikainen): Might want to check that the working tree is clean. | |
commit_sha="$(cat ./name_rev.txt | awk -F' ' '{print $1}')" | |
git checkout "${commit_sha}" | |
echo "Applying patch: $(cat ./patch.diff)" | |
git apply patch.diff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import tensorflow as tf | |
from ray import tune | |
class ExperimentRunner(tune.Trainable): | |
def _setup(self, variant): | |
self.timestep = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
class TestModule(tf.Module): | |
def __init__(self, value): | |
self.variable = tf.Variable(value) | |
module_1 = TestModule(value=9000) | |
tf.saved_model.save(module_1, "./foo") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import tensorflow_probability as tfp | |
from softlearning.utils.tensorflow import nest | |
@tf.function(experimental_relax_shapes=True) | |
def another_test_function(inputs): | |
outputs = {'old': inputs, 'new': inputs + 100} | |
return outputs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gym | |
import tensorflow as tf | |
from sklearn import preprocessing | |
from softlearning.utils.tensorflow import cast_and_concat | |
feature_fn = preprocessing.PolynomialFeatures(2) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
class TestModule(tf.Module): | |
def __init__(self, model): | |
self.model = model | |
x = tf.keras.layers.Input((3, )) | |
y = tf.keras.layers.Dense(5)(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
class TestModule(tf.Module): | |
def __init__(self, value, model): | |
self.value = value | |
self.model = model | |
def main(): |
NewerOlder