From 458663d008e0447f3db0f3a1d3f8750cccc8b62e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 5 Jun 2018 22:43:09 +0200 Subject: pix2pix datasets in full effect --- app/client/modules/pix2pix/pix2pix.reducer.js | 31 ++++++--------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'app/client/modules/pix2pix/pix2pix.reducer.js') diff --git a/app/client/modules/pix2pix/pix2pix.reducer.js b/app/client/modules/pix2pix/pix2pix.reducer.js index fbd38d1..10135a5 100644 --- a/app/client/modules/pix2pix/pix2pix.reducer.js +++ b/app/client/modules/pix2pix/pix2pix.reducer.js @@ -1,39 +1,20 @@ import types from '../../types' +import datasetReducer from '../../dataset/dataset.reducer' const pix2pixInitialState = { loading: true, + progress: { i: 0, n: 0 }, error: null, - folders: [], folder_id: 0, data: null, - lossReport: null, } const pix2pixReducer = (state = pix2pixInitialState, action) => { - // console.log(action.type) - switch(action.type) { - case types.pix2pix.init: - return { - ...state, - loading: false, - data: action.data, - } - - case types.socket.connect: - return { - ...state, - } - - case types.task.task_begin: - return { - ...state, - } - - case types.task.task_finish: - return { - ...state, - } + if (action.data && action.data.module === 'pix2pix') { + state = datasetReducer(state, action) + } + switch (action.type) { default: return state } -- cgit v1.2.3-70-g09d2