Skip to content

Commit

Permalink
Renames to boardlaw
Browse files Browse the repository at this point in the history
  • Loading branch information
andyljones committed Dec 19, 2020
1 parent d6b09e2 commit 4927f37
Show file tree
Hide file tree
Showing 37 changed files with 11 additions and 12 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion scalinglaws/analysis.py → boardlaw/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def record(world, agents, N=0, **kwargs):

def demo_record():
from rebar import storing
from scalinglaws import worldfunc, agentfunc, mohex, analysis
from boardlaw import worldfunc, agentfunc, mohex, analysis

n_envs = 16
world = worldfunc(n_envs)
Expand Down
6 changes: 3 additions & 3 deletions scalinglaws/arena/__init__.py → boardlaw/arena/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ def monitor(*args, **kwargs):
p.terminate()

def demo():
from scalinglaws import worldfunc, agentfunc
from boardlaw import worldfunc, agentfunc
from rebar import paths
paths.clear('test')
arena('test', worldfunc, agentfunc, ref_runs=['2020-11-27 19-40-27 az-test'])

def fill_matchups(run_name=-1, device='cuda'):
from scalinglaws import worldfunc, agentfunc
from scalinglaws.arena import matchups, periodic_agents, database, log
from boardlaw import worldfunc, agentfunc
from boardlaw.arena import matchups, periodic_agents, database, log

run_name = paths.resolve(run_name)
agents = periodic_agents(run_name, agentfunc, device=device)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def evaluate(worlds, agents):
return results

def test():
from scalinglaws.validation import WinnerLoser, RandomAgent
from boardlaw.validation import WinnerLoser, RandomAgent

worlds = WinnerLoser.initial(4, device='cpu')
results = evaluate(worlds, {'one': RandomAgent(), 'two': RandomAgent()})
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scalinglaws/arena/plot.py → boardlaw/arena/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def heatmap(run_name=-1, drop=[]):

def nontransitivities(run_name=-1):
import seaborn as sns
from scalinglaws.arena import database
from boardlaw.arena import database
w, n = database.symmetric_wins(run_name), database.symmetric_games(run_name)
r = w/n
e = (r*(1-r)/n)**.5
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scalinglaws/main.py → boardlaw/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def monitor(run_name=-1):
time.sleep(1)

def demo(run_name=-1):
from scalinglaws import mohex
from boardlaw import mohex

n_envs = 4
world = worldfunc(n_envs, device='cuda:1')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ def sync(source, dest, workers=4):
with b2.SyncReport(sys.stdout, False) as reporter:
syncer.sync_folders(
source_folder=b2.parse_sync_folder(source, api()),
dest_folder=b2.parse_sync_folder(f'b2://alj-drones/{dest}', api()),
dest_folder=b2.parse_sync_folder(f'b2://boardlaw/{dest}', api()),
now_millis=int(round(time.time() * 1000)),
reporter=reporter
)

def sync_traces():
from .common import compression
compression.compress_traces()
sync('./output/traces', 'output/traces')%
sync('./output/traces', 'output/traces')
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
python_files=
scalinglaws/*.py
boardlaw/*.py
filterwarnings=
ignore::DeprecationWarning
addopts=
Expand Down
2 changes: 1 addition & 1 deletion rebar/rebar/gradblame.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def graph(output, params={}):
return dot

def demo():
from scalinglaws.arena.vb import ELBO
from boardlaw.arena.vb import ELBO
vb = ELBO(5)

N = 5
Expand Down
1 change: 0 additions & 1 deletion rebar/rebar/storing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import torch
from scalinglaws.heads import Tensor
from time import strptime
import pandas as pd
import pickle
Expand Down

0 comments on commit 4927f37

Please sign in to comment.