b10-transfer 0.2.4__tar.gz → 0.3.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: b10-transfer
3
- Version: 0.2.4
3
+ Version: 0.3.1
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
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "b10-transfer"
7
- version = "0.2.4"
7
+ version = "0.3.1"
8
8
  description = "Distributed PyTorch file transfer for Baseten - Environment-aware, lock-free file transfer management"
9
9
  authors = ["Shounak Ray <shounak.noreply@baseten.co>", "Fred Liu <fred.liu.noreply@baseten.co>"]
10
10
  maintainers = ["Fred Liu <fred.liu.noreply@baseten.co>", "Shounak Ray <shounak.noreply@baseten.co>"]
@@ -29,7 +29,7 @@ classifiers = [
29
29
  packages = [{include = "b10_transfer", from = "src"}]
30
30
 
31
31
  [tool.poetry.scripts]
32
- b10-transfer = "b10_transfer.cache_cli:main"
32
+ b10-compile-cache = "b10_transfer.cache_cli:main"
33
33
 
34
34
  [tool.poetry.dependencies]
35
35
  python = "^3.9"
@@ -9,7 +9,7 @@ from .constants import OperationStatus
9
9
  from .logging_utils import get_b10_logger
10
10
 
11
11
  # Version
12
- __version__ = "0.2.4"
12
+ __version__ = "0.3.1"
13
13
 
14
14
  __all__ = [
15
15
  "CacheError",
@@ -1,18 +1,15 @@
1
1
  # src/b10_tcache/cli.py
2
- import os
3
-
4
- VLLM_CACHE_DIR = os.getenv("VLLM_CACHE_ROOT", "~/.cache/vllm")
5
- os.environ["TORCHINDUCTOR_CACHE_DIR"] = VLLM_CACHE_DIR
6
-
7
- from .cache import load_compile_cache, save_compile_cache
8
-
9
2
  import logging
3
+ import os
10
4
  import sys
11
5
  import time
12
6
  import urllib.error
13
7
  import urllib.request
14
8
  from dataclasses import dataclass
15
9
 
10
+ from .cache import load_compile_cache, save_compile_cache
11
+ from .constants import OperationStatus
12
+
16
13
 
17
14
  @dataclass(frozen=True)
18
15
  class WaitCfg:
@@ -90,9 +87,9 @@ def main() -> None:
90
87
 
91
88
  # 1) Preload any existing cache (non-fatal on error)
92
89
  try:
93
- logger.info("Calling load_compile_cache() …")
94
- load_compile_cache()
95
- logger.info("load_compile_cache() returned.")
90
+ if load_compile_cache() == OperationStatus.SUCCESS:
91
+ logger.info("Compile cache loaded successfully.")
92
+ exit(0)
96
93
  except Exception as e:
97
94
  logger.exception("load_compile_cache() failed: %s", e)
98
95
 
@@ -101,19 +98,17 @@ def main() -> None:
101
98
  ready = _wait_for_ready(cfg, logger)
102
99
  except Exception as e:
103
100
  logger.exception("Readiness wait crashed: %s", e)
104
- sys.exit(3)
101
+ sys.exit(1)
105
102
 
106
103
  if not ready:
107
104
  # Loop timed out. Safe exit.
108
- sys.exit(4)
105
+ sys.exit(2)
109
106
 
110
107
  # 3) Save compile cache
111
108
  try:
112
- logger.info("Calling save_compile_cache() …")
113
109
  save_compile_cache()
114
- logger.info("save_compile_cache() completed.")
115
110
  except Exception as e:
116
111
  logger.exception("save_compile_cache() failed: %s", e)
117
- sys.exit(5)
112
+ sys.exit(3)
118
113
 
119
114
  logger.info("vLLM automatic torch compile cache done.")
File without changes