diff options
Diffstat (limited to 'app/client/modules/pix2pixhd/pix2pixhd.actions.js')
| -rw-r--r-- | app/client/modules/pix2pixhd/pix2pixhd.actions.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/client/modules/pix2pixhd/pix2pixhd.actions.js b/app/client/modules/pix2pixhd/pix2pixhd.actions.js index c1cd2b1..811f913 100644 --- a/app/client/modules/pix2pixhd/pix2pixhd.actions.js +++ b/app/client/modules/pix2pixhd/pix2pixhd.actions.js @@ -200,4 +200,29 @@ export const list_epochs = (checkpoint_name) => (dispatch) => { }, }) }) +} + +export const count_sequence_dataset = (checkpoint_name) => (dispatch) => { + const module = pix2pixhdModule.name + util.allProgress([ + actions.socket.count_directory({ module, dir: 'sequences/' + checkpoint_name + '/' }), + actions.socket.count_directory({ module, dir: 'datasets/' + checkpoint_name + '/train_A/' }), + ], (percent, i, n) => { + console.log('pix2pixhd load progress', i, n) + dispatch({ + type: types.app.load_progress, + progress: { i, n }, + data: { module: 'pix2pixhd' }, + }) + }).then(res => { + const [sequenceCount, datasetCount] = res //, datasets, results, output, datasetUsage, lossReport] = res + console.log(sequenceCount, datasetCount) + dispatch({ + type: types.pix2pixhd.load_results, + results: { + sequenceCount, + datasetCount, + } + }) + }) }
\ No newline at end of file |
