b10-transfer 0.3.6__py3-none-any.whl → 0.3.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- b10_transfer/__init__.py +1 -1
- b10_transfer/cleanup.py +6 -6
- b10_transfer/utils.py +2 -2
- {b10_transfer-0.3.6.dist-info → b10_transfer-0.3.8.dist-info}/METADATA +1 -1
- {b10_transfer-0.3.6.dist-info → b10_transfer-0.3.8.dist-info}/RECORD +7 -7
- {b10_transfer-0.3.6.dist-info → b10_transfer-0.3.8.dist-info}/WHEEL +0 -0
- {b10_transfer-0.3.6.dist-info → b10_transfer-0.3.8.dist-info}/entry_points.txt +0 -0
b10_transfer/__init__.py
CHANGED
b10_transfer/cleanup.py
CHANGED
@@ -13,8 +13,6 @@ from typing import List
|
|
13
13
|
from .config import config
|
14
14
|
from .constants import (
|
15
15
|
CACHE_INCOMPLETE_SUFFIX,
|
16
|
-
CLEANUP_LOCK_TIMEOUT_SECONDS,
|
17
|
-
CLEANUP_INCOMPLETE_TIMEOUT_SECONDS,
|
18
16
|
)
|
19
17
|
from .utils import safe_execute, safe_unlink
|
20
18
|
from .logging_utils import get_b10_logger
|
@@ -108,8 +106,8 @@ def cooperative_cleanup_b10fs() -> None:
|
|
108
106
|
removing files that are likely orphaned due to pod crashes or failures.
|
109
107
|
|
110
108
|
Removes:
|
111
|
-
- Lock files older than CLEANUP_LOCK_TIMEOUT_SECONDS (*.lock)
|
112
|
-
- Incomplete cache files older than CLEANUP_INCOMPLETE_TIMEOUT_SECONDS (*.incomplete*)
|
109
|
+
- Lock files older than config.CLEANUP_LOCK_TIMEOUT_SECONDS (*.lock)
|
110
|
+
- Incomplete cache files older than config.CLEANUP_INCOMPLETE_TIMEOUT_SECONDS (*.incomplete*)
|
113
111
|
|
114
112
|
Does NOT remove:
|
115
113
|
- Final cache files (*.latest.tar.gz) - these are the actual cached results
|
@@ -124,13 +122,15 @@ def cooperative_cleanup_b10fs() -> None:
|
|
124
122
|
return
|
125
123
|
|
126
124
|
# Find and clean stale lock files
|
127
|
-
stale_locks = _find_stale_files(
|
125
|
+
stale_locks = _find_stale_files(
|
126
|
+
b10fs_dir, "*.lock", config.CLEANUP_LOCK_TIMEOUT_SECONDS
|
127
|
+
)
|
128
128
|
cleaned_locks = _cleanup_files(stale_locks, "lock")
|
129
129
|
|
130
130
|
# Find and clean stale incomplete cache files
|
131
131
|
incomplete_pattern = f"*{CACHE_INCOMPLETE_SUFFIX}*"
|
132
132
|
stale_incomplete = _find_stale_files(
|
133
|
-
b10fs_dir, incomplete_pattern, CLEANUP_INCOMPLETE_TIMEOUT_SECONDS
|
133
|
+
b10fs_dir, incomplete_pattern, config.CLEANUP_INCOMPLETE_TIMEOUT_SECONDS
|
134
134
|
)
|
135
135
|
cleaned_incomplete = _cleanup_files(stale_incomplete, "incomplete cache")
|
136
136
|
|
b10_transfer/utils.py
CHANGED
@@ -305,9 +305,9 @@ def _is_b10fs_enabled() -> bool:
|
|
305
305
|
bool: True if BASETEN_FS_ENABLED is set to "1" or "True", False otherwise.
|
306
306
|
"""
|
307
307
|
# Import here to avoid circular dependency
|
308
|
-
from .
|
308
|
+
from .config import config
|
309
309
|
|
310
|
-
return BASETEN_FS_ENABLED in ("1", "True", "true")
|
310
|
+
return config.BASETEN_FS_ENABLED in ("1", "True", "true")
|
311
311
|
|
312
312
|
|
313
313
|
def _validate_b10fs_available() -> None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: b10-transfer
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.8
|
4
4
|
Summary: Distributed PyTorch file transfer for Baseten - Environment-aware, lock-free file transfer management
|
5
5
|
License: MIT
|
6
6
|
Keywords: pytorch,file-transfer,cache,machine-learning,inference
|
@@ -1,8 +1,8 @@
|
|
1
|
-
b10_transfer/__init__.py,sha256=
|
1
|
+
b10_transfer/__init__.py,sha256=8cna_aMOPTQTLY3b_7pSFe9sSLft5FfqSCso7uRcpBA,729
|
2
2
|
b10_transfer/archive.py,sha256=RGk7pmOdF24aATKygkFOAfHB-90arnW67nj-WURZfcw,6424
|
3
3
|
b10_transfer/cache.py,sha256=VbAQx935rqdMXu6ejloa6Jw3n2KxkSMp3VLrNrgP--k,17480
|
4
4
|
b10_transfer/cache_cli.py,sha256=29H7HPKOvHP2LVI6J1Gad42iTXAZIwVqjvrZyIuCb_Q,3378
|
5
|
-
b10_transfer/cleanup.py,sha256=
|
5
|
+
b10_transfer/cleanup.py,sha256=2LXiNQH08xT7g5LtqAp7fiUYa1Rle_gM8LKxj5NbAwc,6337
|
6
6
|
b10_transfer/config.py,sha256=z_7emRsb-IG7_KbGy9jLtzkbIkLGEbKpWDUPWC_PB58,4661
|
7
7
|
b10_transfer/constants.py,sha256=oBfAvw2QyCRS1rFD9g1kDaToQqRX2bcnCVBUnCYD8uQ,1323
|
8
8
|
b10_transfer/core.py,sha256=r79CI8Kpw9FyT17qYOze4tg4UyoL_EQXiucX5YiqXEM,4659
|
@@ -10,8 +10,8 @@ b10_transfer/environment.py,sha256=7DcEFmuxEMWwRM0M92q8al5rx8mpGY8dZ81Hokhb9B0,5
|
|
10
10
|
b10_transfer/info.py,sha256=MR6gXvL3gBImnafuDgbOsZAHy9_akwZVlyIPGu2t8jQ,6345
|
11
11
|
b10_transfer/logging_utils.py,sha256=c7iKNK9daNsrkHgsKl32rXscqqmWsq3a8ttz9M5ev3o,3460
|
12
12
|
b10_transfer/space_monitor.py,sha256=24rClldo6EYaeikEla3_q4IwwI0r3DEPzaIbfU4hTRE,10746
|
13
|
-
b10_transfer/utils.py,sha256=
|
14
|
-
b10_transfer-0.3.
|
15
|
-
b10_transfer-0.3.
|
16
|
-
b10_transfer-0.3.
|
17
|
-
b10_transfer-0.3.
|
13
|
+
b10_transfer/utils.py,sha256=CRMnhswWdKfiZ6-TmLAvhMLFnVoygU9c25bjAqZv4T4,12028
|
14
|
+
b10_transfer-0.3.8.dist-info/METADATA,sha256=2R3pMbKYIMNVkgXjv07XzvcpFy_Qk_grwUGjDFxwPnI,4108
|
15
|
+
b10_transfer-0.3.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
16
|
+
b10_transfer-0.3.8.dist-info/entry_points.txt,sha256=AFH8EfkeBv6ZuarnaUvbTjvySylf3GCSioYqB_ijrH8,65
|
17
|
+
b10_transfer-0.3.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|