diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-16 19:05:45 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-16 19:05:45 +0200 |
| commit | 72485efe1d7e17c883beba80c7a6b65ff1dca841 (patch) | |
| tree | 1be6cdf358c43db0e27a63a719a60686287a6575 /app/client/modules/samplernn/samplernn.actions.js | |
| parent | 408086ca5fced2552461f2d00f6d4a95be7b2636 (diff) | |
deploy bundle
Diffstat (limited to 'app/client/modules/samplernn/samplernn.actions.js')
| -rw-r--r-- | app/client/modules/samplernn/samplernn.actions.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/client/modules/samplernn/samplernn.actions.js b/app/client/modules/samplernn/samplernn.actions.js index 807a3d0..3fb38cc 100644 --- a/app/client/modules/samplernn/samplernn.actions.js +++ b/app/client/modules/samplernn/samplernn.actions.js @@ -122,6 +122,22 @@ export const load_directories = (id) => (dispatch) => { }) } +export const load_graph = () => dispatch => { + util.allProgress([ + load_loss()(dispatch), + actions.socket.list_directory({ module, dir: 'results' }), + ], (percent, i, n) => { + dispatch({ type: types.app.load_progress, progress: { i, n }}) + }).then(res => { + const [lossReport, results] = res + dispatch({ + type: types.samplernn.load_graph, + lossReport, + results, + }) + }) +} + export const load_loss = () => dispatch => { return actions.socket.run_script({ module: 'samplernn', activity: 'report' }) .then(report => { |
