frogml-core 0.0.113__py3-none-any.whl → 0.0.115__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.
Files changed (137) hide show
  1. frogml_core/__init__.py +1 -1
  2. frogml_core/clients/administration/authentication/client.py +2 -2
  3. frogml_core/clients/batch_job_management/client.py +4 -4
  4. frogml_core/clients/build_orchestrator/build_model_request_getter.py +6 -6
  5. frogml_core/clients/build_orchestrator/client.py +12 -12
  6. frogml_core/clients/build_orchestrator/internal_client.py +10 -10
  7. frogml_core/frogml_client/build_api_helpers/build_api_steps.py +3 -3
  8. frogml_core/inner/build_logic/constants/upload_tag.py +7 -7
  9. frogml_core/inner/build_logic/interface/context_interface.py +1 -1
  10. frogml_core/inner/build_logic/phases/phase_010_fetch_model/fetch_strategy_manager/strategy/strategy.py +4 -4
  11. frogml_core/inner/build_logic/phases/phase_010_fetch_model/set_version_step.py +3 -3
  12. frogml_core/inner/build_logic/phases/phase_020_remote_register_frogml_build/start_remote_build_step.py +3 -3
  13. frogml_core/inner/build_logic/phases/phase_020_remote_register_frogml_build/upload_step.py +11 -9
  14. frogml_core/inner/build_logic/tools/ignore_files.py +3 -3
  15. frogml_core/inner/di_configuration/__init__.py +0 -6
  16. frogml_core/model/adapters/__init__.py +1 -1
  17. frogml_core/model/analytics_logging.py +1 -1
  18. frogml_core/model/tools/adapters/input.py +6 -6
  19. frogml_core/model/tools/adapters/output.py +8 -8
  20. frogml_core/model/tools/run_model_locally.py +2 -2
  21. frogml_core/model/utils/feature_utils.py +1 -1
  22. {frogml_core-0.0.113.dist-info → frogml_core-0.0.115.dist-info}/METADATA +1 -1
  23. {frogml_core-0.0.113.dist-info → frogml_core-0.0.115.dist-info}/RECORD +30 -137
  24. frogml_services_mock/mocks/analytics_api.py +6 -6
  25. frogml_services_mock/mocks/ecosystem_service_api.py +2 -2
  26. frogml_services_mock/mocks/frogml_mocks.py +0 -11
  27. frogml_services_mock/services_mock.py +4 -52
  28. frogml_storage/__init__.py +1 -1
  29. frogml_core/clients/prompt_manager/__init__.py +0 -0
  30. frogml_core/clients/prompt_manager/model_descriptor_mapper.py +0 -196
  31. frogml_core/clients/prompt_manager/prompt_manager_client.py +0 -190
  32. frogml_core/clients/prompt_manager/prompt_proto_mapper.py +0 -264
  33. frogml_core/clients/vector_store/__init__.py +0 -2
  34. frogml_core/clients/vector_store/management_client.py +0 -127
  35. frogml_core/clients/vector_store/serving_client.py +0 -157
  36. frogml_core/clients/workspace_manager/__init__.py +0 -1
  37. frogml_core/clients/workspace_manager/client.py +0 -224
  38. frogml_core/llmops/__init__.py +0 -0
  39. frogml_core/llmops/generation/__init__.py +0 -0
  40. frogml_core/llmops/generation/_steaming.py +0 -78
  41. frogml_core/llmops/generation/base.py +0 -5
  42. frogml_core/llmops/generation/chat/__init__.py +0 -0
  43. frogml_core/llmops/generation/chat/openai/LICENSE.txt +0 -201
  44. frogml_core/llmops/generation/chat/openai/types/__init__.py +0 -0
  45. frogml_core/llmops/generation/chat/openai/types/chat/__init__.py +0 -0
  46. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion.py +0 -88
  47. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_assistant_message_param.py +0 -65
  48. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_chunk.py +0 -153
  49. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_content_part_text_param.py +0 -28
  50. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_function_call_option_param.py +0 -25
  51. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_function_message_param.py +0 -33
  52. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_message.py +0 -56
  53. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_message_param.py +0 -34
  54. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_message_tool_call.py +0 -46
  55. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_message_tool_call_param.py +0 -44
  56. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_named_tool_choice_param.py +0 -32
  57. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_role.py +0 -20
  58. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_system_message_param.py +0 -35
  59. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_token_logprob.py +0 -71
  60. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_tool_choice_option_param.py +0 -28
  61. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_tool_message_param.py +0 -31
  62. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_tool_param.py +0 -29
  63. frogml_core/llmops/generation/chat/openai/types/chat/chat_completion_user_message_param.py +0 -35
  64. frogml_core/llmops/generation/chat/openai/types/chat/completion_create_params.py +0 -279
  65. frogml_core/llmops/generation/chat/openai/types/completion_choice.py +0 -47
  66. frogml_core/llmops/generation/chat/openai/types/completion_create_params.py +0 -209
  67. frogml_core/llmops/generation/chat/openai/types/completion_usage.py +0 -30
  68. frogml_core/llmops/generation/chat/openai/types/model.py +0 -35
  69. frogml_core/llmops/generation/chat/openai/types/shared/__init__.py +0 -3
  70. frogml_core/llmops/generation/chat/openai/types/shared/error_object.py +0 -27
  71. frogml_core/llmops/generation/chat/openai/types/shared/function_definition.py +0 -49
  72. frogml_core/llmops/generation/chat/openai/types/shared/function_parameters.py +0 -20
  73. frogml_core/llmops/generation/chat/openai/types/shared_params/__init__.py +0 -2
  74. frogml_core/llmops/generation/chat/openai/types/shared_params/function_definition.py +0 -49
  75. frogml_core/llmops/generation/chat/openai/types/shared_params/function_parameters.py +0 -22
  76. frogml_core/llmops/generation/streaming.py +0 -26
  77. frogml_core/llmops/model/__init__.py +0 -0
  78. frogml_core/llmops/model/descriptor.py +0 -40
  79. frogml_core/llmops/prompt/__init__.py +0 -0
  80. frogml_core/llmops/prompt/base.py +0 -136
  81. frogml_core/llmops/prompt/chat/__init__.py +0 -0
  82. frogml_core/llmops/prompt/chat/message.py +0 -24
  83. frogml_core/llmops/prompt/chat/template.py +0 -113
  84. frogml_core/llmops/prompt/chat/value.py +0 -10
  85. frogml_core/llmops/prompt/manager.py +0 -138
  86. frogml_core/llmops/prompt/template.py +0 -24
  87. frogml_core/llmops/prompt/value.py +0 -14
  88. frogml_core/llmops/provider/__init__.py +0 -0
  89. frogml_core/llmops/provider/chat.py +0 -44
  90. frogml_core/llmops/provider/openai/__init__.py +0 -0
  91. frogml_core/llmops/provider/openai/client.py +0 -126
  92. frogml_core/llmops/provider/openai/provider.py +0 -93
  93. frogml_core/vector_store/__init__.py +0 -4
  94. frogml_core/vector_store/client.py +0 -151
  95. frogml_core/vector_store/collection.py +0 -429
  96. frogml_core/vector_store/filters.py +0 -359
  97. frogml_core/vector_store/inference_client.py +0 -105
  98. frogml_core/vector_store/rest_helpers.py +0 -81
  99. frogml_core/vector_store/utils/__init__.py +0 -0
  100. frogml_core/vector_store/utils/filter_utils.py +0 -23
  101. frogml_core/vector_store/utils/upsert_utils.py +0 -218
  102. frogml_proto/qwak/prompt/v1/prompt/prompt_manager_service_pb2.py +0 -77
  103. frogml_proto/qwak/prompt/v1/prompt/prompt_manager_service_pb2.pyi +0 -417
  104. frogml_proto/qwak/prompt/v1/prompt/prompt_manager_service_pb2_grpc.py +0 -441
  105. frogml_proto/qwak/prompt/v1/prompt/prompt_pb2.py +0 -69
  106. frogml_proto/qwak/prompt/v1/prompt/prompt_pb2.pyi +0 -415
  107. frogml_proto/qwak/prompt/v1/prompt/prompt_pb2_grpc.py +0 -4
  108. frogml_proto/qwak/vectors/v1/collection/collection_pb2.py +0 -46
  109. frogml_proto/qwak/vectors/v1/collection/collection_pb2.pyi +0 -287
  110. frogml_proto/qwak/vectors/v1/collection/collection_pb2_grpc.py +0 -4
  111. frogml_proto/qwak/vectors/v1/collection/collection_service_pb2.py +0 -60
  112. frogml_proto/qwak/vectors/v1/collection/collection_service_pb2.pyi +0 -258
  113. frogml_proto/qwak/vectors/v1/collection/collection_service_pb2_grpc.py +0 -304
  114. frogml_proto/qwak/vectors/v1/collection/event/collection_event_pb2.py +0 -28
  115. frogml_proto/qwak/vectors/v1/collection/event/collection_event_pb2.pyi +0 -41
  116. frogml_proto/qwak/vectors/v1/collection/event/collection_event_pb2_grpc.py +0 -4
  117. frogml_proto/qwak/vectors/v1/filters_pb2.py +0 -52
  118. frogml_proto/qwak/vectors/v1/filters_pb2.pyi +0 -297
  119. frogml_proto/qwak/vectors/v1/filters_pb2_grpc.py +0 -4
  120. frogml_proto/qwak/vectors/v1/vector_pb2.py +0 -38
  121. frogml_proto/qwak/vectors/v1/vector_pb2.pyi +0 -142
  122. frogml_proto/qwak/vectors/v1/vector_pb2_grpc.py +0 -4
  123. frogml_proto/qwak/vectors/v1/vector_service_pb2.py +0 -53
  124. frogml_proto/qwak/vectors/v1/vector_service_pb2.pyi +0 -243
  125. frogml_proto/qwak/vectors/v1/vector_service_pb2_grpc.py +0 -201
  126. frogml_proto/qwak/workspace/workspace_pb2.py +0 -50
  127. frogml_proto/qwak/workspace/workspace_pb2.pyi +0 -331
  128. frogml_proto/qwak/workspace/workspace_pb2_grpc.py +0 -4
  129. frogml_proto/qwak/workspace/workspace_service_pb2.py +0 -84
  130. frogml_proto/qwak/workspace/workspace_service_pb2.pyi +0 -393
  131. frogml_proto/qwak/workspace/workspace_service_pb2_grpc.py +0 -507
  132. frogml_services_mock/mocks/prompt_manager_service.py +0 -281
  133. frogml_services_mock/mocks/vector_serving_api.py +0 -159
  134. frogml_services_mock/mocks/vectors_management_api.py +0 -97
  135. frogml_services_mock/mocks/workspace_manager_service_mock.py +0 -202
  136. /frogml_core/model/adapters/output_adapters/{qwak_with_default_fallback.py → frogml_with_default_fallback.py} +0 -0
  137. {frogml_core-0.0.113.dist-info → frogml_core-0.0.115.dist-info}/WHEEL +0 -0
