1
1
import os
2
2
from pathlib import Path
3
+ from typing import Optional
3
4
4
5
import lightning_cloud .env
5
6
@@ -13,7 +14,7 @@ def get_lightning_cloud_url() -> str:
13
14
14
15
SUPPORTED_PRIMITIVE_TYPES = (type (None ), str , int , float , bool )
15
16
STATE_UPDATE_TIMEOUT = 0.001
16
- STATE_ACCUMULATE_WAIT = 0.05
17
+ STATE_ACCUMULATE_WAIT = 0.15
17
18
# Duration in seconds of a moving average of a full flow execution
18
19
# beyond which an exception is raised.
19
20
FLOW_DURATION_THRESHOLD = 1.0
@@ -25,7 +26,6 @@ def get_lightning_cloud_url() -> str:
25
26
APP_SERVER_PORT = _find_lit_app_port (7501 )
26
27
APP_STATE_MAX_SIZE_BYTES = 1024 * 1024 # 1 MB
27
28
28
- CLOUD_QUEUE_TYPE = os .getenv ("LIGHTNING_CLOUD_QUEUE_TYPE" , None )
29
29
WARNING_QUEUE_SIZE = 1000
30
30
# different flag because queue debug can be very noisy, and almost always not useful unless debugging the queue itself.
31
31
QUEUE_DEBUG_ENABLED = bool (int (os .getenv ("LIGHTNING_QUEUE_DEBUG_ENABLED" , "0" )))
@@ -77,5 +77,9 @@ def enable_multiple_works_in_default_container() -> bool:
77
77
return bool (int (os .getenv ("ENABLE_MULTIPLE_WORKS_IN_DEFAULT_CONTAINER" , "0" )))
78
78
79
79
80
+ def get_cloud_queue_type () -> Optional [str ]:
81
+ return os .getenv ("LIGHTNING_CLOUD_QUEUE_TYPE" , None )
82
+
83
+
80
84
# Number of seconds to wait between filesystem checks when waiting for files in remote storage
81
85
REMOTE_STORAGE_WAIT = 0.5
0 commit comments