shared-tensor 0.2.11__tar.gz → 0.2.12__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.4
2
2
  Name: shared-tensor
3
- Version: 0.2.11
3
+ Version: 0.2.12
4
4
  Summary: Native PyTorch CUDA IPC over Unix Domain Socket for same-host process separation
5
5
  Author-email: Athena Team <contact@world-sim-dev.org>
6
6
  Maintainer-email: Athena Team <contact@world-sim-dev.org>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "shared-tensor"
7
- version = "0.2.11"
7
+ version = "0.2.12"
8
8
  description = "Native PyTorch CUDA IPC over Unix Domain Socket for same-host process separation"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -19,4 +19,4 @@ __all__ = [
19
19
  "TaskStatus",
20
20
  ]
21
21
 
22
- __version__ = "0.2.11"
22
+ __version__ = "0.2.12"
@@ -264,8 +264,11 @@ def _deserialize_transformers_model(payload: bytes) -> Any:
264
264
  config = config_cls.from_dict(encoded["config_dict"])
265
265
  else: # pragma: no cover - defensive
266
266
  config = config_cls(**encoded["config_dict"])
267
- model = model_cls(config)
268
267
  state_dict = pickle.loads(encoded["state_bytes"])
268
+ model = model_cls(config)
269
+ first_tensor = next(iter(state_dict.values()), None)
270
+ if TORCH_MODULE is not None and isinstance(first_tensor, TORCH_MODULE.Tensor):
271
+ model = model.to(first_tensor.device)
269
272
  _load_module_state_dict(model, state_dict)
270
273
  model.train(bool(encoded["training"]))
271
274
  _validate_module_device(model)
File without changes
File without changes
File without changes