Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[App] Resolve a condition bug with spawning #15812

Merged
merged 4 commits into from
Nov 26, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lightning_app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed the PyTorch Inference locally on GPU ([#15813](https://github.com/Lightning-AI/lightning/pull/15813))


- Fixed the `enable_spawn` method of the `WorkRunExecutor` ([#15812](https://github.com/Lightning-AI/lightning/pull/15812))


## [1.8.2] - 2022-11-17

### Added
Expand Down
3 changes: 2 additions & 1 deletion src/lightning_app/utilities/proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from deepdiff import DeepDiff, Delta
from lightning_utilities.core.apply_func import apply_to_collection

from lightning_app.core.queues import MultiProcessQueue
from lightning_app.storage import Path
from lightning_app.storage.copier import _Copier, _copy_files
from lightning_app.storage.drive import _maybe_create_drive, Drive
Expand Down Expand Up @@ -357,7 +358,7 @@ def enable_spawn(self) -> Generator:
yield

def _clean_queues(self):
if "LIGHTNING_APP_STATE_URL" in os.environ:
if not isinstance(self.work._request_queue, MultiProcessQueue):
self.work._request_queue = self.work._request_queue.to_dict()
self.work._response_queue = self.work._response_queue.to_dict()

Expand Down