@@ -1,202 +0,0 @@
1
- import logging
2
- import uuid
3
- from dataclasses import dataclass
4
-
5
- import grpc
6
-
7
- from frogml_proto.qwak.user_application.common.v0.resources_pb2 import (
8
- ClientPodComputeResources,
9
- PodComputeResourceTemplateSpec,
10
- )
11
- from frogml_proto.qwak.workspace.workspace_pb2 import (
12
- DefaultWorkspaceDetails,
13
- Workspace,
14
- WorkspaceImage,
15
- )
16
- from frogml_proto.qwak.workspace.workspace_service_pb2 import (
17
- CountWorkspacesRequest,
18
- CountWorkspacesResponse,
19
- CreateWorkspaceResponse,
20
- DeleteWorkspaceResponse,
21
- GetDefaultWorkspaceValuesRequest,
22
- GetDefaultWorkspaceValuesResponse,
23
- GetWorkspaceByIdResponse,
24
- ListWorkspaceImagesResponse,
25
- ListWorkspacesResponse,
26
- UpdateWorkspaceResponse,
27
- )
28
- from frogml_proto.qwak.workspace.workspace_service_pb2_grpc import (
29
- WorkspaceManagementServiceServicer,
30
- )
31
-
32
- logger = logging.getLogger(__name__)
33
-
34
- DEFAULT_CPU_IMAGE = "1"
35
- DEFAULT_GPU_IMAGE = "3"
36
- DEFAULT_CPU_INSTANCE = "small"
37
- DEFAULT_GPU_INSTANCE = "g5_xlarge"
38
-
39
-
40
- @dataclass
41
- class WorkspaceData:
42
- id: str
43
- workspace_name: str
44
- image_id: str
45
- template_id: str
46
- status: str
47
-
48
-
49
- class WorkspaceManagerServiceMock(WorkspaceManagementServiceServicer):
50
- def __init__(self):
51
- super(WorkspaceManagerServiceMock, self).__init__()
52
- self.workspaces = dict()
53
- self.image_ids_to_names = {
54
- "1": "cpu_3.7",
55
- "2": "cpu_3.8",
56
- "3": "gpu_3.7",
57
- "4": "gpu_3.8",
58
- }
59
-
60
- def CreateWorkspace(self, request, context):
61
- logger.info(f"Creating workspace {request}")
62
- workspace_id = self._get_workspace_id()
63
- self.workspaces[workspace_id] = WorkspaceData(
64
- id=workspace_id,
65
- workspace_name=request.workspace_spec.workspace_name,
66
- image_id=request.workspace_spec.image_id,
67
- template_id=request.workspace_spec.client_pod_compute_resources.template_spec.template_id,
68
- status="CREATED",
69
- )
70
- return CreateWorkspaceResponse(workspace_id=workspace_id)
71
-
72
- def UpdateWorkspace(self, request, context):
73
- logger.info(f"Updating workspace {request}")
74
- if request.workspace_id not in self.workspaces:
75
- context.set_code(grpc.StatusCode.NOT_FOUND)
76
- context.set_details("Received a non existing workspace id")
77
- return UpdateWorkspaceResponse()
78
- self.workspaces[request.workspace_id] = WorkspaceData(
79
- id=request.workspace_id,
80
- workspace_name=request.workspace_spec.workspace_name,
81
- image_id=request.workspace_spec.image_id,
82
- template_id=request.workspace_spec.client_pod_compute_resources.template_spec.template_id,
83
- status="CREATED",
84
- )
85
- return UpdateWorkspaceResponse()
86
-
87
- def DeleteWorkspace(self, request, context):
88
- logger.info(f"delete workspace request: {request}")
89
- if request.workspace_id not in self.workspaces:
90
- context.set_code(grpc.StatusCode.NOT_FOUND)
91
- context.set_details("Received a non existing workspace id")
92
- return UpdateWorkspaceResponse()
93
- del self.workspaces[request.workspace_id]
94
- return DeleteWorkspaceResponse()
95
-
96
- def GetWorkspaceById(self, request, context):
97
- logger.info(f"get workspace by id request: {request}")
98
- if request.workspace_id not in self.workspaces:
99
- context.set_code(grpc.StatusCode.NOT_FOUND)
100
- context.set_details("Received a non existing workspace id")
101
- return UpdateWorkspaceResponse()
102
-
103
- return GetWorkspaceByIdResponse(
104
- workspace=Workspace(
105
- workspace_id=request.workspace_id,
106
- workspace_name=self.workspaces[request.workspace_id].workspace_name,
107
- image_id=self.workspaces[request.workspace_id].image_id,
108
- client_pod_compute_resources=ClientPodComputeResources(
109
- template_spec=PodComputeResourceTemplateSpec(
110
- template_id=self.workspaces[request.workspace_id].template_id
111
- )
112
- ),
113
- )
114
- )
115
-
116
- def ListWorkspaces(self, request, context):
117
- logger.info(f"list workspaces: {request}")
118
- return ListWorkspacesResponse(
119
- workspaces=[
120
- Workspace(
121
- workspace_id=workspace_id,
122
- workspace_name=workspace.workspace_name,
123
- image_id=workspace.image_id,
124
- client_pod_compute_resources=ClientPodComputeResources(
125
- template_spec=PodComputeResourceTemplateSpec(
126
- template_id=workspace.template_id
127
- )
128
- ),
129
- )
130
- for workspace_id, workspace in self.workspaces.items()
131
- ]
132
- )
133
-
134
- def DeployWorkspace(self, request, context):
135
- logger.info(f"Deploying workspace {request}")
136
- if request.workspace_id not in self.workspaces:
137
- context.set_code(grpc.StatusCode.NOT_FOUND)
138
- context.set_details("Received a non existing workspace id")
139
- return UpdateWorkspaceResponse()
140
-
141
- current_workspace = self.workspaces[request.workspace_id]
142
- self.workspaces[request.workspace_id] = WorkspaceData(
143
- id=request.workspace_id,
144
- workspace_name=current_workspace.workspace_name,
145
- image_id=current_workspace.image_id,
146
- template_id=current_workspace.template_id,
147
- status="DEPLOYING",
148
- )
149
- return UpdateWorkspaceResponse()
150
-
151
- def UndeployWorkspace(self, request, context):
152
- logger.info(f"Undeploying workspace {request}")
153
- if request.workspace_id not in self.workspaces:
154
- context.set_code(grpc.StatusCode.NOT_FOUND)
155
- context.set_details("Received a non existing workspace id")
156
- return UpdateWorkspaceResponse()
157
-
158
- current_workspace = self.workspaces[request.workspace_id]
159
- self.workspaces[request.workspace_id] = WorkspaceData(
160
- id=request.workspace_id,
161
- workspace_name=current_workspace.workspace_name,
162
- image_id=current_workspace.image_id,
163
- template_id=current_workspace.template_id,
164
- status="UNDEPLOYING",
165
- )
166
- return UpdateWorkspaceResponse()
167
-
168
- def ListWorkspaceImages(self, request, context):
169
- logger.info("List workspace images")
170
- workspace_images = []
171
- for k, v in self.image_ids_to_names.items():
172
- workspace_images.append(WorkspaceImage(name=v, id=k))
173
- return ListWorkspaceImagesResponse(workspace_images=workspace_images)
174
-
175
- def CountWorkspaces(
176
- self, request: CountWorkspacesRequest, context
177
- ) -> CountWorkspacesResponse:
178
- return CountWorkspacesResponse(count=len(self.workspaces))
179
-
180
- def GetDefaultWorkspaceValues(
181
- self, request: GetDefaultWorkspaceValuesRequest, context
182
- ) -> GetDefaultWorkspaceValuesResponse:
183
- return GetDefaultWorkspaceValuesResponse(
184
- default_workspace_details=DefaultWorkspaceDetails(
185
- cpu_image_id=DEFAULT_CPU_IMAGE,
186
- gpu_image_id=DEFAULT_GPU_IMAGE,
187
- cpu_compute_resources=ClientPodComputeResources(
188
- template_spec=PodComputeResourceTemplateSpec(
189
- template_id=DEFAULT_CPU_INSTANCE
190
- )
191
- ),
192
- gpu_compute_resources=ClientPodComputeResources(
193
- template_spec=PodComputeResourceTemplateSpec(
194
- template_id=DEFAULT_GPU_INSTANCE
195
- )
196
- ),
197
- )
198
- )
199
-
200
- @staticmethod
201
- def _get_workspace_id():
202
- return str(uuid.uuid4())