From 09b4d1541e6e06563a40f8829048e4225ed8fcf9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jun 2018 16:12:38 +0200 Subject: mandatory results folder --- app/relay/modules/pix2pixhd.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'app/relay/modules/pix2pixhd.js') diff --git a/app/relay/modules/pix2pixhd.js b/app/relay/modules/pix2pixhd.js index 4c169e8..8f1db54 100644 --- a/app/relay/modules/pix2pixhd.js +++ b/app/relay/modules/pix2pixhd.js @@ -122,6 +122,32 @@ const live = { '--norm', 'batch', ] }, + listen: (task, res, i) => { + // relay the new dataset name from youtube-dl or w/e + const lines = res.split('\n') + for (let line of lines) { + console.log(line) + if ( line.match(/^rename result: /) ) { + let tag = line.split(': ')[1].trim() + task.dataset = tag + console.log(">>>>>> created dataset", tag) + return { type: 'progress', action: 'resolve_dataset', task } + } + } + return null + }, + after: 'render', +} +const render = { + type: 'perl', + script: 'dir-to-movie.pl', + params: (task) => { + return [ + '--tag', task.dataset, + '--module', task.module, + '--endpoint', process.env.API_REMOTE + '/api/folder/' + task.opt.folder_id + '/upload/', + ] + } } export default { @@ -132,5 +158,6 @@ export default { train, generate, live, + render, } } -- cgit v1.2.3-70-g09d2 From 59253e7a74399917de945bef200e3faa8aca73ce Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jun 2018 17:53:34 +0200 Subject: fetching --- app/relay/modules/pix2pixhd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/relay/modules/pix2pixhd.js') diff --git a/app/relay/modules/pix2pixhd.js b/app/relay/modules/pix2pixhd.js index 8f1db54..02431e5 100644 --- a/app/relay/modules/pix2pixhd.js +++ b/app/relay/modules/pix2pixhd.js @@ -127,10 +127,10 @@ const live = { const lines = res.split('\n') for (let line of lines) { console.log(line) - if ( line.match(/^rename result: /) ) { + if ( line.match(/^final result: /) ) { let tag = line.split(': ')[1].trim() task.dataset = tag - console.log(">>>>>> created dataset", tag) + console.log(">>>>>> recording live to", tag) return { type: 'progress', action: 'resolve_dataset', task } } } -- cgit v1.2.3-70-g09d2