Skip to content

Commit

Permalink
[App] Resolve a condition bug with spawning (#15812)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
  • Loading branch information
tchaton and carmocca committed Nov 26, 2022
1 parent cca3432 commit 6a2a83a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lightning_app/CHANGELOG.md
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
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

0 comments on commit 6a2a83a

Please sign in to comment.