You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi -- I was hoping to test out this method but I'm having some trouble getting it working unfortunately.
After creating a fresh conda (as below) I've tried running the example script but unfortunately it's throwing an error -- which I've pasted the output of below. (I changed the path /storage/zhang/mfMap.py in the source code as needed to the equivalent on my machine)
I'm not super familiar with python code so do you have any tips on how I can get this to run?
(mfmap) ###@### mfMap.py % bash run_example.sh
Number of parameters: 4705052
SUPERVISED
(1, 1)
0.001
best train acc:0
best train er:inf
best validation acc:0
Number of parameters: 4705052
SUPERVISED
(1, 1)
0.001
best train acc:0
best train er:inf
best validation acc:0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/###/git/mfMap.py/mfMAP_cpu.py", line 653, in <module>
run_train()
File "/Users/###/git/mfMap.py/mfMAP_cpu.py", line 502, in run_train
train_accuracy,train_total_loss_ave,train_classifier_er_ave=train(e_index=epoch_index, e_num=FLAGS.p1_epoch_num+FLAGS.p2_epoch_num,k_cnv_recon=c1,k_expr_recon=c1, k_kl=c1,k_hbc=c2)
File "/Users/###/git/mfMap.py/mfMAP_cpu.py", line 332, in train
for batch_index, sample in enumerate(train_loader):
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 359, in __iter__
return self._get_iterator()
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 305, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 918, in __init__
w.start()
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/Users/###/miniconda3/envs/mfmap/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
The text was updated successfully, but these errors were encountered:
Hi -- I was hoping to test out this method but I'm having some trouble getting it working unfortunately.
After creating a fresh conda (as below) I've tried running the example script but unfortunately it's throwing an error -- which I've pasted the output of below. (I changed the path
/storage/zhang/mfMap.py
in the source code as needed to the equivalent on my machine)I'm not super familiar with python code so do you have any tips on how I can get this to run?
Thanks,
Sam
The text was updated successfully, but these errors were encountered: