b10-transfer 0.1.1__py3-none-any.whl → 0.1.3__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 CHANGED
@@ -1,27 +1,13 @@
1
- """B10 Transfer - Lock-free PyTorch compilation cache for Baseten."""
1
+ """B10 Transfer - Lock-free PyTorch file transfer for Baseten."""
2
2
 
3
- from .core import transfer
4
- from .torch_cache import load_compile_cache, save_compile_cache, clear_local_cache
5
- from .async_transfers import (
6
- start_transfer_async,
7
- get_transfer_status,
8
- is_transfer_complete,
9
- wait_for_completion,
10
- cancel_transfer,
11
- list_active_transfers,
12
- TransferProgress,
13
- )
14
- from .async_torch_cache import (
15
- load_compile_cache_async,
16
- save_compile_cache_async,
17
- )
3
+ from .core import load_compile_cache, save_compile_cache, clear_local_cache
18
4
  from .utils import CacheError, CacheValidationError
19
5
  from .space_monitor import CacheOperationInterrupted
20
6
  from .info import get_cache_info, list_available_caches
21
- from .constants import SaveStatus, LoadStatus, TransferStatus, AsyncTransferStatus
7
+ from .constants import SaveStatus, LoadStatus
22
8
 
23
9
  # Version
24
- __version__ = "0.1.1"
10
+ __version__ = "0.1.3"
25
11
 
26
12
  __all__ = [
27
13
  "CacheError",
@@ -29,23 +15,9 @@ __all__ = [
29
15
  "CacheOperationInterrupted",
30
16
  "SaveStatus",
31
17
  "LoadStatus",
32
- "TransferStatus",
33
- "AsyncTransferStatus",
34
- "transfer",
35
18
  "load_compile_cache",
36
19
  "save_compile_cache",
37
20
  "clear_local_cache",
38
21
  "get_cache_info",
39
22
  "list_available_caches",
40
- # Generic async operations
41
- "start_transfer_async",
42
- "get_transfer_status",
43
- "is_transfer_complete",
44
- "wait_for_completion",
45
- "cancel_transfer",
46
- "list_active_transfers",
47
- "TransferProgress",
48
- # Torch-specific async operations
49
- "load_compile_cache_async",
50
- "save_compile_cache_async",
51
23
  ]
b10_transfer/constants.py CHANGED
@@ -36,8 +36,7 @@ B10FS_CACHE_DIR = validate_path_security(
36
36
  _b10fs_cache_dir, [_REQUIRED_TORCH_CACHE_DIR_PREFIX], "B10FS_CACHE_DIR"
37
37
  )
38
38
 
39
- # Validate LOCAL_WORK_DIR - allow /app, /tmp, and /cache paths.
40
- # This is like a "scratch" directory where you can do work (like compression/archival for example)
39
+ # Validate LOCAL_WORK_DIR - allow /app, /tmp, and /cache paths
41
40
  _local_work_dir = os.getenv("LOCAL_WORK_DIR", "/app")
42
41
  LOCAL_WORK_DIR = validate_path_security(
43
42
  _local_work_dir, ["/app/", "/tmp/", "/cache/"], "LOCAL_WORK_DIR"
@@ -113,7 +112,6 @@ class WorkerStatus(Enum):
113
112
  SUCCESS = auto()
114
113
  ERROR = auto()
115
114
  CANCELLED = auto()
116
- FILE_NOT_FOUND = auto()
117
115
 
118
116
 
119
117
  class LoadStatus(Enum):
@@ -134,19 +132,7 @@ class SaveStatus(Enum):
134
132
 
135
133
 
136
134
  class TransferStatus(Enum):
137
- """Status values for generic transfer operations."""
135
+ """Status values for file transfer operations."""
138
136
 
139
137
  SUCCESS = auto()
140
138
  ERROR = auto()
141
- INTERRUPTED = auto()
142
- DOES_NOT_EXIST = auto()
143
-
144
-
145
- class AsyncTransferStatus(Enum):
146
- NOT_STARTED = auto()
147
- IN_PROGRESS = auto()
148
- SUCCESS = auto()
149
- ERROR = auto()
150
- INTERRUPTED = auto()
151
- CANCELLED = auto()
152
- DOES_NOT_EXIST = auto()