From ccc9f74102e4432ac8341395174b0004b1435e32 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 16 Sep 2018 16:46:37 +0200 Subject: surface sequence/dataset count... --- public/bundle.js | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'public/bundle.js') diff --git a/public/bundle.js b/public/bundle.js index 160f8f3..d8335da 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -2228,6 +2228,16 @@ var AugmentationGrid = function (_Component) { { title: 'Total added this epoch' }, this.state.sum ), + (0, _preact.h)( + _param2.default, + { title: 'Sequence length' }, + this.state.checkpoint.sequenceCount + ), + (0, _preact.h)( + _param2.default, + { title: 'Dataset size' }, + this.state.checkpoint.datasetCount + ), (0, _preact.h)( _button2.default, { onClick: function onClick() { @@ -4386,7 +4396,7 @@ var TaskList = function (_Component) { var dataset_link = void 0, label = dataset; - console.log(task); + // console.log(task) switch (task.activity) { case 'train': if (task.epoch === 0) { @@ -9514,7 +9524,7 @@ exports.default = { Object.defineProperty(exports, "__esModule", { value: true }); -exports.count_sequence_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined; +exports.count_dataset = exports.list_epochs = exports.load_results = exports.load_directories = undefined; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); @@ -9754,7 +9764,7 @@ var list_epochs = exports.list_epochs = function list_epochs(checkpoint_name) { }; }; -var count_sequence_dataset = exports.count_sequence_dataset = function count_sequence_dataset(checkpoint_name) { +var count_dataset = exports.count_dataset = function count_dataset(checkpoint_name) { return function (dispatch) { var module = _pix2pixhd2.default.name; _util2.default.allProgress([_actions2.default.socket.count_directory({ module: module, dir: 'sequences/' + checkpoint_name + '/' }), _actions2.default.socket.count_directory({ module: module, dir: 'datasets/' + checkpoint_name + '/train_A/' })], function (percent, i, n) { @@ -9772,8 +9782,9 @@ var count_sequence_dataset = exports.count_sequence_dataset = function count_seq console.log(sequenceCount, datasetCount); dispatch({ - type: _types2.default.pix2pixhd.load_results, - results: { + type: _types2.default.pix2pixhd.load_dataset_count, + data: { + name: checkpoint_name, sequenceCount: sequenceCount, datasetCount: datasetCount } @@ -9839,7 +9850,12 @@ var pix2pixhdInitialState = { error: null, folder_id: 0, data: null, - results: null + results: null, + checkpoint: { + name: '', + sequenceCount: 0, + datasetCount: 0 + } }; var pix2pixhdReducer = function pix2pixhdReducer() { @@ -9855,6 +9871,10 @@ var pix2pixhdReducer = function pix2pixhdReducer() { return _extends({}, state, { results: action.results }); + case _types2.default.pix2pixhd.load_dataset_count: + return _extends({}, state, { + checkpoint: action.data + }); case _types2.default.file.destroy: console.log('file destroy', state.results); return _extends({}, state, { @@ -11275,6 +11295,7 @@ var Pix2PixHDTrain = function (_Component) { if (prevState.checkpoint_name !== this.state.checkpoint_name) { this.setState({ epoch: 'latest' }); this.props.actions.list_epochs(this.state.checkpoint_name); + this.props.actions.count_dataset(this.state.checkpoint_name); } } }, { @@ -11415,6 +11436,7 @@ var Pix2PixHDTrain = function (_Component) { _common.Group, { title: 'Augmentation Grid' }, (0, _preact.h)(_common.AugmentationGrid, { + checkpoint: this.props.pix2pixhd.checkpoint, take: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200, 300, 400, 500, 1000], make: [1, 2, 3, 4, 5, 10, 15, 20, 25, 50, 75, 100, 200], onAugment: function onAugment(augment_take, augment_make) { @@ -16493,7 +16515,7 @@ exports.default = { // queue new checkpoint }, pix2pix: (0, _crud.with_type)('pix2pix', ['init', 'set_folder']), - pix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results']), + pix2pixhd: (0, _crud.with_type)('pix2pixhd', ['init', 'set_folder', 'load_results', 'load_dataset_count']), pix2wav: (0, _crud.with_type)('pix2wav', ['init', 'set_folder']), wav2pix: (0, _crud.with_type)('wav2pix', ['load', 'progress', 'finish', 'zip', 'uploading']), dashboard: (0, _crud.with_type)('dashboard', ['load']), -- cgit v1.2.3-70-g09d2