matrice-compute 0.1.16__tar.gz → 0.1.18__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.
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/PKG-INFO +1 -1
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/PKG-INFO +1 -1
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/action_instance.py +75 -6
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/scaling.py +3 -3
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/LICENSE.txt +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/README.md +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/SOURCES.txt +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/dependency_links.txt +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/not-zip-safe +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/top_level.txt +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/pyproject.toml +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/setup.cfg +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/setup.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/__init__.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/actions_manager.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/actions_scaledown_manager.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/instance_manager.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/instance_utils.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/prechecks.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/py.typed +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/resources_tracker.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/shutdown_manager.py +0 -0
- {matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/task_utils.py +0 -0
|
@@ -75,7 +75,9 @@ class ActionInstance:
|
|
|
75
75
|
"facial_recognition_setup": facial_recognition_setup_execute,
|
|
76
76
|
"fe_fs_streaming": fe_fs_streaming_execute,
|
|
77
77
|
"inference_ws_server": inference_ws_server_execute,
|
|
78
|
-
"
|
|
78
|
+
"fe_analytics_service": fe_analytics_service_execute,
|
|
79
|
+
"lpr_setup": lpr_setup_execute,
|
|
80
|
+
"inference_tracker_server": inference_tracker_setup_execute
|
|
79
81
|
}
|
|
80
82
|
if self.action_type not in self.actions_map:
|
|
81
83
|
raise ValueError(f"Unknown action type: {self.action_type}")
|
|
@@ -471,11 +473,12 @@ class ActionInstance:
|
|
|
471
473
|
# Try to get model codebase URLs from action_details first
|
|
472
474
|
model_codebase_url = job_params.get("model_codebase_url")
|
|
473
475
|
model_requirements_url = job_params.get("model_requirements_url")
|
|
476
|
+
dockerId = job_params.get("_idDocker")
|
|
474
477
|
|
|
475
478
|
# Fallback to API calls if not provided in action_details
|
|
476
479
|
if not model_codebase_url:
|
|
477
480
|
model_codebase_url, error, message = self.scaling.get_model_codebase(
|
|
478
|
-
|
|
481
|
+
dockerId
|
|
479
482
|
)
|
|
480
483
|
if error:
|
|
481
484
|
logging.warning(f"Failed to get model codebase URL: {message}")
|
|
@@ -486,7 +489,7 @@ class ActionInstance:
|
|
|
486
489
|
model_codebase_requirements_url = model_requirements_url
|
|
487
490
|
else:
|
|
488
491
|
model_codebase_requirements_url, error, message = (
|
|
489
|
-
self.scaling.get_model_codebase_requirements(
|
|
492
|
+
self.scaling.get_model_codebase_requirements(dockerId)
|
|
490
493
|
)
|
|
491
494
|
if error:
|
|
492
495
|
logging.warning(
|
|
@@ -1173,7 +1176,7 @@ def inference_ws_server_execute(self: ActionInstance):
|
|
|
1173
1176
|
def fe_fs_streaming_execute(self: ActionInstance):
|
|
1174
1177
|
"""
|
|
1175
1178
|
Creates and setup the frontend for fs streaming.
|
|
1176
|
-
Frontend streaming runs on port
|
|
1179
|
+
Frontend streaming runs on port 3000 (localhost only with --net=host).
|
|
1177
1180
|
"""
|
|
1178
1181
|
action_details = self.get_action_details()
|
|
1179
1182
|
|
|
@@ -1183,7 +1186,7 @@ def fe_fs_streaming_execute(self: ActionInstance):
|
|
|
1183
1186
|
|
|
1184
1187
|
self.setup_action_requirements(action_details)
|
|
1185
1188
|
|
|
1186
|
-
# Frontend streaming with --net=host (Port:
|
|
1189
|
+
# Frontend streaming with --net=host (Port: 3000)
|
|
1187
1190
|
worker_cmd = (
|
|
1188
1191
|
f"docker run -d --pull=always --net=host "
|
|
1189
1192
|
f"--name fe_streaming "
|
|
@@ -1191,14 +1194,49 @@ def fe_fs_streaming_execute(self: ActionInstance):
|
|
|
1191
1194
|
f'-e ENV="{os.environ.get("ENV", "prod")}" '
|
|
1192
1195
|
f'-e MATRICE_SECRET_ACCESS_KEY="{self.matrice_secret_access_key}" '
|
|
1193
1196
|
f'-e MATRICE_ACCESS_KEY_ID="{self.matrice_access_key_id}" '
|
|
1197
|
+
f"-e PORT=3000 "
|
|
1194
1198
|
f"{image}"
|
|
1195
1199
|
)
|
|
1196
|
-
logging.info("Starting frontend streaming (Port:
|
|
1200
|
+
logging.info("Starting frontend streaming (Port: 3000): %s", worker_cmd)
|
|
1197
1201
|
|
|
1198
1202
|
# Docker Command run
|
|
1199
1203
|
self.start(worker_cmd, "fe_fs_streaming")
|
|
1200
1204
|
|
|
1201
1205
|
|
|
1206
|
+
@log_errors(raise_exception=False)
|
|
1207
|
+
def fe_analytics_service_execute(self: ActionInstance):
|
|
1208
|
+
"""
|
|
1209
|
+
Creates and setup the frontend analytics service.
|
|
1210
|
+
Frontend analytics service runs on port 3001 (localhost only with --net=host).
|
|
1211
|
+
"""
|
|
1212
|
+
action_details = self.get_action_details()
|
|
1213
|
+
|
|
1214
|
+
if not action_details:
|
|
1215
|
+
return
|
|
1216
|
+
image = action_details["actionDetails"].get("docker")
|
|
1217
|
+
|
|
1218
|
+
self.setup_action_requirements(action_details)
|
|
1219
|
+
|
|
1220
|
+
project_id = action_details["_idProject"]
|
|
1221
|
+
|
|
1222
|
+
# Frontend analytics service with --net=host (Port: 3001)
|
|
1223
|
+
worker_cmd = (
|
|
1224
|
+
f"docker run -d --pull=always --net=host "
|
|
1225
|
+
f"--name fe-analytics "
|
|
1226
|
+
f'-e NEXT_PUBLIC_DEPLOYMENT_ENV="{os.environ.get("ENV", "prod")}" '
|
|
1227
|
+
f'-e MATRICE_SECRET_ACCESS_KEY="{self.matrice_secret_access_key}" '
|
|
1228
|
+
f'-e MATRICE_ACCESS_KEY_ID="{self.matrice_access_key_id}" '
|
|
1229
|
+
f'-e ACTION_ID="{self.action_record_id}" '
|
|
1230
|
+
f"-e PORT=3001 "
|
|
1231
|
+
f'-e PROJECT_ID="{project_id}" '
|
|
1232
|
+
f"{image}"
|
|
1233
|
+
)
|
|
1234
|
+
logging.info("Starting frontend analytics service (Port: 3001): %s", worker_cmd)
|
|
1235
|
+
|
|
1236
|
+
# Docker Command run
|
|
1237
|
+
self.start(worker_cmd, "fe_analytics_service")
|
|
1238
|
+
|
|
1239
|
+
|
|
1202
1240
|
@log_errors(raise_exception=False)
|
|
1203
1241
|
def synthetic_dataset_generation_execute(self: ActionInstance):
|
|
1204
1242
|
"""Execute synthetic dataset generation task."""
|
|
@@ -1571,3 +1609,34 @@ def kafka_setup_execute(self: ActionInstance):
|
|
|
1571
1609
|
|
|
1572
1610
|
logging.info("Starting Kafka container (Ports: 9092, 9093): %s", cmd)
|
|
1573
1611
|
self.start(cmd, "kafka_setup")
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
@log_errors(raise_exception=False)
|
|
1615
|
+
def inference_tracker_setup_execute(self: ActionInstance):
|
|
1616
|
+
|
|
1617
|
+
"""
|
|
1618
|
+
Creates and start inference tracker.
|
|
1619
|
+
Inference tracker runs on port 8110 (localhost only with --net=host).
|
|
1620
|
+
"""
|
|
1621
|
+
|
|
1622
|
+
action_details = self.get_action_details()
|
|
1623
|
+
if not action_details:
|
|
1624
|
+
return
|
|
1625
|
+
|
|
1626
|
+
image = self.docker_container
|
|
1627
|
+
|
|
1628
|
+
self.setup_action_requirements(action_details)
|
|
1629
|
+
|
|
1630
|
+
# This is the existing Docker run command
|
|
1631
|
+
worker_cmd = (
|
|
1632
|
+
f"docker run -d --pull=always --net=host "
|
|
1633
|
+
f"--name inference-tracker-worker "
|
|
1634
|
+
f"-v matrice_myvol:/matrice_data "
|
|
1635
|
+
f'-e ENV="{os.environ.get("ENV", "prod")}" '
|
|
1636
|
+
f'-e MATRICE_SECRET_ACCESS_KEY="{self.matrice_secret_access_key}" '
|
|
1637
|
+
f'-e MATRICE_ACCESS_KEY_ID="{self.matrice_access_key_id}" '
|
|
1638
|
+
f'-e ACTION_ID="{self.action_record_id}" '
|
|
1639
|
+
f"{image}"
|
|
1640
|
+
)
|
|
1641
|
+
|
|
1642
|
+
self.start(worker_cmd, "inference_tracker_setup")
|
|
@@ -674,16 +674,16 @@ class Scaling:
|
|
|
674
674
|
)
|
|
675
675
|
|
|
676
676
|
@log_errors(log_error=True)
|
|
677
|
-
def get_model_codebase_requirements(self,
|
|
677
|
+
def get_model_codebase_requirements(self, dockerId):
|
|
678
678
|
"""Get model codebase requirements.
|
|
679
679
|
|
|
680
680
|
Args:
|
|
681
|
-
|
|
681
|
+
dockerId: ID of the docker
|
|
682
682
|
|
|
683
683
|
Returns:
|
|
684
684
|
Tuple of (data, error, message) from API response
|
|
685
685
|
"""
|
|
686
|
-
path = f"/v1/model_store/get_user_requirements_download_path/{
|
|
686
|
+
path = f"/v1/model_store/get_user_requirements_download_path/{dockerId}"
|
|
687
687
|
resp = self.rpc.get(path=path)
|
|
688
688
|
return self.handle_response(
|
|
689
689
|
resp,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{matrice_compute-0.1.16 → matrice_compute-0.1.18}/matrice_compute.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{matrice_compute-0.1.16 → matrice_compute-0.1.18}/src/matrice_compute/actions_scaledown_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|