Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Fix nested multiprocessing on import #92

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

lpsinger
Copy link
Contributor

@lpsinger lpsinger commented Mar 8, 2024

The dorado-scheduling script raised a RuntimeError error because the dorado.scheduling.mission module called astropy.utils.download_files_in_parallel on import.

The error message was:

        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

Fix this by moving the call to download_files_in_parallel inside a function that is not called on import.

Fixes #89.

@lpsinger lpsinger force-pushed the fix-broken-process-pool branch 2 times, most recently from 30f756d to 6655904 Compare March 8, 2024 03:02
The `dorado-scheduling` script raised a `RuntimeError` error
because the `dorado.scheduling.mission` module called
`astropy.utils.download_files_in_parallel` on import.

The error message was:

```
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.
```

Fix this by moving the call to `download_files_in_parallel` inside
a function that is not called on import.

Fixes nasa#89.
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 28.78%. Comparing base (2cec69d) to head (469c394).

Files Patch % Lines
dorado/scheduling/mission.py 50.00% 3 Missing ⚠️
dorado/scheduling/scripts/animate.py 0.00% 1 Missing ⚠️
dorado/scheduling/scripts/animate_survey.py 0.00% 1 Missing ⚠️
dorado/scheduling/scripts/main.py 0.00% 1 Missing ⚠️
dorado/scheduling/scripts/metrics.py 0.00% 1 Missing ⚠️
dorado/scheduling/scripts/simsurvey.py 0.00% 1 Missing ⚠️
dorado/scheduling/scripts/survey_slicer.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   29.71%   28.78%   -0.94%     
==========================================
  Files          38       38              
  Lines        1817     1817              
==========================================
- Hits          540      523      -17     
- Misses       1277     1294      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lpsinger lpsinger merged commit d50ef76 into nasa:main Mar 8, 2024
2 of 5 checks passed
@lpsinger lpsinger deleted the fix-broken-process-pool branch March 8, 2024 03:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BrokenProcessPool when running quickstart (M1 Mac)
1 participant