-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathsubmit_eAE.py
More file actions
executable file
·30 lines (24 loc) · 1.03 KB
/
submit_eAE.py
File metadata and controls
executable file
·30 lines (24 loc) · 1.03 KB
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
from eAE.eAE import eAE
def main():
# Setting up the connection to interface
ip = "interfaceeae.doc.ic.ac.uk"
port = 443
eae = eAE(ip, port)
# Testing if the interface is Alive
is_alive = eae.is_eae_alive()
if is_alive != 200:
raise Exception("!!!")
# Initialize input argument for each node in the eAE cluster
args = ['--data_dir data/eeg_fpz_cz --output_dir results --n_folds 20 --fold_idx {} --pretrain_epochs 100 --finetune_epochs 200'.format(fold_idx) for fold_idx in range(20)]
# Submit a job
parameters_set = "\n".join(args)
cluster = "gpu"
computation_type = "GPU"
main_file = "train.py"
data_files = ['deepsleep', 'tensorlayer', 'data/eeg_fpz_cz']
host_ip = "host_ip_address" # IP address of the machine to run this script
ssh_port = "ssh_port" # Port for ssh
job = eae.submit_jobs(parameters_set, cluster, computation_type, main_file, data_files, host_ip, ssh_port)
print(job)
if __name__ == "__main__":
main()