Skip to content

Commit

Permalink
update recorder plots
Browse files Browse the repository at this point in the history
  • Loading branch information
hma02 committed Aug 8, 2017
1 parent 2826bde commit 56e93ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions show/show_inforec.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import yaml

loadpath_base = '../examples/inforec'
loadpath_base = 'inforec/'
import glob
loadpaths = sorted(glob.glob(loadpath_base+'/inforec.pkl'))

Expand All @@ -16,7 +16,7 @@
config={}
config['comm']=comm
config['printFreq']=40,
config['modelname']='AlexNet'
config['modelname']='ResNet50'
config['verbose']=True

from theanompi.lib.recorder import Recorder
Expand Down
28 changes: 16 additions & 12 deletions show/show_inforecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,41 @@
#############
# load data #
#############
loadpath_base = 'inforec_test/'
loadpath_base = 'inforec/'
import glob
loadpaths = sorted(glob.glob(loadpath_base+'*.pkl'))

labels = ['_'+l.split('/',1)[-1].split('_',1)[-1].split('.',1)[0] for l in loadpaths]
print loadpaths
print labels


def load(path,loadpath):

with open(path, 'r') as f:
config = yaml.load(f)
config['verbose'] = False

sys.path.append('../lib/')
def load(loadpath, config):

from base.recorder import Recorder
from theanompi.lib.recorder import Recorder

recorder = Recorder(config)
recorder = Recorder(**config)

recorder.load(filepath = loadpath)
recorder.load(loadpath)

return recorder

if __name__ == '__main__' :

from mpi4py import MPI
comm=MPI.COMM_WORLD

recorders = []

for i in range(len(loadpaths)):

recorders.append(load(path = '../run/config.yaml',loadpath = loadpaths[i]))
config={}
config['comm']=comm
config['printFreq']=40,
config['modelname']='ResNet50'
config['verbose']=True

recorders.append(load(loadpaths[i], config))

if i != len(loadpaths)-1:
recorders[i].show(label=labels[i], color_id = i, show=False)
Expand Down

0 comments on commit 56e93ae

Please sign in to comment.