Skip to content

Commit

Permalink
Optimize Payload Time locally (#15601)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3cad7aa)
  • Loading branch information
tchaton authored and Borda committed Nov 10, 2022
1 parent b2651a0 commit f9792bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/lightning_app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed bug with Multi Node Component and add some examples ([#15557](https://github.com/Lightning-AI/lightning/pull/15557))


- Fixed a bug where payload would take a very long time locally ([#15557](https://github.com/Lightning-AI/lightning/pull/15557))


- Fixed an issue with the `lightning` CLI taking a long time to error out when the cloud is not reachable ([#15412](https://github.com/Lightning-AI/lightning/pull/15412))



## [1.8.0] - 2022-11-01

### Added
Expand Down
6 changes: 5 additions & 1 deletion src/lightning_app/storage/orchestrator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import threading
import traceback
from queue import Empty
Expand Down Expand Up @@ -51,7 +52,10 @@ def __init__(
self.waiting_for_response: Dict[str, str] = {}
self._validate_queues()
self._exit_event = threading.Event()
self._sleep_time = 2

# Note: Use different sleep time locally and in the cloud
# to reduce queue calls.
self._sleep_time = 0.1 if "LIGHTNING_APP_STATE_URL" not in os.environ else 2
self.fs = _filesystem()

def _validate_queues(self):
Expand Down

0 comments on commit f9792bd

Please sign in to comment.