AugmentariumLab / omnisyn

OmniSyn: Synthesizing 360 Videos with Wide-baseline Panoramas (VRW 2022)
https://augmentariumlab.github.io/omnisyn/
13 stars 2 forks source link

num_workers setting for Omnisyn. #8

Closed EchoTHChen closed 2 years ago

EchoTHChen commented 2 years ago

When I want to set num_workers=8(non-zero value), the data cannot be loaded from the dataloader from mhabitat. And it reported the following error:

File "/home/chenzheng/nas/PanoNVS/spherical_magnet/data_readers/habitat_data.py", line 475, in __getitem__
    self.__restart__()
  File "/home/chenzheng/nas/PanoNVS/spherical_magnet/data_readers/habitat_data.py", line 394, in __restart__
    use_rand=self.use_rand
  File "/home/chenzheng/nas/PanoNVS/spherical_magnet/data_readers/create_rgb_dataset.py", line 198, in __init__
    multiprocessing_start_method="forkserver",
  File "/home/chenzheng/nas/PanoNVS/spherical_magnet/data_readers/mhabitat/vector_env.py", line 109, in __init__
    env_fn_args, make_env_fn
  File "/home/chenzheng/nas/PanoNVS/spherical_magnet/data_readers/mhabitat/vector_env.py", line 243, in _spawn_workers
    ps.start()
  File "/mnt/data1/chenzheng/anaconda3/envs/smagnet/lib/python3.7/multiprocessing/process.py", line 110, in start
    'daemonic processes are not allowed to have children'
AssertionError: daemonic processes are not allowed to have children

If the num_worker=0, the GPU utilization ratio is less than 50%, which is a little low for me. Do you how to resolve the issue? Thanks!

dli7319 commented 2 years ago

Sorry but I don't know why this happens. The code for generating matterport images is forked from SynSin where they also only use 0 workers. I'm not very familiar with how habitat works under the hood.

EchoTHChen commented 2 years ago

Thanks!

EchoTHChen commented 2 years ago

I succeed to use multiprocessing by replacing all the multiprocessing with billiard in data_readers/mhabitat/vector_env.py.