b10-transfer 0.2.3__tar.gz → 0.3.0__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.3
3
+ Version: 0.3.0
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.3"
7
+ version = "0.3.0"
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.3"
12
+ __version__ = "0.3.0"
13
13
 
14
14
  __all__ = [
15
15
  "CacheError",
@@ -1,9 +1,4 @@
1
1
  # src/b10_tcache/cli.py
2
- VLLM_CACHE_DIR = os.getenv("VLLM_CACHE_ROOT", "~/.cache/vllm")
3
- os.environ["TORCHINDUCTOR_CACHE_DIR"] = VLLM_CACHE_DIR
4
-
5
- from .cache import load_compile_cache, save_compile_cache
6
-
7
2
  import logging
8
3
  import os
9
4
  import sys
@@ -12,6 +7,9 @@ import urllib.error
12
7
  import urllib.request
13
8
  from dataclasses import dataclass
14
9
 
10
+ from .cache import load_compile_cache, save_compile_cache
11
+ from .constants import OperationStatus
12
+
15
13
 
16
14
  @dataclass(frozen=True)
17
15
  class WaitCfg:
@@ -89,9 +87,10 @@ def main() -> None:
89
87
 
90
88
  # 1) Preload any existing cache (non-fatal on error)
91
89
  try:
92
- logger.info("Calling load_compile_cache() …")
93
90
  load_compile_cache()
94
- logger.info("load_compile_cache() returned.")
91
+ if load_compile_cache() == OperationStatus.SUCCESS:
92
+ logger.info("Compile cache loaded successfully.")
93
+ exit(0)
95
94
  except Exception as e:
96
95
  logger.exception("load_compile_cache() failed: %s", e)
97
96
 
@@ -100,19 +99,17 @@ def main() -> None:
100
99
  ready = _wait_for_ready(cfg, logger)
101
100
  except Exception as e:
102
101
  logger.exception("Readiness wait crashed: %s", e)
103
- sys.exit(3)
102
+ sys.exit(1)
104
103
 
105
104
  if not ready:
106
105
  # Loop timed out. Safe exit.
107
- sys.exit(4)
106
+ sys.exit(2)
108
107
 
109
108
  # 3) Save compile cache
110
109
  try:
111
- logger.info("Calling save_compile_cache() …")
112
110
  save_compile_cache()
113
- logger.info("save_compile_cache() completed.")
114
111
  except Exception as e:
115
112
  logger.exception("save_compile_cache() failed: %s", e)
116
- sys.exit(5)
113
+ sys.exit(3)
117
114
 
118
115
  logger.info("vLLM automatic torch compile cache done.")
File without changes