forked from hassonlab/247-pickling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (52 loc) · 1.43 KB
/
Makefile
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
61
62
63
64
65
66
CMD := echo
CMD := python
CMD := sbatch submit1.sh
# For 625
CONV_IDS = $(shell seq 1 54)
# For 676
CONV_IDS = $(shell seq 1 79)
EMB_TYPE := glove50
EMB_TYPE := bert
EMB_TYPE := gpt2
SID := 625
SID := 676
# a very large number for MEL will extract all common...
# ...electrodes across all conversations
MEL := 500
MINF := 30
HIST := --history
CNXT_LEN := 1024
link-data:
# delete bad symlinks
find data/ -xtype l -delete
# create symlinks from original data store
ln -sf /projects/HASSON/247/data/conversations-car/* data/
download-pickles:
mkdir -p results/{625,676}
gsutil -m rsync -x "^(?!.*625).*" gs://247-podcast-data/247_pickles/ results/625/
gsutil -m rsync -x "^(?!.*676).*" gs://247-podcast-data/247_pickles/ results/676/
create-pickle: link-data
mkdir -p logs
$(CMD) code/tfspkl_main.py \
--subject $(SID) \
--max-electrodes $(MEL) \
--vocab-min-freq $(MINF) \
--pickle;
upload-pickle: create-pickle
gsutil -m cp -r results/$(SID)/$(SID)*.pkl gs://247-podcast-data/247_pickles/
generate-embeddings: link-data
mkdir -p logs
for conv_id in $(CONV_IDS); do \
$(CMD) code/tfsemb_main.py \
--subject $(SID) \
--conversation-id $$conv_id \
--embedding-type $(EMB_TYPE) \
$(HIST) \
--context-length $(CNXT_LEN); \
done
concatenate-embeddings:
python code/tfsemb_concat.py \
--subject $(SID) \
--embedding-type $(EMB_TYPE) \
$(HIST) \
--context-length $(CNXT_LEN); \