From 4238c545b27a0c99e1e29a59ec2b16fa28f1a4a2 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 2 Jun 2018 16:21:01 +0200 Subject: whmmm --- app/client/modules/samplernn/samplernn.actions.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/client/modules/samplernn/samplernn.actions.js') diff --git a/app/client/modules/samplernn/samplernn.actions.js b/app/client/modules/samplernn/samplernn.actions.js index ced4ad5..a05f363 100644 --- a/app/client/modules/samplernn/samplernn.actions.js +++ b/app/client/modules/samplernn/samplernn.actions.js @@ -69,7 +69,11 @@ export const load_directories = () => (dispatch) => { // exp:coccokit_3-frame_sizes:8,2-n_rnn:2-dataset:coccokit_3 const checkpoints = results.filter(s => s.dir).map(s => { - const checkpoint = s.name.split('-').map(s => s.split(':')).reduce((a,b) => (a[b[0]] = b[1])&&a, {}) + const checkpoint = s.name + .split('-') + .map(s => s.split(':')) + .filter(b => b.length) + .reduce((a,b) => (a[b[0]] = b[1])&&a, {}) checkpoint.dir = s const file = fileLookup[checkpoint.dataset] || fileLookup.unsorted file.checkpoints.push(checkpoint) @@ -81,7 +85,12 @@ export const load_directories = () => (dispatch) => { report.stdout.split('\n\n').filter(a=>!!a).forEach(data => { const [ name, ...lines ] = data.split('\n') const file = fileLookup[name] || fileLookup.unsorted - file.log = lines.map(s => s.split('\t')).map(s => s.split(': ')).reduce((a,b) => (a[b[0]] = b[1])&&a, {}) + file.log = lines + .map(s => s.split('\t')) + .map(s => s.split(': ') + .filter(b => b.length) + .reduce((a,b) => (a[b[0]] = b[1])&&a, {}) + ) }) dispatch({ -- cgit v1.2.3-70-g09d2