frogml-core 0.0.97__py3-none-any.whl → 0.0.98__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.
- frogml_core/__init__.py +1 -1
- frogml_core/clients/batch_job_management/client.py +39 -0
- {frogml_core-0.0.97.dist-info → frogml_core-0.0.98.dist-info}/METADATA +1 -1
- {frogml_core-0.0.97.dist-info → frogml_core-0.0.98.dist-info}/RECORD +7 -7
- frogml_services_mock/mocks/batch_job_manager_service.py +23 -0
- frogml_storage/__init__.py +1 -1
- {frogml_core-0.0.97.dist-info → frogml_core-0.0.98.dist-info}/WHEEL +0 -0
frogml_core/__init__.py
CHANGED
@@ -36,6 +36,10 @@ from frogml_proto.qwak.batch_job.v1.batch_job_service_pb2 import (
|
|
36
36
|
StartBatchJobResponse,
|
37
37
|
StartWarmupJobRequest,
|
38
38
|
StartWarmupJobResponse,
|
39
|
+
UpdateTasksDetailsResponse,
|
40
|
+
UpdateTasksDetailsRequest,
|
41
|
+
BatchTaskDetails,
|
42
|
+
InputFileDetails,
|
39
43
|
)
|
40
44
|
from frogml_proto.qwak.batch_job.v1.batch_job_service_pb2_grpc import (
|
41
45
|
BatchJobManagementServiceStub,
|
@@ -67,6 +71,7 @@ from .results import (
|
|
67
71
|
GetExecutionReportResult,
|
68
72
|
StartExecutionResult,
|
69
73
|
)
|
74
|
+
from typing import List
|
70
75
|
|
71
76
|
CLIENT_TIMEOUT = 180 # Seconds
|
72
77
|
|
@@ -542,3 +547,37 @@ class BatchJobManagerClient:
|
|
542
547
|
|
543
548
|
except grpc.RpcError as e:
|
544
549
|
raise FrogmlException(f"Failed to get batch job details, error is: {e}")
|
550
|
+
|
551
|
+
def update_task_details(self, task_id: str, input_file_paths: List[str]):
|
552
|
+
"""
|
553
|
+
Update task details for a specific task using the provided list of input file paths.
|
554
|
+
|
555
|
+
Args:
|
556
|
+
task_id: The ID of the task to update.
|
557
|
+
input_file_paths: A list of paths for the input files associated with the task.
|
558
|
+
"""
|
559
|
+
# Create InputFileDetails messages for each input file path
|
560
|
+
input_files_details = [
|
561
|
+
InputFileDetails(path=file_path) for file_path in input_file_paths
|
562
|
+
]
|
563
|
+
|
564
|
+
# Create BatchTaskDetails message for the single task
|
565
|
+
batch_task_details = BatchTaskDetails(
|
566
|
+
task_id=task_id, input_files_details=input_files_details
|
567
|
+
)
|
568
|
+
|
569
|
+
update_request = UpdateTasksDetailsRequest(
|
570
|
+
tasks_details=[batch_task_details] # Wrap in a list
|
571
|
+
)
|
572
|
+
|
573
|
+
try:
|
574
|
+
response: UpdateTasksDetailsResponse = (
|
575
|
+
self.batch_job_management.UpdateTasksDetails(
|
576
|
+
update_request, timeout=CLIENT_TIMEOUT
|
577
|
+
)
|
578
|
+
)
|
579
|
+
return response
|
580
|
+
except grpc.RpcError as e:
|
581
|
+
raise FrogmlException(
|
582
|
+
f"Failed to update task details for task '{task_id}', error is: {e}"
|
583
|
+
)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
frogml_core/__init__.py,sha256=
|
1
|
+
frogml_core/__init__.py,sha256=h96JpLfFmHinl3ED_VUGsGl6xZ45EEHe_VrqZdsUsGk,777
|
2
2
|
frogml_core/automations/__init__.py,sha256=j2gD15MN-xVWhI5rAFsDwhL0CIyICLNT0scXsKvNBkU,1547
|
3
3
|
frogml_core/automations/automation_executions.py,sha256=xpOb9Dq8gPPGNQDJTvBBZbNz4woZDRZY0HqnLSu7pwU,3230
|
4
4
|
frogml_core/automations/automations.py,sha256=GKEQyQMi8sxX5oZn62PaxPi0zD8IaJRjBkhczRJxHNs,13070
|
@@ -34,7 +34,7 @@ frogml_core/clients/automation_management/client.py,sha256=rG1tvdtKoSBCSG5IdzmSP
|
|
34
34
|
frogml_core/clients/autoscaling/__init__.py,sha256=A-zuZOWaZf16NjnpX38204m730c5Lde491KaXneGirE,38
|
35
35
|
frogml_core/clients/autoscaling/client.py,sha256=Izl_Ko31ECsVEadTcthru8GGujsHpwWN5E_VSCKiymM,1296
|
36
36
|
frogml_core/clients/batch_job_management/__init__.py,sha256=zywxYf2JupkIWnGVB2C6ugZs5CrOdxTPrksD5P6uQu4,211
|
37
|
-
frogml_core/clients/batch_job_management/client.py,sha256=
|
37
|
+
frogml_core/clients/batch_job_management/client.py,sha256=V8sqltMAsoHAoXHxXZsoLmY7L1XykbBvod1xyhCmHHA,22528
|
38
38
|
frogml_core/clients/batch_job_management/executions_config.py,sha256=eEbT_ldIEVtwe85oThJ-Jv3qFBIfvLpZ-w6aJCLlqlk,6910
|
39
39
|
frogml_core/clients/batch_job_management/results.py,sha256=nrFGZ3y538FBhej94CYV4cwqQssK1aUQOLGubYdQVrc,1846
|
40
40
|
frogml_core/clients/build_management/__init__.py,sha256=oXurHX6Kho5X-fOuuNHB3B9oMX6ejYUqh6GWv5qJyjw,43
|
@@ -1070,7 +1070,7 @@ frogml_services_mock/mocks/audience_service_api.py,sha256=x96adhF05NYqEtI8lJaf5l
|
|
1070
1070
|
frogml_services_mock/mocks/authentication_service.py,sha256=M3cVfnQ2XcxQAWZCm9uR9cAVu_0BahEP4BdymYQfihI,1180
|
1071
1071
|
frogml_services_mock/mocks/automation_management_service.py,sha256=-7kncqM3R-_pLmppzFpuv_TniXCVGVuESculVuQ3EbY,8238
|
1072
1072
|
frogml_services_mock/mocks/autoscaling_service_api.py,sha256=u3RkwHxACPFSk9DwhLFQSI7_ULoHN9uWFL-zyyo-sNw,1032
|
1073
|
-
frogml_services_mock/mocks/batch_job_manager_service.py,sha256=
|
1073
|
+
frogml_services_mock/mocks/batch_job_manager_service.py,sha256=AJNM5yJDD7fGRSeHoxC8AdGdx6iwwxUWXNhEFDcD3QE,14098
|
1074
1074
|
frogml_services_mock/mocks/build_management.py,sha256=IECGXfSEDOUhwMcHtI3pd9PF0aXqZL2R98gl3wS0joY,3697
|
1075
1075
|
frogml_services_mock/mocks/build_orchestrator_build_api.py,sha256=fnB6x7W_UWoOxkCm7AgtrRYJjjm1QCotkf-2hPGk75c,5026
|
1076
1076
|
frogml_services_mock/mocks/build_orchestrator_build_settings_api.py,sha256=5V15s2QUur4CPMNZPyXIIt_NJ2W_DwugfreMDA6WbfM,1394
|
@@ -1114,7 +1114,7 @@ frogml_services_mock/mocks/workspace_manager_service_mock.py,sha256=WbOiWgOyr-xT
|
|
1114
1114
|
frogml_services_mock/services_mock.py,sha256=sgKgwhu2W0YOHtzil8x7f1znK_sZr_i27XSeiF4xqVE,21200
|
1115
1115
|
frogml_services_mock/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1116
1116
|
frogml_services_mock/utils/service_utils.py,sha256=ZlB0CnB1J6oBn6_m7fQO2U8tKoboHdUa6ljjkRMYNXU,265
|
1117
|
-
frogml_storage/__init__.py,sha256=
|
1117
|
+
frogml_storage/__init__.py,sha256=R0_ti3PsltPx4mNjqmHCovLdHboKsuVdrODhlZ0ELGk,23
|
1118
1118
|
frogml_storage/_environment.py,sha256=zuzOJBtBwFaguwn_JkKjfhXStZoustgP30KzOP3mYv8,707
|
1119
1119
|
frogml_storage/artifactory/__init__.py,sha256=C02rcm7kqsZBVA6c6Gztxamj96hn8Aj6BuzYWFRmWbQ,71
|
1120
1120
|
frogml_storage/artifactory/_artifactory_api.py,sha256=Oz0HOpQPSNwWIVAy94UJUyPhLetc7sdZjoTfSXtrFug,11200
|
@@ -1153,6 +1153,6 @@ frogml_storage/utils/__init__.py,sha256=HQUWfuGUIPZY7kfS795TRW8BQ4WmNqrNjS7lUrbx
|
|
1153
1153
|
frogml_storage/utils/_input_checks_utility.py,sha256=CFiJOdTBS9piJMtR3lemEz27wZcQ6_-7XESu8iy-mrw,3221
|
1154
1154
|
frogml_storage/utils/_storage_utils.py,sha256=HB2g7uY5A3b33yIcAUM1OjHb5jWsnpESsiDrEviQwrI,366
|
1155
1155
|
frogml_storage/utils/_url_utils.py,sha256=NUEfz9Fp1iE8b676-A5wrMlSTsJVRKrUhcUItOFAJD8,821
|
1156
|
-
frogml_core-0.0.
|
1157
|
-
frogml_core-0.0.
|
1158
|
-
frogml_core-0.0.
|
1156
|
+
frogml_core-0.0.98.dist-info/METADATA,sha256=Y4p0fxi4Lb_4JeEKdpnF1zC-nNCae6nyrMYzuDthUA4,14975
|
1157
|
+
frogml_core-0.0.98.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
1158
|
+
frogml_core-0.0.98.dist-info/RECORD,,
|
@@ -38,6 +38,9 @@ from frogml_proto.qwak.batch_job.v1.batch_job_service_pb2 import (
|
|
38
38
|
StartWarmupJobRequest,
|
39
39
|
StartWarmupJobResponse,
|
40
40
|
TaskExecutionDetails,
|
41
|
+
UpdateTasksDetailsRequest,
|
42
|
+
UpdateTasksDetailsResponse,
|
43
|
+
BatchTaskDetails,
|
41
44
|
)
|
42
45
|
from frogml_proto.qwak.batch_job.v1.batch_job_service_pb2_grpc import (
|
43
46
|
BatchJobManagementServiceServicer,
|
@@ -54,6 +57,7 @@ class BatchJobManagerService(BatchJobManagementServiceServicer):
|
|
54
57
|
self.id_to_batch_job: Dict[str, MockBatchJob] = dict()
|
55
58
|
self.model_id_active_warmup: Set[str] = set()
|
56
59
|
self.models_to_fail: Set[str] = set()
|
60
|
+
self.task_id_to_update_task_details: Dict[str, BatchTaskDetails] = dict()
|
57
61
|
|
58
62
|
def StartBatchJob(
|
59
63
|
self, request: StartBatchJobRequest, context
|
@@ -268,6 +272,25 @@ class BatchJobManagerService(BatchJobManagementServiceServicer):
|
|
268
272
|
except Exception as e:
|
269
273
|
raise_internal_grpc_error(context, e)
|
270
274
|
|
275
|
+
def UpdateTasksDetails(
|
276
|
+
self, request: UpdateTasksDetailsRequest, context
|
277
|
+
) -> UpdateTasksDetailsResponse:
|
278
|
+
for task in request.tasks_details:
|
279
|
+
task_id = task.task_id
|
280
|
+
if not task_id :
|
281
|
+
raise ValueError("Task ID cannot be empty")
|
282
|
+
input_files = task.input_files_details
|
283
|
+
|
284
|
+
print(f"Updating task with ID: {task_id} and input files: {[file.path for file in input_files]}")
|
285
|
+
self.task_id_to_update_task_details[task_id] = task
|
286
|
+
return UpdateTasksDetailsResponse()
|
287
|
+
|
288
|
+
def get_task_details(self,task_id: str
|
289
|
+
) -> Optional[BatchTaskDetails]:
|
290
|
+
"""
|
291
|
+
Get task details by task ID
|
292
|
+
"""
|
293
|
+
return self.task_id_to_update_task_details[task_id]
|
271
294
|
|
272
295
|
class MockBatchJob:
|
273
296
|
def __init__(self, request: StartBatchJobRequest):
|
frogml_storage/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.98"
|
File without changes
|