From 71f3bffcd69b5aad4319b1362cf35c8efd51bc10 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 18:36:36 +0200 Subject: wooooord --- app/client/live/reducer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/client/live/reducer.js') diff --git a/app/client/live/reducer.js b/app/client/live/reducer.js index e14a039..f774d3e 100644 --- a/app/client/live/reducer.js +++ b/app/client/live/reducer.js @@ -37,13 +37,16 @@ const liveReducer = (state = liveInitialState, action) => { return { ...state, checkpoints: action.checkpoints, + epochs: [], } - case 'LIST_CHECKPOINT_DIR': + case 'LIST_EPOCHS': return { ...state, - checkpoint_dir: action.checkpoint_dir, - } + epochs: action.epochs.map(a => [ a == 'latest' ? Infinity : a, a ]) + .sort((a,b) => a[0] - b[0]) + .map(a => a[1]) + } case 'LIST_SEQUENCES': return { -- cgit v1.2.3-70-g09d2