kubetorch 0.2.0__py3-none-any.whl → 0.2.2__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.
Potentially problematic release.
This version of kubetorch might be problematic. Click here for more details.
- kubetorch/__init__.py +1 -1
- kubetorch/servers/http/http_server.py +3 -2
- kubetorch/serving/templates/kt_setup_template.sh.j2 +3 -2
- kubetorch/utils.py +4 -25
- {kubetorch-0.2.0.dist-info → kubetorch-0.2.2.dist-info}/METADATA +4 -4
- {kubetorch-0.2.0.dist-info → kubetorch-0.2.2.dist-info}/RECORD +8 -8
- {kubetorch-0.2.0.dist-info → kubetorch-0.2.2.dist-info}/WHEEL +0 -0
- {kubetorch-0.2.0.dist-info → kubetorch-0.2.2.dist-info}/entry_points.txt +0 -0
kubetorch/__init__.py
CHANGED
|
@@ -1309,8 +1309,9 @@ async def lifespan(app: FastAPI):
|
|
|
1309
1309
|
logger.debug("No TTL annotation found, heartbeat disabled")
|
|
1310
1310
|
|
|
1311
1311
|
try:
|
|
1312
|
-
|
|
1313
|
-
|
|
1312
|
+
if os.getenv("KT_CALLABLE_TYPE") == "app":
|
|
1313
|
+
cached_image_setup()
|
|
1314
|
+
else:
|
|
1314
1315
|
load_callable()
|
|
1315
1316
|
|
|
1316
1317
|
logger.info("Kubetorch Server started.")
|
|
@@ -59,12 +59,13 @@ fi
|
|
|
59
59
|
# Export the install command as an environment variable for use in applications
|
|
60
60
|
echo "Setting KT_PIP_INSTALL_CMD env var to $uv_pip_cmd"
|
|
61
61
|
export KT_PIP_INSTALL_CMD="$uv_pip_cmd"
|
|
62
|
+
mkdir -p .kt
|
|
62
63
|
echo "$uv_pip_cmd" > .kt/kt_pip_install_cmd
|
|
63
64
|
|
|
64
65
|
{% if install_url %}
|
|
65
|
-
$uv_pip_cmd "kubetorch[server]
|
|
66
|
+
$uv_pip_cmd "kubetorch[server]=={{ install_url }}"
|
|
66
67
|
{% if install_otel %}
|
|
67
|
-
$uv_pip_cmd "kubetorch[otel]
|
|
68
|
+
$uv_pip_cmd "kubetorch[otel]=={{ install_url }}"
|
|
68
69
|
{% endif %}
|
|
69
70
|
{% else %}
|
|
70
71
|
{{ rsync_kt_editable_cmd }}
|
kubetorch/utils.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import enum
|
|
2
|
-
import importlib.util
|
|
3
2
|
import json
|
|
4
3
|
import os
|
|
5
4
|
import re
|
|
@@ -123,30 +122,10 @@ def get_kt_install_url(freeze: bool = False):
|
|
|
123
122
|
if local_kt_path and (Path(local_kt_path) / "pyproject.toml").exists():
|
|
124
123
|
return local_kt_path, True
|
|
125
124
|
else:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
# check if installed from presigned url
|
|
131
|
-
freeze_cmd = (
|
|
132
|
-
"pip freeze | grep kubetorch"
|
|
133
|
-
if not uv_installed
|
|
134
|
-
else "uv pip freeze | grep kubetorch"
|
|
135
|
-
)
|
|
136
|
-
output = subprocess.run(
|
|
137
|
-
freeze_cmd,
|
|
138
|
-
shell=True,
|
|
139
|
-
capture_output=True,
|
|
140
|
-
text=True,
|
|
141
|
-
).stdout
|
|
142
|
-
if not output.startswith("kubetorch @ "):
|
|
143
|
-
raise Exception(
|
|
144
|
-
"Could not find kubetorch version to install on the pod. You must either set the "
|
|
145
|
-
"``install_url`` in the config or ``KT_INSTALL_URL`` env var, have kubetorch installed "
|
|
146
|
-
"locally, or set ``compute.freeze`` to ``True``."
|
|
147
|
-
)
|
|
148
|
-
install_url = output[len("kubetorch @ ") :].strip()
|
|
149
|
-
return install_url, False
|
|
125
|
+
import kubetorch as kt
|
|
126
|
+
|
|
127
|
+
version = kt.__version__
|
|
128
|
+
return version, False
|
|
150
129
|
|
|
151
130
|
|
|
152
131
|
class LogVerbosity(str, enum.Enum):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kubetorch
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: A Python interface for running ML workloads on Kubernetes
|
|
5
5
|
License: Apache 2.0
|
|
6
6
|
Author: Runhouse Team
|
|
7
7
|
Requires-Python: >=3.9,<=3.13
|
|
@@ -97,10 +97,10 @@ pip install "kubetorch[client]"
|
|
|
97
97
|
```bash
|
|
98
98
|
# Option 1: Install directly from OCI registry
|
|
99
99
|
helm upgrade --install kubetorch oci://ghcr.io/run-house/charts/kubetorch \
|
|
100
|
-
--version 0.2.
|
|
100
|
+
--version 0.2.2 -n kubetorch --create-namespace
|
|
101
101
|
|
|
102
102
|
# Option 2: Download chart locally first
|
|
103
|
-
helm pull oci://ghcr.io/run-house/charts/kubetorch --version 0.2.
|
|
103
|
+
helm pull oci://ghcr.io/run-house/charts/kubetorch --version 0.2.2 --untar
|
|
104
104
|
helm upgrade --install kubetorch ./kubetorch -n kubetorch --create-namespace
|
|
105
105
|
```
|
|
106
106
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
kubetorch/__init__.py,sha256=
|
|
1
|
+
kubetorch/__init__.py,sha256=JZaiU7VcuwqRpmzdhxJaXt9VbQtVagJ8gp4dMnPs8BU,2115
|
|
2
2
|
kubetorch/cli.py,sha256=yCn-1z71TNS-tvA2D5CbZF3YTh2QYvfyXi7H3yN2vXI,68611
|
|
3
3
|
kubetorch/cli_utils.py,sha256=zzABvAT35eQulAakAmo6PwZkMg6pZNLA3HoZqsYZQB0,33353
|
|
4
4
|
kubetorch/config.py,sha256=-up9Tljkls_ZU8bASjDRnFaxTknBsoLeWgbuXbSt6cw,15839
|
|
@@ -66,7 +66,7 @@ kubetorch/servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
66
66
|
kubetorch/servers/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
67
67
|
kubetorch/servers/http/distributed_utils.py,sha256=6CLZn4JOdTIWSvnN5DYOIhiT7NctFeEtL-nqOAx4bYM,129685
|
|
68
68
|
kubetorch/servers/http/http_client.py,sha256=xs84zNGnquiF_q3FNcdGEKXu9LLmrnKxeJcAlZzP27I,29753
|
|
69
|
-
kubetorch/servers/http/http_server.py,sha256=
|
|
69
|
+
kubetorch/servers/http/http_server.py,sha256=y0AO5LLPozK1mDDrbWvW9sVwqxwSKZppWN7io7FAp5A,69836
|
|
70
70
|
kubetorch/servers/http/server_metrics.py,sha256=0c9K7DBo6fYXAYqCXf2zqDyARP7mB2fwPOuDTzVTIQk,9614
|
|
71
71
|
kubetorch/servers/http/utils.py,sha256=39MQDD027D5YwA78U_hBVjbSvEsymYwZ-SVvQ4Zpzk8,27231
|
|
72
72
|
kubetorch/serving/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -79,15 +79,15 @@ kubetorch/serving/raycluster_service_manager.py,sha256=k3u01KDsi8tW_NWzR3jytT2DA
|
|
|
79
79
|
kubetorch/serving/service_manager.py,sha256=4LdrzfwPFPf7IsSwR7HVxuSrbyBNw1dI4xPHR8TECrw,720
|
|
80
80
|
kubetorch/serving/templates/deployment_template.yaml,sha256=_hPm7sXCb2BVeYuhyAGz-hRzjAoSaXNikJj_3MJfLsM,435
|
|
81
81
|
kubetorch/serving/templates/knative_service_template.yaml,sha256=yKxBdduIOqDntywBdUFVaV3hc50cZhl6K91FNok6X_U,553
|
|
82
|
-
kubetorch/serving/templates/kt_setup_template.sh.j2,sha256=
|
|
82
|
+
kubetorch/serving/templates/kt_setup_template.sh.j2,sha256=OqTWkMmiqDodia0a9f-wnef1EBL4XFWBWuXdbpotVKc,2691
|
|
83
83
|
kubetorch/serving/templates/pod_template.yaml,sha256=5N0KuLBtphA1dyZ2hq8nYKOpaqDxUvLkZEl2fPG89yw,5530
|
|
84
84
|
kubetorch/serving/templates/raycluster_service_template.yaml,sha256=kW_bIJu36Ud4kI8Q9ycnQfIIbhkxNa-C6OP93Jpl-EA,1037
|
|
85
85
|
kubetorch/serving/templates/raycluster_template.yaml,sha256=ruWFk09-E85WZJc64l7NXrsdGYcW4spPzErWuzrLLes,990
|
|
86
86
|
kubetorch/serving/templates/service_template.yaml,sha256=ClIMlW-JzK4I6YWo9oBbwYXgNTcz8AGDMpo8_Q8C4ng,642
|
|
87
87
|
kubetorch/serving/templates/workerset_template.yaml,sha256=l7svttZrQPHDbZuZsO8EmG38eVlFUDr_UyP3E2Ci0zY,981
|
|
88
88
|
kubetorch/serving/utils.py,sha256=7TASPzrK-8bX3lBvGj95I3fTp4MOBFqFhJvqA1TVvqA,12691
|
|
89
|
-
kubetorch/utils.py,sha256=
|
|
90
|
-
kubetorch-0.2.
|
|
91
|
-
kubetorch-0.2.
|
|
92
|
-
kubetorch-0.2.
|
|
93
|
-
kubetorch-0.2.
|
|
89
|
+
kubetorch/utils.py,sha256=h7bqR0OlmyTH61lKHGd6jEPNlBw8eX_5r0dN99ha_ws,8583
|
|
90
|
+
kubetorch-0.2.2.dist-info/METADATA,sha256=DpgtgZVM8VxcNajYjSBYcUQ-iLNtz0Z8zTESwdlvHLw,4810
|
|
91
|
+
kubetorch-0.2.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
92
|
+
kubetorch-0.2.2.dist-info/entry_points.txt,sha256=Gkg5B9pHJpGf-Zxk1LGx7RIG_9EI04MAbD6m4l1Rx3U,107
|
|
93
|
+
kubetorch-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|