summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js340
1 files changed, 179 insertions, 161 deletions
diff --git a/public/bundle.js b/public/bundle.js
index 5731e45..b1d32af 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -3129,7 +3129,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;
+exports.TaskList = exports.CurrentTask = exports.Checkbox = exports.Button = exports.SelectGroup = exports.Select = exports.Slider = exports.NumberInput = exports.TextInput = exports.Param = exports.ParamGroup = exports.Group = exports.Player = exports.Gallery = exports.FileUpload = exports.FileRow = exports.FileList = exports.FolderList = exports.Header = exports.Progress = exports.Loading = exports.Views = undefined;
var _button = __webpack_require__(/*! ./button.component */ "./app/client/common/button.component.js");
@@ -3205,6 +3205,10 @@ var _textInput = __webpack_require__(/*! ./textInput.component */ "./app/client/
var _textInput2 = _interopRequireDefault(_textInput);
+var _taskList = __webpack_require__(/*! ./taskList.component */ "./app/client/common/taskList.component.js");
+
+var _taskList2 = _interopRequireDefault(_taskList);
+
var _views = __webpack_require__(/*! ./views */ "./app/client/common/views/index.js");
var Views = _interopRequireWildcard(_views);
@@ -3234,6 +3238,7 @@ exports.SelectGroup = _selectGroup2.default;
exports.Button = _button2.default;
exports.Checkbox = _checkbox2.default;
exports.CurrentTask = _currentTask2.default;
+exports.TaskList = _taskList2.default;
/***/ }),
@@ -3320,7 +3325,7 @@ var NumberInput = function (_Component) {
changed: true
});
this.props.onInput && this.props.onInput(e.target.value, e.target.name);
- this.props.onChange && this.props.onInput(e.target.name, e.target.value);
+ this.props.onChange && this.props.onChange(e.target.name, e.target.value);
}
}, {
key: 'handleKeydown',
@@ -4050,6 +4055,151 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
/***/ }),
+/***/ "./app/client/common/taskList.component.js":
+/*!*************************************************!*\
+ !*** ./app/client/common/taskList.component.js ***!
+ \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
+
+var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
+
+var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
+
+var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
+
+var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
+
+var _util2 = _interopRequireDefault(_util);
+
+var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
+
+var _actions2 = _interopRequireDefault(_actions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+var TaskList = function (_Component) {
+ _inherits(TaskList, _Component);
+
+ function TaskList(props) {
+ _classCallCheck(this, TaskList);
+
+ return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));
+ }
+
+ _createClass(TaskList, [{
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
+
+ var _props = this.props,
+ title = _props.title,
+ tasks = _props.tasks;
+
+ var time = 0;
+
+ var _util$sort$orderByFn = _util2.default.sort.orderByFn(this.props.sort || 'date desc'),
+ mapFn = _util$sort$orderByFn.mapFn,
+ sortFn = _util$sort$orderByFn.sortFn;
+
+ var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {
+ var task = pair[1];
+ var dataset = task.dataset;
+
+ var dataset_link = void 0;
+ if (task.folder_id) {
+ var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';
+ dataset_link = (0, _preact.h)(
+ _reactRouterDom.Link,
+ { to: href },
+ dataset
+ );
+ } else {
+ dataset_link = dataset;
+ }
+ return (0, _preact.h)(
+ 'div',
+ { 'class': 'row' },
+ (0, _preact.h)(
+ 'div',
+ { 'class': 'activity' },
+ task.activity,
+ ' ',
+ task.module
+ ),
+ (0, _preact.h)(
+ 'div',
+ { 'class': 'dataset' },
+ dataset_link
+ ),
+ (0, _preact.h)(
+ 'div',
+ { className: "age " + _util2.default.carbon_date(task.updated_at) },
+ _util2.default.get_age(task.updated_at)
+ ),
+ (0, _preact.h)(
+ 'div',
+ { 'class': 'options' },
+ (0, _preact.h)(
+ 'span',
+ { 'class': 'destroy', onClick: function onClick() {
+ return _this2.handleDestroy(task);
+ } },
+ 'x'
+ )
+ )
+ );
+ });
+ return (0, _preact.h)(
+ 'div',
+ { 'class': 'tasklist rows' },
+ taskList
+ );
+ }
+ }, {
+ key: 'handleDestroy',
+ value: function handleDestroy(task) {
+ var yes = confirm('Are you sure you want to delete this task?');
+ if (yes) {
+ _actions2.default.task.destroy(task);
+ }
+ }
+ }]);
+
+ return TaskList;
+}(_preact.Component);
+
+var mapStateToProps = function mapStateToProps(state) {
+ return {};
+};
+
+var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
+ return {
+ // actions: bindActionCreators(liveActions, dispatch)
+ };
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);
+
+/***/ }),
+
/***/ "./app/client/common/textInput.component.js":
/*!**************************************************!*\
!*** ./app/client/common/textInput.component.js ***!
@@ -4414,16 +4564,8 @@ var _dashboardheader = __webpack_require__(/*! ./dashboardheader.component */ ".
var _dashboardheader2 = _interopRequireDefault(_dashboardheader);
-var _tasklist = __webpack_require__(/*! ./tasklist.component */ "./app/client/dashboard/tasklist.component.js");
-
-var _tasklist2 = _interopRequireDefault(_tasklist);
-
var _common = __webpack_require__(/*! ../common */ "./app/client/common/index.js");
-var _gallery = __webpack_require__(/*! ../common/gallery.component */ "./app/client/common/gallery.component.js");
-
-var _gallery2 = _interopRequireDefault(_gallery);
-
var _dashboard = __webpack_require__(/*! ./dashboard.actions */ "./app/client/dashboard/dashboard.actions.js");
var dashboardActions = _interopRequireWildcard(_dashboard);
@@ -4555,14 +4697,14 @@ var Dashboard = function (_Component) {
!!queue.queue.length && (0, _preact.h)(
_group2.default,
{ title: 'Upcoming Tasks' },
- (0, _preact.h)(_tasklist2.default, { tasks: queue.queue.map(function (id) {
+ (0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {
return tasks[id];
}) })
),
!!queue.completed.length && (0, _preact.h)(
_group2.default,
{ title: 'Completed Tasks' },
- (0, _preact.h)(_tasklist2.default, { tasks: queue.completed.map(function (id) {
+ (0, _preact.h)(_common.TaskList, { tasks: queue.completed.map(function (id) {
return tasks[id];
}) })
)
@@ -4825,151 +4967,6 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
/***/ }),
-/***/ "./app/client/dashboard/tasklist.component.js":
-/*!****************************************************!*\
- !*** ./app/client/dashboard/tasklist.component.js ***!
- \****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _preact = __webpack_require__(/*! preact */ "./node_modules/preact/dist/preact.esm.js");
-
-var _redux = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js");
-
-var _reactRedux = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js");
-
-var _reactRouterDom = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router-dom/es/index.js");
-
-var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js");
-
-var _util2 = _interopRequireDefault(_util);
-
-var _actions = __webpack_require__(/*! ../actions */ "./app/client/actions.js");
-
-var _actions2 = _interopRequireDefault(_actions);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var TaskList = function (_Component) {
- _inherits(TaskList, _Component);
-
- function TaskList(props) {
- _classCallCheck(this, TaskList);
-
- return _possibleConstructorReturn(this, (TaskList.__proto__ || Object.getPrototypeOf(TaskList)).call(this));
- }
-
- _createClass(TaskList, [{
- key: 'render',
- value: function render() {
- var _this2 = this;
-
- var _props = this.props,
- title = _props.title,
- tasks = _props.tasks;
-
- var time = 0;
-
- var _util$sort$orderByFn = _util2.default.sort.orderByFn('date desc'),
- mapFn = _util$sort$orderByFn.mapFn,
- sortFn = _util$sort$orderByFn.sortFn;
-
- var taskList = tasks.map(mapFn).sort(sortFn).map(function (pair) {
- var task = pair[1];
- var dataset = task.dataset;
-
- var dataset_link = void 0;
- if (task.folder_id) {
- var href = '/' + task.module + '/' + (task.module === 'samplernn' ? 'datasets' : 'sequences') + '/' + task.folder_id + '/';
- dataset_link = (0, _preact.h)(
- _reactRouterDom.Link,
- { to: href },
- dataset
- );
- } else {
- dataset_link = dataset;
- }
- return (0, _preact.h)(
- 'div',
- { 'class': 'row' },
- (0, _preact.h)(
- 'div',
- { 'class': 'activity' },
- task.activity,
- ' ',
- task.module
- ),
- (0, _preact.h)(
- 'div',
- { 'class': 'dataset' },
- dataset_link
- ),
- (0, _preact.h)(
- 'div',
- { className: "age " + _util2.default.carbon_date(task.updated_at) },
- _util2.default.get_age(task.updated_at)
- ),
- (0, _preact.h)(
- 'div',
- { 'class': 'options' },
- (0, _preact.h)(
- 'span',
- { 'class': 'destroy', onClick: function onClick() {
- return _this2.handleDestroy(task);
- } },
- 'x'
- )
- )
- );
- });
- return (0, _preact.h)(
- 'div',
- { 'class': 'tasklist rows' },
- taskList
- );
- }
- }, {
- key: 'handleDestroy',
- value: function handleDestroy(task) {
- var yes = confirm('Are you sure you want to delete this task?');
- if (yes) {
- _actions2.default.task.destroy(task);
- }
- }
- }]);
-
- return TaskList;
-}(_preact.Component);
-
-var mapStateToProps = function mapStateToProps(state) {
- return {};
-};
-
-var mapDispatchToProps = function mapDispatchToProps(dispatch, ownProps) {
- return {
- // actions: bindActionCreators(liveActions, dispatch)
- };
-};
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(TaskList);
-
-/***/ }),
-
/***/ "./app/client/dataset/dataset.actions.js":
/*!***********************************************!*\
!*** ./app/client/dataset/dataset.actions.js ***!
@@ -9627,13 +9624,17 @@ var train_task = exports.train_task = function train_task(dataset, folder_id) {
var task = {
module: _pix2pixhd2.default.name,
activity: 'train',
- dataset: dataset.name,
+ dataset: dataset.name || dataset,
epoch: 0,
epochs: epochs,
opt: {
folder_id: folder_id
}
};
+ if (!task.dataset) {
+ console.error("train task: no dataset specified");
+ return;
+ }
console.log(task);
return _actions2.default.queue.add_task(task);
};
@@ -10976,6 +10977,11 @@ var Pix2PixHDTrain = function (_Component) {
this.setState(_defineProperty({}, name, value));
}
}, {
+ key: 'interrupt',
+ value: function interrupt() {
+ this.props.actions.queue.stop_task('gpu');
+ }
+ }, {
key: 'render',
value: function render() {
var _this2 = this;
@@ -11018,9 +11024,9 @@ var Pix2PixHDTrain = function (_Component) {
return a.name.localeCompare(b.name);
});
- console.log('state', this.props.pix2pixhd.data.epochs);
+ // console.log('state', this.props.pix2pixhd.data.epochs)
// console.log(this.state.checkpoint_name, this.state.epoch)
-
+ console.log(queue);
return (0, _preact.h)(
'div',
{ className: 'app pix2pixhd' },
@@ -11107,6 +11113,17 @@ var Pix2PixHDTrain = function (_Component) {
return _this2.props.remote.clear_recursive_task(_this2.state.checkpoint_name);
}
})
+ ),
+ (0, _preact.h)(
+ _common.Group,
+ { title: 'Status' },
+ (0, _preact.h)(_common.Button, {
+ title: 'GPU',
+ value: this.props.runner.gpu.status === 'IDLE' ? "Idle" : "Interrupt",
+ onClick: function onClick() {
+ return _this2.interrupt();
+ }
+ })
)
),
(0, _preact.h)(
@@ -11118,7 +11135,7 @@ var Pix2PixHDTrain = function (_Component) {
{ title: 'Upcoming Tasks' },
(0, _preact.h)(_common.TaskList, { tasks: queue.queue.map(function (id) {
return queue.tasks[id];
- }) })
+ }), sort: 'date asc' })
)
)
);
@@ -11131,6 +11148,7 @@ var Pix2PixHDTrain = function (_Component) {
var mapStateToProps = function mapStateToProps(state) {
return {
pix2pixhd: state.module.pix2pixhd,
+ runner: state.system.runner,
queue: state.queue
};
};