xoscar 0.7.1__tar.gz → 0.7.2__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.

Potentially problematic release.


This version of xoscar might be problematic. Click here for more details.

Files changed (92) hide show
  1. {xoscar-0.7.1 → xoscar-0.7.2}/PKG-INFO +1 -1
  2. xoscar-0.7.2/xoscar/virtualenv/core.py +90 -0
  3. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/virtualenv/uv.py +4 -0
  4. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/PKG-INFO +1 -1
  5. xoscar-0.7.1/xoscar/virtualenv/core.py +0 -52
  6. {xoscar-0.7.1 → xoscar-0.7.2}/MANIFEST.in +0 -0
  7. {xoscar-0.7.1 → xoscar-0.7.2}/pyproject.toml +0 -0
  8. {xoscar-0.7.1 → xoscar-0.7.2}/setup.cfg +0 -0
  9. {xoscar-0.7.1 → xoscar-0.7.2}/setup.py +0 -0
  10. {xoscar-0.7.1 → xoscar-0.7.2}/versioneer.py +0 -0
  11. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/__init__.py +0 -0
  12. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/_utils.pxd +0 -0
  13. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/_utils.pyx +0 -0
  14. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/_version.py +0 -0
  15. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/aio/__init__.py +0 -0
  16. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/aio/base.py +0 -0
  17. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/aio/file.py +0 -0
  18. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/aio/lru.py +0 -0
  19. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/aio/parallelism.py +0 -0
  20. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/api.py +0 -0
  21. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backend.py +0 -0
  22. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/__init__.py +0 -0
  23. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/allocate_strategy.py +0 -0
  24. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/__init__.py +0 -0
  25. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/base.py +0 -0
  26. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/core.py +0 -0
  27. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/dummy.py +0 -0
  28. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/errors.py +0 -0
  29. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/socket.py +0 -0
  30. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/ucx.py +0 -0
  31. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/communication/utils.py +0 -0
  32. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/config.py +0 -0
  33. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/context.py +0 -0
  34. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/core.py +0 -0
  35. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/__init__.py +0 -0
  36. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/__main__.py +0 -0
  37. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/backend.py +0 -0
  38. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/driver.py +0 -0
  39. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/fate_sharing.py +0 -0
  40. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/pool.py +0 -0
  41. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/indigen/shared_memory.py +0 -0
  42. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/message.pyi +0 -0
  43. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/message.pyx +0 -0
  44. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/pool.py +0 -0
  45. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/router.py +0 -0
  46. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/test/__init__.py +0 -0
  47. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/test/backend.py +0 -0
  48. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/backends/test/pool.py +0 -0
  49. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/batch.py +0 -0
  50. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/__init__.py +0 -0
  51. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/common.py +0 -0
  52. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/core.py +0 -0
  53. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/process_group.py +0 -0
  54. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/utils.py +0 -0
  55. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/collective/xoscar_pygloo.pyi +0 -0
  56. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/constants.py +0 -0
  57. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/context.pxd +0 -0
  58. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/context.pyx +0 -0
  59. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/core.pxd +0 -0
  60. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/core.pyx +0 -0
  61. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/debug.py +0 -0
  62. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/driver.py +0 -0
  63. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/errors.py +0 -0
  64. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/libcpp.pxd +0 -0
  65. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/__init__.py +0 -0
  66. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/api.py +0 -0
  67. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/__init__.py +0 -0
  68. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/console/__init__.py +0 -0
  69. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/console/console_metric.py +0 -0
  70. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/metric.py +0 -0
  71. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/prometheus/__init__.py +0 -0
  72. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/metrics/backends/prometheus/prometheus_metric.py +0 -0
  73. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/nvutils.py +0 -0
  74. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/profiling.py +0 -0
  75. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/__init__.py +0 -0
  76. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/aio.py +0 -0
  77. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/core.pxd +0 -0
  78. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/core.pyi +0 -0
  79. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/core.pyx +0 -0
  80. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/cuda.py +0 -0
  81. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/exception.py +0 -0
  82. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/mlx.py +0 -0
  83. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/numpy.py +0 -0
  84. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/pyfury.py +0 -0
  85. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/serialization/scipy.py +0 -0
  86. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/utils.py +0 -0
  87. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar/virtualenv/__init__.py +0 -0
  88. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/SOURCES.txt +0 -0
  89. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/dependency_links.txt +0 -0
  90. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/not-zip-safe +0 -0
  91. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/requires.txt +0 -0
  92. {xoscar-0.7.1 → xoscar-0.7.2}/xoscar.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xoscar
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -0,0 +1,90 @@
1
+ # Copyright 2022-2025 XProbe Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from __future__ import annotations
16
+
17
+ import importlib
18
+ from abc import ABC, abstractmethod
19
+ from pathlib import Path
20
+
21
+
22
+ class VirtualEnvManager(ABC):
23
+ @classmethod
24
+ @abstractmethod
25
+ def is_available(cls):
26
+ pass
27
+
28
+ def __init__(self, env_path: Path):
29
+ self.env_path = env_path.resolve()
30
+
31
+ @abstractmethod
32
+ def create_env(self, python_path: Path | None = None) -> None:
33
+ pass
34
+
35
+ @abstractmethod
36
+ def install_packages(self, packages: list[str], **kwargs):
37
+ pass
38
+
39
+ @staticmethod
40
+ def process_packages(packages: list[str]) -> list[str]:
41
+ """
42
+ Process a list of package names, replacing placeholders like #system_<package>#
43
+ with the installed version of the corresponding package from the system environment.
44
+
45
+ Example:
46
+ "#system_torch#" -> "torch==2.1.0" (if torch 2.1.0 is installed)
47
+
48
+ Args:
49
+ packages (list[str]): A list of package names, which may include placeholders.
50
+
51
+ Returns:
52
+ list[str]: A new list with resolved package names and versions.
53
+
54
+ Raises:
55
+ RuntimeError: If a specified system package is not found in the environment.
56
+ """
57
+ processed = []
58
+
59
+ for pkg in packages:
60
+ if pkg.startswith("#system_") and pkg.endswith("#"):
61
+ real_pkg = pkg[
62
+ len("#system_") : -1
63
+ ] # Extract actual package name, e.g., "torch"
64
+ try:
65
+ version = importlib.metadata.version(real_pkg)
66
+ except importlib.metadata.PackageNotFoundError:
67
+ raise RuntimeError(
68
+ f"System package '{real_pkg}' not found. Cannot resolve '{pkg}'."
69
+ )
70
+ processed.append(f"{real_pkg}=={version}")
71
+ else:
72
+ processed.append(pkg)
73
+
74
+ return processed
75
+
76
+ @abstractmethod
77
+ def cancel_install(self):
78
+ pass
79
+
80
+ @abstractmethod
81
+ def get_python_path(self) -> str | None:
82
+ pass
83
+
84
+ @abstractmethod
85
+ def get_lib_path(self) -> str:
86
+ pass
87
+
88
+ @abstractmethod
89
+ def remove_env(self):
90
+ pass
@@ -46,6 +46,10 @@ class UVVirtualEnvManager(VirtualEnvManager):
46
46
  if not packages:
47
47
  return
48
48
 
49
+ # extend the ability of pip
50
+ # maybe replace #system_torch# to the real version
51
+ packages = self.process_packages(packages)
52
+
49
53
  cmd = ["uv", "pip", "install", "-p", str(self.env_path)] + packages
50
54
 
51
55
  # Handle known pip-related kwargs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xoscar
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Python actor framework for heterogeneous computing.
5
5
  Home-page: http://github.com/xorbitsai/xoscar
6
6
  Author: Qin Xuye
@@ -1,52 +0,0 @@
1
- # Copyright 2022-2025 XProbe Inc.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from __future__ import annotations
16
-
17
- from abc import ABC, abstractmethod
18
- from pathlib import Path
19
-
20
-
21
- class VirtualEnvManager(ABC):
22
- @classmethod
23
- @abstractmethod
24
- def is_available(cls):
25
- pass
26
-
27
- def __init__(self, env_path: Path):
28
- self.env_path = env_path.resolve()
29
-
30
- @abstractmethod
31
- def create_env(self, python_path: Path | None = None) -> None:
32
- pass
33
-
34
- @abstractmethod
35
- def install_packages(self, packages: list[str], **kwargs):
36
- pass
37
-
38
- @abstractmethod
39
- def cancel_install(self):
40
- pass
41
-
42
- @abstractmethod
43
- def get_python_path(self) -> str | None:
44
- pass
45
-
46
- @abstractmethod
47
- def get_lib_path(self) -> str:
48
- pass
49
-
50
- @abstractmethod
51
- def remove_env(self):
52
- pass
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes