Skip to content

multigpu analyzer changes the system start_method #6345

Closed

Description

@wyli

Describe the bug

set_start_method("forkserver", force=True)

introduces issues such as:

======================================================================
ERROR: test_values (tests.test_csv_iterable_dataset.TestCSVIterableDataset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/MONAI/MONAI/tests/test_csv_iterable_dataset.py", line 202, in test_values
    for item in dataloader:
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 442, in __iter__
    return self._get_iterator()
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 388, in _get_iterator
    return _MultiProcessingDataLoaderIter(self)
  File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1043, in __init__
    w.start()
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/opt/conda/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/opt/conda/lib/python3.8/multiprocessing/context.py", line 291, in _Popen
    return Popen(process_obj)
  File "/opt/conda/lib/python3.8/multiprocessing/popen_forkserver.py", line 35, in __init__
    super().__init__(process_obj)
  File "/opt/conda/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/opt/conda/lib/python3.8/multiprocessing/popen_forkserver.py", line 47, in _launch
    reduction.dump(process_obj, buf)
  File "/opt/conda/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object '_make_date_converter.<locals>.converter'

cc @heyufan1995 @myron @mingxin-zheng

Activity

  1. added
    bugSomething isn't working
    on Apr 12, 2023
  2. self-assigned this
    on Apr 12, 2023
  3. added a commit that references this issue on Apr 12, 2023
    f7ad2d7
  4. wyli commented on Apr 12, 2023

    @wyli
    ContributorAuthor

    fixing this with f7ad2d7

  5. added a commit that references this issue on Apr 15, 2024
    6b7b1e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions