1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
import path from 'path'
const name = 'samplernn'
const cwd = process.env.SAMPLERNN_CWD || path.join(process.env.HOME, 'code/' + name + '/')
const fetch = {
type: 'perl',
script: 'get.pl',
params: (task) => {
return [ task.opt.url ]
}
}
const train = {
type: 'pytorch',
script: 'train.py',
params: (task) => {
},
onComplete: publish,
// python train.py \
// --exp $checkpoint_name --dataset $dataset_name \
// --frame_sizes 8 2 --n_rnn 2 \
// --sample_length $sample_length \
// --n_samples $n_samples \
// --keep_old_checkpoints False \
// --epoch_limit $epoch_limit \
}
const generate = {
type: 'pytorch',
script: 'generate.py',
params: (task) => {
},
onComplete: publish,
// python generate.py \
// --exp $checkpoint_name --dataset $dataset_name \
// --frame_sizes 8 2 --n_rnn 2 \
// --sample_length $sample_length \
// --n_samples $n_samples \
// --keep_old_checkpoints False \
// --epoch_limit $epoch_limit \
}
const publish = {
type: 'perl',
script: 'latest.pl',
params: (task) => {
}
}
// after train and generate, run perl latest.pl -l $checkpoint_name
export default {
name, cwd,
activities: {
fetch, train, generate,
}
}
|