-
Notifications
You must be signed in to change notification settings - Fork 2
/
moco_exp.nf
60 lines (44 loc) · 1.32 KB
/
moco_exp.nf
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
55
56
57
58
59
60
include { extraction; manual; add_padding_mask } from './src/nf/manual_feat'
include { ssl_moco; ssl_bt } from './src/nf/self_supervised'
include { Evaluation } from './src/nf/evaluation'
// data
// dataset = Channel.from([file("./data/tnbc"), file("./data/consep"), file("./data/pannuke")])
dataset = Channel.from([file("./data/tnbc")])
// parameters
LR = [0.0001, 0.001, 0.01]
WD = [0, 1e-4, 1.0]
MB = [4096, 16384, 65536]
KS = [3, 5]
LR = [0.001]
WD = [0]
MB = [4096, 65536]
KS = [3]
models = ["ModelSRN"]
opt = ["--no_size"]
BS_RANGE = [128, 512, 1024]
number_bs = 0..2
epochs = [ "tnbc": 100, "consep": 100]
bs = [ "tnbc": BS_RANGE, "consep": BS_RANGE]
repetition = 2
moco_exp = file("src/python/moco_plot.py")
process plot {
publishDir "paper_output/", mode: 'symlink'
input:
path(TESTING_TABLE)
path(TRAINING_TABLE)
output:
path("moco_experiments.csv")
script:
"""
python $moco_exp $TESTING_TABLE
"""
}
workflow {
main:
extraction(dataset)
ext = extraction.out
ssl_moco(ext, models, opt, 1..repetition, LR, WD, MB, KS, epochs, bs, number_bs)
Evaluation(ssl_moco.out[0])
plot(Evaluation.out.collectFile(skip: 1, keepHeader: true).collect(),
ssl_moco.out[1].collectFile(skip: 1, keepHeader: true).collect())
}