diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-02 16:21:01 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-02 16:21:01 +0200 |
| commit | 4238c545b27a0c99e1e29a59ec2b16fa28f1a4a2 (patch) | |
| tree | e612cf89e023425ef9dbe47ae3d8a81ae63033dc /app/client/modules/samplernn/samplernn.actions.js | |
| parent | b700116b56fa58ad23f6bc2c351bf8ab5b294adc (diff) | |
whmmm
Diffstat (limited to 'app/client/modules/samplernn/samplernn.actions.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.actions.js | 13 |
1 files changed, 11 insertions, 2 deletions
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({ |
