cortexgrid 0.3.13__tar.gz → 0.3.14__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.
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/PKG-INFO +1 -1
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/__init__.py +24 -1
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/experiment.py +4 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/lifecycle.py +4 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/status.py +2 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/pyproject.toml +1 -1
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/.gitignore +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/LICENSE +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/_bundle.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/_model_scheduler.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/_ray_job_driver.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/_serve_entry.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/checkpoint.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/infra.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/jobs.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/mlflow_util.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/__init__.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/application_spec.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/deployment_key.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/deployment_records.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/placement.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/registry_tags.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_serving/serve_bundle.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/model_storage.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/py.typed +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/ray_util.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/s3_util.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/secrets.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/serve.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/cortexgrid/state.py +0 -0
- {cortexgrid-0.3.13 → cortexgrid-0.3.14}/docs/cortexgrid/README.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cortexgrid
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Summary: Connect your ML code to the RoboLab compute cluster — Ray, MLflow, and S3
|
|
5
5
|
Project-URL: Homepage, https://github.com/robodatalab/cortexgrid
|
|
6
6
|
Project-URL: Repository, https://github.com/robodatalab/cortexgrid
|
|
@@ -35,6 +35,7 @@ from cortexgrid import state
|
|
|
35
35
|
from cortexgrid.checkpoint import checkpoint, resume
|
|
36
36
|
from cortexgrid.experiment import (
|
|
37
37
|
Experiment,
|
|
38
|
+
active_experiment,
|
|
38
39
|
delete_experiment,
|
|
39
40
|
delete_run,
|
|
40
41
|
list_experiments,
|
|
@@ -107,13 +108,13 @@ from cortexgrid.model_serving import (
|
|
|
107
108
|
ModelNotDeployed,
|
|
108
109
|
ModelRequirements,
|
|
109
110
|
ServingStatus,
|
|
110
|
-
deploy_model,
|
|
111
111
|
list_deployed_models,
|
|
112
112
|
model_serving_status,
|
|
113
113
|
redeploy_model,
|
|
114
114
|
undeploy_model,
|
|
115
115
|
wait_for_model_serving,
|
|
116
116
|
)
|
|
117
|
+
from cortexgrid.model_serving import deploy_model as _deploy_model_serving
|
|
117
118
|
|
|
118
119
|
|
|
119
120
|
def remote(
|
|
@@ -227,6 +228,28 @@ def register_model(
|
|
|
227
228
|
return model
|
|
228
229
|
|
|
229
230
|
|
|
231
|
+
def deploy_model(
|
|
232
|
+
family: str,
|
|
233
|
+
suffix: str,
|
|
234
|
+
run_name: str,
|
|
235
|
+
num_replicas: int = 1,
|
|
236
|
+
wait: bool = False,
|
|
237
|
+
timeout: float | None = 300.0,
|
|
238
|
+
config: DeploymentConfig | None = None,
|
|
239
|
+
) -> Deployment:
|
|
240
|
+
experiment = active_experiment()
|
|
241
|
+
return _deploy_model_serving(
|
|
242
|
+
family,
|
|
243
|
+
suffix,
|
|
244
|
+
run_name,
|
|
245
|
+
num_replicas=num_replicas,
|
|
246
|
+
wait=wait,
|
|
247
|
+
timeout=timeout,
|
|
248
|
+
config=config,
|
|
249
|
+
experiment_name="" if experiment is None else experiment.experiment_name,
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
|
|
230
253
|
def _record_imported_model(
|
|
231
254
|
run_id: str, family: str, suffix: str, model: SavedModel
|
|
232
255
|
) -> None:
|
|
@@ -104,6 +104,10 @@ class Experiment:
|
|
|
104
104
|
set_instance(None)
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
def active_experiment() -> Experiment | None:
|
|
108
|
+
return _SINGLETON_EXPERIMENT
|
|
109
|
+
|
|
110
|
+
|
|
107
111
|
def set_instance(instance: Experiment | None) -> None:
|
|
108
112
|
global _SINGLETON_EXPERIMENT
|
|
109
113
|
_SINGLETON_EXPERIMENT = instance
|
|
@@ -220,6 +220,7 @@ def deploy_model(
|
|
|
220
220
|
wait: bool = False,
|
|
221
221
|
timeout: float | None = 300.0,
|
|
222
222
|
config: DeploymentConfig | None = None,
|
|
223
|
+
experiment_name: str = "",
|
|
223
224
|
) -> Deployment:
|
|
224
225
|
"""Schedule a Ray Serve app for a previously-saved model and return a
|
|
225
226
|
handle carrying its base URL. The caller (e.g. model-gateway) builds
|
|
@@ -298,6 +299,7 @@ def deploy_model(
|
|
|
298
299
|
"spec": spec,
|
|
299
300
|
"tiers": tiers,
|
|
300
301
|
"url": url,
|
|
302
|
+
"experiment_name": experiment_name,
|
|
301
303
|
**observation,
|
|
302
304
|
},
|
|
303
305
|
)
|
|
@@ -314,6 +316,7 @@ def deploy_model(
|
|
|
314
316
|
phase=observation["phase"],
|
|
315
317
|
bundle_fingerprint=meta.fingerprint,
|
|
316
318
|
replaced_bundle_fingerprint=observation["replaced_bundle_fingerprint"],
|
|
319
|
+
experiment_name=experiment_name,
|
|
317
320
|
)
|
|
318
321
|
|
|
319
322
|
|
|
@@ -327,6 +330,7 @@ def redeploy_model(key: DeploymentKey) -> Deployment:
|
|
|
327
330
|
key.run_name,
|
|
328
331
|
num_replicas=replica_count_in_spec(record["spec"]),
|
|
329
332
|
config=record["config"],
|
|
333
|
+
experiment_name=record["experiment_name"],
|
|
330
334
|
)
|
|
331
335
|
|
|
332
336
|
|
|
@@ -56,6 +56,7 @@ class Deployment:
|
|
|
56
56
|
phase: str
|
|
57
57
|
bundle_fingerprint: str
|
|
58
58
|
replaced_bundle_fingerprint: str
|
|
59
|
+
experiment_name: str
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
def replaced_bundle_fingerprint_until_rolled_out(
|
|
@@ -82,6 +83,7 @@ def deployment_of_record(record: DeploymentRecord) -> Deployment:
|
|
|
82
83
|
phase=record["phase"],
|
|
83
84
|
bundle_fingerprint=bundle_fingerprint_in_spec(record["spec"]),
|
|
84
85
|
replaced_bundle_fingerprint=record["replaced_bundle_fingerprint"],
|
|
86
|
+
experiment_name=record["experiment_name"],
|
|
85
87
|
)
|
|
86
88
|
|
|
87
89
|
|
|
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
|