SyntaxError while running saturn_multiple_seeds.py
vishnums007 opened this issue · 2 comments
Hi,
I am trying to run multiple seeds on my SATURN intergated data using saturn_multiple_seeds.py.
Following is my command line code:
!python3 SATURN/saturn_multiple_seeds.py
--run=data/mouse_zebrafish_run_multi.csv
--embedding_model=ESM2
--gpus 1
--seeds=10 --pe_sim_penalty=0.2
However, I am getting the following syntax error:
['1']
0%| | 0/10 [00:00<?, ?it/s]RUNNING SEED: 0 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 1 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 2 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 3 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 4 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 5 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 6 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 7 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
80%|███████████████████████████████████▏ | 8/10 [00:00<00:00, 72.00it/s]RUNNING SEED: 8 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
RUNNING SEED: 9 ON GPU:1
File "train-saturn.py", line 108
key = f"{indices_mapped[0][j]},{indices_mapped[1][j]},{indices_mapped[2][j]}"
^
SyntaxError: invalid syntax
100%|███████████████████████████████████████████| 10/10 [00:00<00:00, 72.42it/s]
I cannot figure out what I am doing wrong. Could you please help me? Full analysis notebook can be found here
Thanking you in advance,
Vishnu
I had both python2 and python3 installed. So, I had to change the line 60 in saturn_multiple_seeds.py from
command_part_1 = f"python /DATAFILES/Cross_species/SATURN/train-saturn.py --in_data={args.run} --device_num="
to
command_part_1 = f"python3 /DATAFILES/Cross_species/SATURN/train-saturn.py --in_data={args.run} --device_num="
Everything works fine now.