Commit fa22ae6
committed
checkpoint_conversion: import GCS via gcloud_stub for decoupled mode
The top-level `from google.cloud.storage import Client, transfer_manager`
in checkpoint_conversion/utils/utils.py broke pytest collection for
the ROCm decoupled tests (DECOUPLE_GCLOUD=TRUE), since the package
isn't installed in that environment.
- gcloud_stub.gcs_storage(): also import and attach the
transfer_manager submodule (it isn't auto-imported by
`from google.cloud import storage`); extend _gcs_stubs() with a
no-op transfer_manager stub.
- checkpoint_conversion/utils/utils.py: drop the direct google.cloud
import and bind Client/transfer_manager via gcs_storage(), matching
the existing pattern in src/maxtext/utils/gcs_utils.py.1 parent 20763d2 commit fa22ae6
2 files changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
241 | 250 | | |
242 | 251 | | |
243 | 252 | | |
244 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
245 | 261 | | |
246 | 262 | | |
247 | 263 | | |
| |||
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
| 269 | + | |
253 | 270 | | |
| 271 | + | |
254 | 272 | | |
255 | 273 | | |
256 | 274 | | |
| |||
0 commit comments