qwak-core 0.4.278__py3-none-any.whl → 0.5.19__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 qwak-core might be problematic. Click here for more details.

Files changed (361) hide show
  1. _qwak_proto/jfml/hosting_gateway/v1/build_upload_url_pb2.py +8 -23
  2. _qwak_proto/jfml/hosting_gateway/v1/hosting_gateway_service_pb2.py +10 -27
  3. _qwak_proto/qwak/administration/account/v1/account_pb2.py +25 -88
  4. _qwak_proto/qwak/administration/account/v1/account_pb2.pyi +21 -2
  5. _qwak_proto/qwak/administration/account/v1/account_service_pb2.py +42 -187
  6. _qwak_proto/qwak/administration/account/v1/jfrog_tenant_details_pb2.py +26 -114
  7. _qwak_proto/qwak/administration/account/v1/personalization_pb2.py +8 -24
  8. _qwak_proto/qwak/administration/account/v1/preferences_pb2.py +6 -14
  9. _qwak_proto/qwak/administration/account/v1/terms_pb2.py +14 -54
  10. _qwak_proto/qwak/administration/authenticated_user/v1/authenticated_user_service_pb2.py +18 -67
  11. _qwak_proto/qwak/administration/authenticated_user/v1/credentials_pb2.py +8 -24
  12. _qwak_proto/qwak/administration/authenticated_user/v1/credentials_pb2.pyi +1 -1
  13. _qwak_proto/qwak/administration/authenticated_user/v1/details_pb2.py +14 -54
  14. _qwak_proto/qwak/administration/cluster/v2/cluster_pb2.py +38 -173
  15. _qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.py +32 -0
  16. _qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2.pyi +65 -0
  17. _qwak_proto/qwak/administration/runtime_configuration/v0/container_registry_config_pb2_grpc.py +4 -0
  18. _qwak_proto/qwak/administration/runtime_configuration/v0/creds/auth_pb2.py +6 -14
  19. _qwak_proto/qwak/administration/runtime_configuration/v0/creds/secret_pb2.py +8 -24
  20. _qwak_proto/qwak/administration/runtime_configuration/v0/data_catalog_config_pb2.py +13 -35
  21. _qwak_proto/qwak/administration/runtime_configuration/v0/data_catalog_config_pb2.pyi +24 -3
  22. _qwak_proto/qwak/administration/runtime_configuration/v0/external/databricks/auth_pb2.py +34 -0
  23. _qwak_proto/qwak/administration/runtime_configuration/v0/external/databricks/auth_pb2.pyi +97 -0
  24. _qwak_proto/qwak/administration/runtime_configuration/v0/external/databricks/auth_pb2_grpc.py +4 -0
  25. _qwak_proto/qwak/administration/runtime_configuration/v0/external/elasticsearch_config_pb2.py +6 -14
  26. _qwak_proto/qwak/administration/runtime_configuration/v0/external/kafka_config_pb2.py +12 -44
  27. _qwak_proto/qwak/administration/runtime_configuration/v0/external/prometheus_config_pb2.py +9 -15
  28. _qwak_proto/qwak/administration/runtime_configuration/v0/external/prometheus_config_pb2.pyi +29 -0
  29. _qwak_proto/qwak/administration/runtime_configuration/v0/external/redis_config_pb2.py +6 -14
  30. _qwak_proto/qwak/administration/runtime_configuration/v0/external/victoriametrics_config_pb2.py +8 -15
  31. _qwak_proto/qwak/administration/runtime_configuration/v0/external/victoriametrics_config_pb2.pyi +16 -0
  32. _qwak_proto/qwak/administration/runtime_configuration/v0/feature_store_config_pb2.py +10 -34
  33. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/aws/auth_pb2.py +42 -0
  34. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/aws/auth_pb2.pyi +159 -0
  35. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/aws/auth_pb2_grpc.py +4 -0
  36. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/azure/auth_pb2.py +39 -0
  37. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/azure/auth_pb2.pyi +126 -0
  38. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting/azure/auth_pb2_grpc.py +4 -0
  39. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting_config_pb2.py +19 -55
  40. _qwak_proto/qwak/administration/runtime_configuration/v0/hosting_config_pb2.pyi +38 -6
  41. _qwak_proto/qwak/administration/runtime_configuration/v0/logs_storage_config_pb2.py +6 -14
  42. _qwak_proto/qwak/administration/runtime_configuration/v0/model_analytics_storage_config_pb2.py +6 -14
  43. _qwak_proto/qwak/administration/runtime_configuration/v0/network_config_pb2.py +14 -54
  44. _qwak_proto/qwak/administration/runtime_configuration/v0/object_storage_config_pb2.py +13 -35
  45. _qwak_proto/qwak/administration/runtime_configuration/v0/object_storage_config_pb2.pyi +26 -3
  46. _qwak_proto/qwak/administration/runtime_configuration/v0/observability_config_pb2.py +10 -34
  47. _qwak_proto/qwak/administration/runtime_configuration/v0/runtime_config_pb2.py +8 -15
  48. _qwak_proto/qwak/administration/runtime_configuration/v0/runtime_config_pb2.pyi +7 -2
  49. _qwak_proto/qwak/administration/runtime_configuration/v0/sql_engine_config_pb2.py +13 -35
  50. _qwak_proto/qwak/administration/runtime_configuration/v0/sql_engine_config_pb2.pyi +24 -3
  51. _qwak_proto/qwak/administration/v0/authentication/authentication_service_pb2.py +14 -47
  52. _qwak_proto/qwak/administration/v0/environments/configuration_pb2.py +20 -82
  53. _qwak_proto/qwak/administration/v0/environments/environment_pb2.py +12 -40
  54. _qwak_proto/qwak/administration/v0/environments/environment_service_pb2.py +36 -158
  55. _qwak_proto/qwak/administration/v0/environments/personalization_pb2.py +8 -24
  56. _qwak_proto/qwak/administration/v0/users/user_pb2.py +18 -71
  57. _qwak_proto/qwak/admiral/secret/v0/secret_pb2.py +29 -116
  58. _qwak_proto/qwak/admiral/secret/v0/secret_pb2.pyi +21 -2
  59. _qwak_proto/qwak/admiral/secret/v0/secret_service_pb2.py +18 -67
  60. _qwak_proto/qwak/admiral/secret/v0/system_secret_service_pb2.py +18 -67
  61. _qwak_proto/qwak/admiral/user_application_instance/v0/user_application_instance_pb2.py +38 -174
  62. _qwak_proto/qwak/admiral/user_application_instance/v0/user_application_instance_service_pb2.py +22 -87
  63. _qwak_proto/qwak/analytics/analytics_pb2.py +26 -121
  64. _qwak_proto/qwak/analytics/analytics_service_pb2.py +46 -207
  65. _qwak_proto/qwak/artifactory_settings/artifactory_settings_pb2.py +8 -24
  66. _qwak_proto/qwak/audience/v1/audience_api_pb2.py +30 -127
  67. _qwak_proto/qwak/audience/v1/audience_pb2.py +26 -113
  68. _qwak_proto/qwak/auto_scaling/v1/auto_scaling_pb2.py +18 -79
  69. _qwak_proto/qwak/auto_scaling/v1/auto_scaling_service_pb2.py +10 -27
  70. _qwak_proto/qwak/automation/v1/action_pb2.py +40 -180
  71. _qwak_proto/qwak/automation/v1/auto_scaling_pb2.py +18 -79
  72. _qwak_proto/qwak/automation/v1/automation_execution_pb2.py +12 -43
  73. _qwak_proto/qwak/automation/v1/automation_management_service_pb2.py +56 -258
  74. _qwak_proto/qwak/automation/v1/automation_pb2.py +11 -35
  75. _qwak_proto/qwak/automation/v1/automation_pb2.pyi +5 -1
  76. _qwak_proto/qwak/automation/v1/common_pb2.py +10 -35
  77. _qwak_proto/qwak/automation/v1/notification_pb2.py +16 -68
  78. _qwak_proto/qwak/automation/v1/trigger_pb2.py +14 -54
  79. _qwak_proto/qwak/batch_job/v1/batch_job_events_pb2.py +26 -116
  80. _qwak_proto/qwak/batch_job/v1/batch_job_resources_pb2.py +8 -26
  81. _qwak_proto/qwak/batch_job/v1/batch_job_service_pb2.py +119 -562
  82. _qwak_proto/qwak/batch_job/v1/batch_job_service_pb2.pyi +5 -1
  83. _qwak_proto/qwak/build/v1/build_api_pb2.py +86 -407
  84. _qwak_proto/qwak/build/v1/build_pb2.py +114 -549
  85. _qwak_proto/qwak/build_settings/build_settings_api_pb2.py +18 -67
  86. _qwak_proto/qwak/build_settings/build_settings_pb2.py +18 -74
  87. _qwak_proto/qwak/builds/build_pb2.py +46 -207
  88. _qwak_proto/qwak/builds/build_pb2.pyi +48 -3
  89. _qwak_proto/qwak/builds/build_url_pb2.py +26 -113
  90. _qwak_proto/qwak/builds/build_values_pb2.py +82 -0
  91. _qwak_proto/qwak/builds/build_values_pb2.pyi +559 -0
  92. _qwak_proto/qwak/builds/build_values_pb2_grpc.py +4 -0
  93. _qwak_proto/qwak/builds/builds_orchestrator_service_pb2.py +87 -270
  94. _qwak_proto/qwak/builds/builds_orchestrator_service_pb2.pyi +173 -0
  95. _qwak_proto/qwak/builds/builds_orchestrator_service_pb2_grpc.py +66 -0
  96. _qwak_proto/qwak/builds/builds_pb2.py +87 -528
  97. _qwak_proto/qwak/builds/builds_pb2.pyi +0 -191
  98. _qwak_proto/qwak/builds/builds_pb2_grpc.py +0 -233
  99. _qwak_proto/qwak/builds/internal_builds_orchestrator_service_pb2.py +12 -37
  100. _qwak_proto/qwak/data_versioning/data_versioning_pb2.py +8 -24
  101. _qwak_proto/qwak/data_versioning/data_versioning_service_pb2.py +14 -47
  102. _qwak_proto/qwak/deployment/alert_pb2.py +24 -108
  103. _qwak_proto/qwak/deployment/alert_service_pb2.py +30 -127
  104. _qwak_proto/qwak/deployment/deployment_messages_pb2.py +6 -14
  105. _qwak_proto/qwak/deployment/deployment_pb2.py +124 -588
  106. _qwak_proto/qwak/deployment/deployment_service_pb2.py +86 -419
  107. _qwak_proto/qwak/ecosystem/jfrog/v0/token_pb2.py +47 -165
  108. _qwak_proto/qwak/ecosystem/jfrog/v0/token_pb2.pyi +102 -3
  109. _qwak_proto/qwak/ecosystem/jfrog/v0/token_service_pb2.py +22 -87
  110. _qwak_proto/qwak/ecosystem/v0/auth_pb2.py +28 -0
  111. _qwak_proto/qwak/ecosystem/v0/auth_pb2.pyi +37 -0
  112. _qwak_proto/qwak/ecosystem/v0/auth_pb2_grpc.py +4 -0
  113. _qwak_proto/qwak/ecosystem/v0/azure_credentials_pb2.py +37 -0
  114. _qwak_proto/qwak/ecosystem/v0/azure_credentials_pb2.pyi +117 -0
  115. _qwak_proto/qwak/ecosystem/v0/azure_credentials_pb2_grpc.py +4 -0
  116. _qwak_proto/qwak/ecosystem/v0/credentials_pb2.py +12 -35
  117. _qwak_proto/qwak/ecosystem/v0/credentials_pb2.pyi +8 -3
  118. _qwak_proto/qwak/ecosystem/v0/ecosystem_pb2.py +30 -138
  119. _qwak_proto/qwak/ecosystem/v0/ecosystem_runtime_service_pb2.py +52 -237
  120. _qwak_proto/qwak/execution/v1/backfill_pb2.py +18 -74
  121. _qwak_proto/qwak/execution/v1/batch_pb2.py +10 -34
  122. _qwak_proto/qwak/execution/v1/deletion_pb2.py +12 -44
  123. _qwak_proto/qwak/execution/v1/execution_pb2.py +16 -69
  124. _qwak_proto/qwak/execution/v1/execution_service_pb2.py +64 -298
  125. _qwak_proto/qwak/execution/v1/internal/deployment/platform_details_pb2.py +6 -14
  126. _qwak_proto/qwak/execution/v1/jobs/job_pb2.py +18 -76
  127. _qwak_proto/qwak/execution/v1/jobs/job_service_pb2.py +54 -247
  128. _qwak_proto/qwak/execution/v1/jobs/reports/report_pb2.py +20 -84
  129. _qwak_proto/qwak/execution/v1/state/execution_state_pb2.py +6 -14
  130. _qwak_proto/qwak/execution/v1/state/execution_state_service_pb2.py +30 -127
  131. _qwak_proto/qwak/execution/v1/state/featureset_state_pb2.py +6 -14
  132. _qwak_proto/qwak/execution/v1/state/spark_execution_state_pb2.py +14 -68
  133. _qwak_proto/qwak/execution/v1/streaming_aggregation_pb2.py +22 -55
  134. _qwak_proto/qwak/execution/v1/streaming_aggregation_pb2.pyi +71 -1
  135. _qwak_proto/qwak/execution/v1/streaming_pb2.py +12 -44
  136. _qwak_proto/qwak/feature_store/entities/entity_pb2.py +16 -57
  137. _qwak_proto/qwak/feature_store/entities/entity_service_pb2.py +30 -127
  138. _qwak_proto/qwak/feature_store/features/aggregation_pb2.py +38 -175
  139. _qwak_proto/qwak/feature_store/features/deployment_pb2.py +36 -167
  140. _qwak_proto/qwak/feature_store/features/deployment_service_pb2.py +10 -27
  141. _qwak_proto/qwak/feature_store/features/execution_pb2.py +14 -56
  142. _qwak_proto/qwak/feature_store/features/feature_set_attribute_pb2.py +6 -14
  143. _qwak_proto/qwak/feature_store/features/feature_set_pb2.py +35 -156
  144. _qwak_proto/qwak/feature_store/features/feature_set_pb2.pyi +9 -1
  145. _qwak_proto/qwak/feature_store/features/feature_set_service_pb2.py +97 -440
  146. _qwak_proto/qwak/feature_store/features/feature_set_service_pb2.pyi +25 -0
  147. _qwak_proto/qwak/feature_store/features/feature_set_service_pb2_grpc.py +34 -0
  148. _qwak_proto/qwak/feature_store/features/feature_set_state_pb2.py +38 -181
  149. _qwak_proto/qwak/feature_store/features/feature_set_state_service_pb2.py +26 -107
  150. _qwak_proto/qwak/feature_store/features/feature_set_types_pb2.py +77 -347
  151. _qwak_proto/qwak/feature_store/features/feature_set_types_pb2.pyi +7 -2
  152. _qwak_proto/qwak/feature_store/features/monitoring_pb2.py +10 -34
  153. _qwak_proto/qwak/feature_store/features/real_time_feature_extractor_pb2.py +32 -143
  154. _qwak_proto/qwak/feature_store/jobs/job_pb2.py +12 -46
  155. _qwak_proto/qwak/feature_store/jobs/job_service_pb2.py +30 -127
  156. _qwak_proto/qwak/feature_store/jobs/v1/job_pb2.py +12 -45
  157. _qwak_proto/qwak/feature_store/jobs/v1/job_service_pb2.py +42 -187
  158. _qwak_proto/qwak/feature_store/platform/platform_details_pb2.py +8 -24
  159. _qwak_proto/qwak/feature_store/reports/report_pb2.py +14 -53
  160. _qwak_proto/qwak/feature_store/repository/common/platform_pb2.py +10 -34
  161. _qwak_proto/qwak/feature_store/serving/management_pb2.py +14 -47
  162. _qwak_proto/qwak/feature_store/serving/metadata_pb2.py +12 -44
  163. _qwak_proto/qwak/feature_store/serving/serving_pb2.py +50 -222
  164. _qwak_proto/qwak/feature_store/serving/v1/value_pb2.py +8 -24
  165. _qwak_proto/qwak/feature_store/sinks/sink_pb2.py +14 -54
  166. _qwak_proto/qwak/feature_store/sources/batch_pb2.py +79 -335
  167. _qwak_proto/qwak/feature_store/sources/batch_pb2.pyi +99 -7
  168. _qwak_proto/qwak/feature_store/sources/data_source_attribute_pb2.py +6 -14
  169. _qwak_proto/qwak/feature_store/sources/data_source_pb2.py +15 -55
  170. _qwak_proto/qwak/feature_store/sources/data_source_pb2.pyi +5 -1
  171. _qwak_proto/qwak/feature_store/sources/data_source_service_pb2.py +39 -148
  172. _qwak_proto/qwak/feature_store/sources/data_source_service_pb2.pyi +25 -0
  173. _qwak_proto/qwak/feature_store/sources/data_source_service_pb2_grpc.py +34 -0
  174. _qwak_proto/qwak/feature_store/sources/streaming_pb2.py +34 -146
  175. _qwak_proto/qwak/feature_store/v1/common/jfrog_artifact/jfrog_artifact_pb2.py +6 -14
  176. _qwak_proto/qwak/feature_store/v1/common/source_code/source_code_pb2.py +10 -34
  177. _qwak_proto/qwak/feature_store/v1/internal/data_source/data_source_service_pb2.py +16 -58
  178. _qwak_proto/qwak/feature_store/v1/internal/featureset/featureset_token_service_pb2.py +10 -27
  179. _qwak_proto/qwak/features_operator/v1/features_operator_pb2.py +14 -54
  180. _qwak_proto/qwak/features_operator/v1/features_operator_service_pb2.py +14 -47
  181. _qwak_proto/qwak/features_operator/v2/features_operator_pb2.py +16 -64
  182. _qwak_proto/qwak/features_operator/v2/features_operator_service_pb2.py +12 -37
  183. _qwak_proto/qwak/features_operator/v3/features_operator_async_service_pb2.py +26 -107
  184. _qwak_proto/qwak/features_operator/v3/features_operator_pb2.py +16 -64
  185. _qwak_proto/qwak/file_versioning/file_versioning_pb2.py +10 -33
  186. _qwak_proto/qwak/file_versioning/file_versioning_service_pb2.py +14 -47
  187. _qwak_proto/qwak/fitness_service/constructs_pb2.py +23 -100
  188. _qwak_proto/qwak/fitness_service/constructs_pb2.pyi +24 -0
  189. _qwak_proto/qwak/fitness_service/fitness_pb2.py +7 -34
  190. _qwak_proto/qwak/fitness_service/fitness_pb2.pyi +0 -93
  191. _qwak_proto/qwak/fitness_service/status_pb2.py +17 -108
  192. _qwak_proto/qwak/fitness_service/status_pb2.pyi +1 -121
  193. _qwak_proto/qwak/inference/feedback/feedback_pb2.py +28 -96
  194. _qwak_proto/qwak/instance_template/instance_template_pb2.py +13 -41
  195. _qwak_proto/qwak/instance_template/instance_template_pb2.pyi +4 -1
  196. _qwak_proto/qwak/instance_template/instance_template_service_pb2.py +14 -47
  197. _qwak_proto/qwak/integration/hugging_face_integration_pb2.py +16 -64
  198. _qwak_proto/qwak/integration/integration_pb2.py +28 -126
  199. _qwak_proto/qwak/integration/integration_service_pb2.py +34 -147
  200. _qwak_proto/qwak/integration/open_a_i_integration_pb2.py +16 -64
  201. _qwak_proto/qwak/integration/opsgenie_integration_pb2.py +20 -82
  202. _qwak_proto/qwak/integration/pagerduty_integration_pb2.py +24 -104
  203. _qwak_proto/qwak/integration/slack_app_integration_pb2.py +24 -104
  204. _qwak_proto/qwak/kube_deployment_captain/alert_pb2.py +22 -97
  205. _qwak_proto/qwak/kube_deployment_captain/alerting_pb2.py +12 -44
  206. _qwak_proto/qwak/kube_deployment_captain/batch_job_pb2.py +70 -323
  207. _qwak_proto/qwak/kube_deployment_captain/batch_job_pb2.pyi +20 -5
  208. _qwak_proto/qwak/kube_deployment_captain/deployment_pb2.py +44 -167
  209. _qwak_proto/qwak/kube_deployment_captain/feature_set_deployment_pb2.py +32 -144
  210. _qwak_proto/qwak/kube_deployment_captain/kube_deployment_captain_service_pb2.py +108 -519
  211. _qwak_proto/qwak/kube_deployment_captain/traffic_mapping_pb2.py +8 -24
  212. _qwak_proto/qwak/logging/log_filter_pb2.py +12 -44
  213. _qwak_proto/qwak/logging/log_line_pb2.py +8 -25
  214. _qwak_proto/qwak/logging/log_reader_service_pb2.py +10 -27
  215. _qwak_proto/qwak/logging/log_source_pb2.py +30 -134
  216. _qwak_proto/qwak/model_descriptor/open_ai_descriptor_pb2.py +18 -74
  217. _qwak_proto/qwak/model_group/model_group_pb2.py +25 -48
  218. _qwak_proto/qwak/model_group/model_group_pb2.pyi +88 -0
  219. _qwak_proto/qwak/model_group/model_group_pb2_grpc.py +70 -0
  220. _qwak_proto/qwak/model_group/model_group_repository_details_pb2.py +23 -75
  221. _qwak_proto/qwak/model_group/model_group_repository_details_pb2.pyi +44 -6
  222. _qwak_proto/qwak/models/models_pb2.py +99 -406
  223. _qwak_proto/qwak/models/models_pb2.pyi +86 -0
  224. _qwak_proto/qwak/models/models_pb2_grpc.py +34 -0
  225. _qwak_proto/qwak/models/models_query_pb2.py +16 -56
  226. _qwak_proto/qwak/models/models_query_pb2.pyi +4 -4
  227. _qwak_proto/qwak/monitoring/v0/alerting_channel_management_service_pb2.py +30 -127
  228. _qwak_proto/qwak/monitoring/v0/alerting_channel_pb2.py +34 -152
  229. _qwak_proto/qwak/monitoring/v0/alerting_channel_sync_service_pb2.py +14 -47
  230. _qwak_proto/qwak/offline/serving/v1/feature_values_pb2.py +6 -14
  231. _qwak_proto/qwak/offline/serving/v1/offline_serving_async_service_pb2.py +30 -123
  232. _qwak_proto/qwak/offline/serving/v1/options_pb2.py +6 -14
  233. _qwak_proto/qwak/offline/serving/v1/population_pb2.py +14 -54
  234. _qwak_proto/qwak/projects/jfrog_project_spec_pb2.py +6 -14
  235. _qwak_proto/qwak/projects/projects_pb2.py +50 -192
  236. _qwak_proto/qwak/projects/projects_pb2.pyi +35 -0
  237. _qwak_proto/qwak/prompt/v1/prompt/prompt_manager_service_pb2.py +54 -247
  238. _qwak_proto/qwak/prompt/v1/prompt/prompt_pb2.py +46 -214
  239. _qwak_proto/qwak/secret_service/secret_service_pb2.py +18 -67
  240. _qwak_proto/qwak/secret_service/secret_service_pb2.pyi +1 -1
  241. _qwak_proto/qwak/self_service/account/v0/account_membership_pb2.py +24 -106
  242. _qwak_proto/qwak/self_service/account/v0/account_membership_service_pb2.py +50 -227
  243. _qwak_proto/qwak/self_service/account/v0/account_status_pb2.py +16 -65
  244. _qwak_proto/qwak/self_service/account/v0/managing_account_pb2.py +37 -132
  245. _qwak_proto/qwak/self_service/account/v0/managing_account_pb2.pyi +40 -2
  246. _qwak_proto/qwak/self_service/account/v0/managing_account_service_pb2.py +22 -87
  247. _qwak_proto/qwak/self_service/user/v1/api_key_pb2.py +6 -14
  248. _qwak_proto/qwak/self_service/user/v1/user_pb2.py +6 -14
  249. _qwak_proto/qwak/self_service/user/v1/user_service_pb2.py +30 -121
  250. _qwak_proto/qwak/service_discovery/service_discovery_location_pb2.py +12 -44
  251. _qwak_proto/qwak/service_discovery/service_discovery_location_service_pb2.py +10 -27
  252. _qwak_proto/qwak/traffic/v1/traffic_api_pb2.py +22 -87
  253. _qwak_proto/qwak/traffic/v1/traffic_pb2.py +26 -113
  254. _qwak_proto/qwak/user_application/common/v0/resources_pb2.py +31 -139
  255. _qwak_proto/qwak/user_application/common/v0/resources_pb2.pyi +24 -0
  256. _qwak_proto/qwak/user_application/v0/user_application_pb2.py +11 -44
  257. _qwak_proto/qwak/user_application/v0/user_application_pb2.pyi +6 -0
  258. _qwak_proto/qwak/vectors/v1/collection/collection_pb2.py +24 -106
  259. _qwak_proto/qwak/vectors/v1/collection/collection_service_pb2.py +38 -167
  260. _qwak_proto/qwak/vectors/v1/collection/event/collection_event_pb2.py +6 -14
  261. _qwak_proto/qwak/vectors/v1/filters_pb2.py +30 -134
  262. _qwak_proto/qwak/vectors/v1/vector_pb2.py +14 -54
  263. _qwak_proto/qwak/vectors/v1/vector_service_pb2.py +26 -107
  264. _qwak_proto/qwak/workspace/workspace_pb2.py +22 -107
  265. _qwak_proto/qwak/workspace/workspace_service_pb2.py +62 -287
  266. qwak/__init__.py +1 -1
  267. qwak/automations/automations.py +3 -0
  268. qwak/clients/feature_store/execution_management_client.py +28 -0
  269. qwak/clients/feature_store/management_client.py +156 -206
  270. qwak/clients/feature_store/operator_client.py +19 -1
  271. qwak/clients/logging_client/client.py +13 -18
  272. qwak/clients/model_management/client.py +0 -5
  273. qwak/clients/project/client.py +0 -7
  274. qwak/exceptions/__init__.py +1 -0
  275. qwak/exceptions/qwak_grpc_address_exception.py +9 -0
  276. qwak/feature_store/_common/artifact_utils.py +10 -8
  277. qwak/feature_store/_common/packaging.py +39 -21
  278. qwak/feature_store/_common/source_code_spec.py +61 -11
  279. qwak/feature_store/_common/source_code_spec_factory.py +63 -10
  280. qwak/feature_store/data_sources/__init__.py +2 -0
  281. qwak/feature_store/data_sources/base.py +11 -7
  282. qwak/feature_store/data_sources/batch/snowflake.py +34 -8
  283. qwak/feature_store/data_sources/batch/unity_catalog.py +107 -0
  284. qwak/feature_store/execution/streaming_backfill.py +48 -0
  285. qwak/feature_store/feature_sets/base_feature_set.py +1 -0
  286. qwak/feature_store/feature_sets/streaming.py +84 -63
  287. qwak/feature_store/feature_sets/streaming_backfill.py +88 -124
  288. qwak/feature_store/online/client.py +20 -4
  289. qwak/feature_store/validations/validation_decorators.py +70 -0
  290. qwak/feature_store/validations/validation_response.py +3 -1
  291. qwak/feature_store/validations/validator.py +11 -3
  292. qwak/inner/build_logic/interface/context_interface.py +4 -0
  293. qwak/inner/build_logic/phases/phase_010_fetch_model/post_fetch_validation_step.py +1 -1
  294. qwak/inner/const.py +2 -6
  295. qwak/inner/di_configuration/__init__.py +1 -69
  296. qwak/inner/di_configuration/account.py +18 -63
  297. qwak/inner/di_configuration/containers.py +5 -1
  298. qwak/inner/di_configuration/dependency_wiring.py +98 -0
  299. qwak/inner/tool/auth.py +10 -80
  300. qwak/inner/tool/grpc/grpc_auth.py +0 -32
  301. qwak/inner/tool/grpc/grpc_tools.py +125 -11
  302. qwak/inner/tool/grpc/grpc_try_wrapping.py +140 -3
  303. qwak/llmops/generation/chat/openai/types/chat/chat_completion.py +24 -6
  304. qwak/llmops/generation/chat/openai/types/chat/chat_completion_chunk.py +44 -8
  305. qwak/llmops/generation/chat/openai/types/chat/chat_completion_message.py +6 -3
  306. qwak/qwak_client/client.py +2 -13
  307. qwak/vector_store/rest_helpers.py +4 -16
  308. qwak_core-0.5.19.dist-info/METADATA +48 -0
  309. {qwak_core-0.4.278.dist-info → qwak_core-0.5.19.dist-info}/RECORD +316 -334
  310. qwak_services_mock/mocks/execution_management_service.py +9 -1
  311. qwak_services_mock/mocks/feature_store_data_sources_manager_api.py +55 -13
  312. qwak_services_mock/mocks/feature_store_entities_manager_api.py +31 -29
  313. qwak_services_mock/mocks/features_operator_v3_service.py +20 -0
  314. qwak_services_mock/mocks/qwak_mocks.py +0 -2
  315. qwak_services_mock/services_mock.py +1 -11
  316. _qwak_proto/qwak/fitness_service/fitness_service_pb2.py +0 -110
  317. _qwak_proto/qwak/fitness_service/fitness_service_pb2.pyi +0 -121
  318. _qwak_proto/qwak/fitness_service/fitness_service_pb2_grpc.py +0 -169
  319. frogml_storage/__init__.py +0 -1
  320. frogml_storage/artifactory/__init__.py +0 -1
  321. frogml_storage/artifactory/_artifactory_api.py +0 -315
  322. frogml_storage/authentication/login/__init__.py +0 -1
  323. frogml_storage/authentication/login/_login_cli.py +0 -239
  324. frogml_storage/authentication/login/_login_command.py +0 -74
  325. frogml_storage/authentication/models/__init__.py +0 -3
  326. frogml_storage/authentication/models/_auth.py +0 -24
  327. frogml_storage/authentication/models/_auth_config.py +0 -70
  328. frogml_storage/authentication/models/_login.py +0 -22
  329. frogml_storage/authentication/utils/__init__.py +0 -17
  330. frogml_storage/authentication/utils/_authentication_utils.py +0 -281
  331. frogml_storage/authentication/utils/_login_checks_utils.py +0 -114
  332. frogml_storage/base_storage.py +0 -140
  333. frogml_storage/constants.py +0 -56
  334. frogml_storage/exceptions/checksum_verification_error.py +0 -3
  335. frogml_storage/exceptions/validation_error.py +0 -4
  336. frogml_storage/frog_ml.py +0 -668
  337. frogml_storage/http/__init__.py +0 -1
  338. frogml_storage/http/http_client.py +0 -83
  339. frogml_storage/logging/__init__.py +0 -1
  340. frogml_storage/logging/_log_config.py +0 -45
  341. frogml_storage/logging/log_utils.py +0 -21
  342. frogml_storage/models/__init__.py +0 -1
  343. frogml_storage/models/_download_context.py +0 -54
  344. frogml_storage/models/dataset_manifest.py +0 -13
  345. frogml_storage/models/entity_manifest.py +0 -93
  346. frogml_storage/models/frogml_dataset_version.py +0 -21
  347. frogml_storage/models/frogml_entity_type_info.py +0 -50
  348. frogml_storage/models/frogml_entity_version.py +0 -34
  349. frogml_storage/models/frogml_model_version.py +0 -21
  350. frogml_storage/models/model_manifest.py +0 -60
  351. frogml_storage/models/serialization_metadata.py +0 -15
  352. frogml_storage/utils/__init__.py +0 -12
  353. frogml_storage/utils/_environment.py +0 -21
  354. frogml_storage/utils/_input_checks_utility.py +0 -104
  355. frogml_storage/utils/_storage_utils.py +0 -15
  356. frogml_storage/utils/_url_utils.py +0 -27
  357. qwak/clients/build_management/__init__.py +0 -1
  358. qwak/clients/build_management/client.py +0 -114
  359. qwak_core-0.4.278.dist-info/METADATA +0 -415
  360. qwak_services_mock/mocks/build_management.py +0 -100
  361. {qwak_core-0.4.278.dist-info → qwak_core-0.5.19.dist-info}/WHEEL +0 -0
frogml_storage/frog_ml.py DELETED
@@ -1,668 +0,0 @@
1
- import concurrent.futures
2
- import os
3
- from datetime import datetime, timezone
4
- from enum import Enum
5
- from typing import Dict, List, Optional, Union
6
-
7
- from frogml_storage.artifactory import ArtifactoryApi, StartTransactionResponse
8
- from frogml_storage.authentication.models import AuthConfig
9
- from frogml_storage.authentication.utils import get_credentials
10
- from frogml_storage.base_storage import BaseStorage
11
- from frogml_storage.constants import (
12
- DATASET,
13
- FROG_ML_DEFAULT_HTTP_THREADS_COUNT,
14
- FROG_ML_IGNORED_FILES,
15
- JFML_THREAD_COUNT,
16
- MODEL,
17
- )
18
- from frogml_storage.exceptions.checksum_verification_error import (
19
- ChecksumVerificationError,
20
- )
21
- from frogml_storage.exceptions.validation_error import FrogMLValidationError
22
- from frogml_storage.logging import logger
23
- from frogml_storage.models import DownloadContext
24
- from frogml_storage.models.dataset_manifest import DatasetManifest
25
- from frogml_storage.models.entity_manifest import Artifact, Checksums, EntityManifest
26
- from frogml_storage.models.frogml_dataset_version import FrogMLDatasetVersion
27
- from frogml_storage.models.frogml_entity_type_info import FrogMLEntityTypeInfo
28
- from frogml_storage.models.frogml_entity_version import FrogMLEntityVersion
29
- from frogml_storage.models.frogml_model_version import FrogMLModelVersion
30
- from frogml_storage.models.model_manifest import ModelManifest
31
- from frogml_storage.models.serialization_metadata import SerializationMetadata
32
- from frogml_storage.utils import (
33
- calculate_sha2,
34
- assemble_artifact_url,
35
- join_url,
36
- is_not_none,
37
- is_valid_thread_number,
38
- user_input_validation,
39
- validate_not_folder_paths,
40
- validate_path_exists,
41
- )
42
- from frogml_storage.logging.log_utils import (
43
- build_download_success_log,
44
- build_upload_success_log,
45
- )
46
-
47
-
48
- class FileType(Enum):
49
- REGULAR = 1 # can represent either model or dataset file
50
- DEPENDENCY = 2
51
- ARCHIVE = 3
52
-
53
-
54
- class FrogMLStorage(BaseStorage):
55
- """
56
- Repository implementation to download or store model|dataset artifacts, and metrics in Artifactory repository.
57
- """
58
-
59
- def __init__(self, login_config: Optional[AuthConfig] = None):
60
- uri, auth = get_credentials(login_config)
61
- self.uri = assemble_artifact_url(uri)
62
- self.auth = auth
63
- self.artifactory_api = ArtifactoryApi(self.uri, self.auth)
64
- self.__initialize_executor()
65
-
66
- def __initialize_executor(self) -> None:
67
- thread_count = os.getenv(JFML_THREAD_COUNT)
68
- if thread_count is None or not is_valid_thread_number(thread_count):
69
- self.http_threads_count = FROG_ML_DEFAULT_HTTP_THREADS_COUNT
70
- else:
71
- self.http_threads_count = int(thread_count)
72
-
73
- self.executor = concurrent.futures.ThreadPoolExecutor(
74
- max_workers=self.http_threads_count
75
- )
76
-
77
- def upload_dataset_version(
78
- self,
79
- repository: str,
80
- dataset_name: str,
81
- dataset_path: str,
82
- namespace: Optional[str] = None,
83
- version: Optional[str] = None,
84
- properties: Optional[dict[str, str]] = None,
85
- ) -> FrogMLDatasetVersion:
86
- return FrogMLDatasetVersion.from_entity_version(
87
- self.__upload_entity_version(
88
- repository=repository,
89
- entity_name=dataset_name,
90
- source_path=dataset_path,
91
- entity_type=DATASET,
92
- namespace=namespace,
93
- version=version,
94
- properties=properties,
95
- )
96
- )
97
-
98
- def upload_model_version(
99
- self,
100
- repository: str,
101
- model_name: str,
102
- model_path: str,
103
- model_type: Union[SerializationMetadata, Dict],
104
- namespace: Optional[str] = None,
105
- version: Optional[str] = None,
106
- properties: Optional[dict[str, str]] = None,
107
- dependencies_files_paths: Optional[List[str]] = None,
108
- code_archive_file_path: Optional[str] = None,
109
- ) -> FrogMLModelVersion:
110
-
111
- is_not_none("model_type", model_type)
112
- if isinstance(model_type, Dict):
113
- logger.debug(
114
- "received dictionary model_type, converting to SerializationMetadata"
115
- )
116
- model_type = SerializationMetadata.from_json(model_type)
117
- validate_not_folder_paths(dependencies_files_paths)
118
- validate_not_folder_paths(code_archive_file_path)
119
- validate_path_exists(model_path)
120
-
121
- return FrogMLModelVersion.from_entity_version(
122
- self.__upload_entity_version(
123
- repository=repository,
124
- entity_name=model_name,
125
- source_path=model_path,
126
- entity_type=MODEL,
127
- model_type=model_type,
128
- namespace=namespace,
129
- version=version,
130
- properties=properties,
131
- dependencies_files_paths=dependencies_files_paths,
132
- code_archive_file_path=code_archive_file_path,
133
- )
134
- )
135
-
136
- def __upload_entity_version(
137
- self,
138
- repository: str,
139
- entity_name: str,
140
- source_path: str,
141
- entity_type: str = "model",
142
- model_type: Optional[SerializationMetadata] = None,
143
- namespace: Optional[str] = None,
144
- version: Optional[str] = None,
145
- properties: Optional[dict[str, str]] = None,
146
- dependencies_files_paths: Optional[List[str]] = None,
147
- code_archive_file_path: Optional[str] = None,
148
- ) -> FrogMLEntityVersion:
149
- try:
150
- self.__verify_upload_required_args_not_none(
151
- repository=repository, entity_name=entity_name, source_path=source_path
152
- )
153
-
154
- user_input_validation(
155
- entity_name=entity_name,
156
- namespace=namespace,
157
- version=version,
158
- properties=properties,
159
- )
160
-
161
- validate_path_exists(source_path)
162
-
163
- namespace_and_name = self.__union_entity_name_with_namespace(
164
- namespace, entity_name
165
- )
166
-
167
- entity_type_info = FrogMLEntityTypeInfo.from_string(entity_type)
168
- response: StartTransactionResponse = self.artifactory_api.start_transaction(
169
- entity_type_info=entity_type_info,
170
- repository=repository,
171
- entity_name=namespace_and_name,
172
- version=version,
173
- )
174
-
175
- if version is None:
176
- version = response.files_upload_path.replace(
177
- f"{entity_type_info.folder_name}/{namespace_and_name}/tmp/", # nosec B108
178
- "",
179
- ).split("/")[0]
180
- logger.debug(
181
- "Version was not specified. Setting version to {}".format(version)
182
- )
183
-
184
- transaction_date = self.__milliseconds_to_iso_instant(
185
- response.transaction_id
186
- )
187
-
188
- entity_manifest: Union[ModelManifest, DatasetManifest]
189
- if entity_type_info == FrogMLEntityTypeInfo.MODEL:
190
- if not isinstance(model_type, SerializationMetadata):
191
- raise AssertionError(
192
- f"model_type must be {SerializationMetadata.__name__}"
193
- )
194
-
195
- entity_manifest = ModelManifest(
196
- created_date=transaction_date,
197
- artifacts=[],
198
- model_format=model_type,
199
- )
200
- self.__upload_model(
201
- source_path=source_path,
202
- repository=repository,
203
- files_upload_path=response.files_upload_path,
204
- dependencies_upload_path=response.dependencies_upload_path,
205
- code_upload_path=response.code_upload_path,
206
- entity_name=entity_name,
207
- version=version,
208
- entity_type_info=entity_type_info,
209
- model_manifest=entity_manifest,
210
- dependency_files=dependencies_files_paths,
211
- code_file=code_archive_file_path,
212
- )
213
- else:
214
- entity_manifest = DatasetManifest(
215
- created_date=transaction_date,
216
- artifacts=[],
217
- )
218
- self.__upload_dataset(
219
- source_path=source_path,
220
- repository=repository,
221
- location_to_upload=response.files_upload_path,
222
- entity_name=entity_name,
223
- version=version,
224
- entity_type_info=entity_type_info,
225
- dataset_manifest=entity_manifest,
226
- )
227
-
228
- self.artifactory_api.end_transaction(
229
- entity_type=entity_type_info,
230
- repository=repository,
231
- entity_name=namespace_and_name,
232
- entity_manifest=entity_manifest,
233
- transaction_id=response.transaction_id,
234
- version=version,
235
- properties=properties,
236
- )
237
-
238
- return FrogMLEntityVersion(
239
- entity_name=entity_name,
240
- namespace=namespace,
241
- version=version,
242
- entity_manifest=entity_manifest,
243
- )
244
-
245
- except FrogMLValidationError as error:
246
- logger.error(error.args[0], exc_info=False)
247
-
248
- return FrogMLEntityVersion(
249
- entity_name="", namespace="", version="", entity_manifest=None
250
- )
251
-
252
- def download_dataset_version(
253
- self,
254
- repository: str,
255
- dataset_name: str,
256
- version: str,
257
- target_path: str,
258
- namespace: Optional[str] = None,
259
- ) -> None:
260
- return self.__download_entity_version(
261
- repository=repository,
262
- entity_name=dataset_name,
263
- version=version,
264
- target_path=target_path,
265
- entity_type=DATASET,
266
- namespace=namespace,
267
- )
268
-
269
- def download_model_version(
270
- self,
271
- repository: str,
272
- model_name: str,
273
- version: str,
274
- target_path: str,
275
- namespace: Optional[str] = None,
276
- ) -> None:
277
- return self.__download_entity_version(
278
- repository=repository,
279
- entity_name=model_name,
280
- version=version,
281
- target_path=target_path,
282
- entity_type=MODEL,
283
- namespace=namespace,
284
- )
285
-
286
- def __download_entity_version(
287
- self,
288
- repository: str,
289
- entity_name: str,
290
- version: str,
291
- target_path: str,
292
- entity_type: str,
293
- namespace: Optional[str] = None,
294
- ) -> None:
295
- try:
296
- self.__verify_download_required_args_not_none(
297
- repository=repository,
298
- entity_name=entity_name,
299
- version=version,
300
- target_path=target_path,
301
- )
302
- user_input_validation(
303
- entity_name=entity_name, version=version, namespace=namespace
304
- )
305
-
306
- entity_type_info = FrogMLEntityTypeInfo.from_string(entity_type)
307
-
308
- download_context_list = self._get_download_context_list(
309
- entity_type_info=entity_type_info,
310
- repository=repository,
311
- entity_name=entity_name,
312
- version=version,
313
- target_dir_path=target_path,
314
- namespace=namespace,
315
- )
316
-
317
- if len(download_context_list) == 0:
318
- logger.info(
319
- f"No files to download for {entity_type_info.entity_type}: '{entity_name}' version: '{version}'"
320
- )
321
- return
322
- for download_context in download_context_list[:]:
323
- if download_context.exists_locally:
324
- logger.info(
325
- f"File '{download_context.target_path}' already exists locally, will not download it."
326
- )
327
- download_context_list.remove(download_context)
328
- elif not self.__is_checksum_valid(download_context):
329
- raise ChecksumVerificationError(
330
- os.path.basename(download_context.target_path)
331
- )
332
-
333
- successfully_downloaded = self._execute_parallel_download(
334
- download_context_list
335
- )
336
-
337
- if successfully_downloaded:
338
- successful_log = build_download_success_log(
339
- entity_type_info, entity_name, version
340
- )
341
- logger.info(successful_log)
342
-
343
- except FrogMLValidationError as error:
344
- logger.error(error.args[0], exc_info=False)
345
- except Exception as e:
346
- logger.error(
347
- f"An error occurred during download_entity_version: {e}", exc_info=False
348
- )
349
- raise e
350
-
351
- def __is_checksum_valid(self, download_arg: DownloadContext) -> bool:
352
- if not download_arg.artifact_checksum:
353
- return False
354
- return (
355
- download_arg.artifact_checksum.sha2
356
- == self.artifactory_api.get_artifact_checksum(download_arg)
357
- )
358
-
359
- def _get_download_context_list(
360
- self,
361
- entity_type_info: FrogMLEntityTypeInfo,
362
- repository: str,
363
- entity_name: str,
364
- version: str,
365
- target_dir_path: str,
366
- namespace: Optional[str] = None,
367
- ) -> List[DownloadContext]:
368
- download_context_list = []
369
- entity_manifest = self.artifactory_api.get_entity_manifest(
370
- entity_type_info,
371
- repository,
372
- entity_name,
373
- namespace,
374
- version,
375
- )
376
- search_under_repo = f"/{repository}/"
377
-
378
- for artifact in entity_manifest[
379
- (
380
- "model_artifacts"
381
- if entity_type_info == FrogMLEntityTypeInfo.MODEL
382
- else "dataset_artifacts"
383
- )
384
- ]:
385
- download_url = artifact["download_url"]
386
- artifact_path = artifact["artifact_path"]
387
- artifact_checksum = Checksums(**artifact["checksums"])
388
- target_path = os.path.join(target_dir_path, artifact_path)
389
- position_under_repo = download_url.find(search_under_repo)
390
- if position_under_repo != -1:
391
- repo_rel_path = download_url[
392
- position_under_repo + len(search_under_repo) :
393
- ]
394
-
395
- args = DownloadContext(
396
- repo_key=repository,
397
- source_url=repo_rel_path,
398
- target_path=target_path,
399
- artifact_checksum=artifact_checksum,
400
- )
401
-
402
- if not os.path.exists(target_path):
403
- self.__create_dirs_if_needed(target_dir_path, artifact_path)
404
- else:
405
- args.exists_locally = True
406
- download_context_list.append(args)
407
- return download_context_list
408
-
409
- def _execute_parallel_download(
410
- self, download_context_list: List[DownloadContext]
411
- ) -> int:
412
- if len(download_context_list) == 0:
413
- logger.debug("No files to download.")
414
- return 0
415
- logger.debug(f"Fetching: {len(download_context_list)} files.")
416
- futures = []
417
- for download_arg in download_context_list:
418
- future = self.executor.submit(
419
- self.artifactory_api.download_file, download_arg
420
- )
421
- futures.append(future)
422
- return self.__submit_and_handle_futures(futures)
423
-
424
- def get_entity_manifest(
425
- self,
426
- entity_type: str,
427
- repository: str,
428
- namespace: Optional[str],
429
- entity_name: str,
430
- version: Optional[str],
431
- ) -> dict:
432
- entity_type_info = FrogMLEntityTypeInfo.from_string(entity_type)
433
- return self.artifactory_api.get_entity_manifest(
434
- entity_type_info=entity_type_info,
435
- repository=repository,
436
- entity_name=entity_name,
437
- namespace=namespace,
438
- version=version,
439
- )
440
-
441
- def __upload_by_source(
442
- self,
443
- source_path: str,
444
- repository: str,
445
- location_to_upload: str,
446
- file_type: FileType,
447
- entity_manifest: Optional[EntityManifest] = None,
448
- ) -> bool:
449
- if os.path.isfile(source_path):
450
- rel_path = os.path.basename(source_path)
451
- self.__upload_single_file(
452
- (
453
- repository,
454
- source_path,
455
- rel_path,
456
- location_to_upload,
457
- file_type,
458
- entity_manifest,
459
- )
460
- )
461
- return True
462
-
463
- else:
464
- futures = []
465
- for dir_path, dir_names, file_names in os.walk(source_path):
466
- for filename in file_names:
467
- full_path = os.path.join(dir_path, filename)
468
- rel_path = os.path.relpath(full_path, source_path)
469
- future = self.executor.submit(
470
- self.__upload_single_file,
471
- (
472
- repository,
473
- full_path,
474
- rel_path,
475
- location_to_upload,
476
- file_type,
477
- entity_manifest,
478
- ),
479
- )
480
- futures.append(future)
481
-
482
- successfully_uploaded = self.__submit_and_handle_futures(futures)
483
-
484
- if successfully_uploaded > 0:
485
- return True
486
- return False
487
-
488
- def __upload_model(
489
- self,
490
- source_path: str,
491
- repository: str,
492
- files_upload_path: str,
493
- dependencies_upload_path: str,
494
- code_upload_path: str,
495
- entity_name: str,
496
- version: str,
497
- entity_type_info: FrogMLEntityTypeInfo,
498
- model_manifest: ModelManifest,
499
- dependency_files: Optional[List[str]] = None,
500
- code_file: Optional[str] = None,
501
- ) -> None:
502
- logger.debug("Uploading model files...")
503
- is_successful_upload: bool = self.__upload_by_source(
504
- source_path,
505
- repository,
506
- files_upload_path,
507
- FileType.REGULAR,
508
- model_manifest,
509
- )
510
- logger.debug("Uploading model requirement files...")
511
- if dependency_files is not None:
512
- for dependency_file in dependency_files:
513
- is_successful_upload &= self.__upload_by_source(
514
- dependency_file,
515
- repository,
516
- dependencies_upload_path,
517
- FileType.DEPENDENCY,
518
- model_manifest,
519
- )
520
- logger.debug("Uploading model code archive file...")
521
- if code_file is not None:
522
- is_successful_upload &= self.__upload_by_source(
523
- code_file,
524
- repository,
525
- code_upload_path,
526
- FileType.ARCHIVE,
527
- model_manifest,
528
- )
529
- if is_successful_upload:
530
- successful_log = build_upload_success_log(
531
- entity_type_info, entity_name, version
532
- )
533
- logger.info(successful_log)
534
-
535
- def __upload_dataset(
536
- self,
537
- source_path: str,
538
- repository: str,
539
- location_to_upload: str,
540
- entity_name: str,
541
- version: str,
542
- entity_type_info: FrogMLEntityTypeInfo,
543
- dataset_manifest: DatasetManifest,
544
- ) -> None:
545
- logger.debug("Uploading dataset files...")
546
- is_successful_upload: bool = self.__upload_by_source(
547
- source_path=source_path,
548
- repository=repository,
549
- location_to_upload=location_to_upload,
550
- file_type=FileType.REGULAR,
551
- entity_manifest=dataset_manifest,
552
- )
553
- if is_successful_upload:
554
- successful_log = build_upload_success_log(
555
- entity_type_info, entity_name, version
556
- )
557
- logger.info(successful_log)
558
-
559
- @staticmethod
560
- def __submit_and_handle_futures(futures: list) -> int:
561
- failed_futures = []
562
- for future in futures:
563
- try:
564
- future.result()
565
- except Exception as e:
566
- failed_futures.append(e.args)
567
-
568
- if len(failed_futures) > 0:
569
- for failed_future in failed_futures:
570
- logger.error(f"{failed_future}")
571
-
572
- return len(futures) - len(failed_futures)
573
-
574
- def __upload_single_file(self, args):
575
- (
576
- repository,
577
- full_path,
578
- rel_path,
579
- location_to_upload,
580
- file_type,
581
- entity_manifest,
582
- ) = args
583
- if not FrogMLStorage.__is_ignored_file(full_path=full_path):
584
- checksums = Checksums.calc_checksums(full_path)
585
- if entity_manifest is not None:
586
- if file_type == FileType.REGULAR:
587
- entity_manifest.add_file(full_path, checksums, rel_path)
588
- elif file_type == FileType.DEPENDENCY:
589
- entity_manifest.add_dependency_file(full_path, checksums, rel_path)
590
- elif file_type == FileType.ARCHIVE:
591
- entity_manifest.code_artifacts = Artifact(
592
- artifact_path=rel_path,
593
- size=os.path.getsize(full_path),
594
- checksums=checksums,
595
- )
596
- url = join_url(self.uri, repository, location_to_upload, rel_path)
597
- is_checksum_deploy_success = self.artifactory_api.checksum_deployment(
598
- url=url, checksum=checksums, full_path=full_path, stream=True
599
- )
600
- if is_checksum_deploy_success is False:
601
- self.artifactory_api.upload_file(url=url, file_path=full_path)
602
-
603
- @staticmethod
604
- def __calculate_sha2_no_error(file_path: str) -> Optional[str]:
605
- # Used to calculate sha2 without raising an exception
606
- if os.path.exists(file_path) is False:
607
- logger.debug(f"File {file_path} does not exist, can't calculate sha256")
608
- return None
609
- try:
610
- return calculate_sha2(file_path)
611
- except Exception as e:
612
- logger.debug(f"Failed to calculate sha256 for file {file_path}. Error: {e}")
613
- return None
614
-
615
- @staticmethod
616
- def __verify_download_required_args_not_none(
617
- repository: str, entity_name: str, version: str, target_path: str
618
- ) -> bool:
619
- is_not_none("repository", repository)
620
- is_not_none("entity_name", entity_name)
621
- is_not_none("version", version)
622
- is_not_none("target_path", target_path)
623
- return True
624
-
625
- @staticmethod
626
- def __verify_upload_required_args_not_none(
627
- repository: str, entity_name: str, source_path: str
628
- ) -> bool:
629
- is_not_none("repository", repository)
630
- is_not_none("entity_name", entity_name)
631
- is_not_none("source_path", source_path)
632
- return True
633
-
634
- @staticmethod
635
- def __is_ignored_file(full_path: str) -> bool:
636
- normalized_path = os.path.normpath(full_path).lower()
637
- parts = normalized_path.split(os.sep)
638
- ignored_files_lower = [item.lower() for item in FROG_ML_IGNORED_FILES]
639
-
640
- for part in parts:
641
- if part in ignored_files_lower:
642
- return True
643
- return False
644
-
645
- @staticmethod
646
- def __union_entity_name_with_namespace(
647
- namespace: Optional[str], entity_name: str
648
- ) -> str:
649
- if namespace is None:
650
- return entity_name
651
- else:
652
- return namespace + "/" + entity_name
653
-
654
- @staticmethod
655
- def __create_dirs_if_needed(base_dir: str, file_uri: str) -> str:
656
- full_path = os.path.join(base_dir, file_uri.strip("/"))
657
- dest_path = os.path.dirname(full_path)
658
- if not os.path.exists(dest_path):
659
- os.makedirs(dest_path)
660
- return dest_path
661
-
662
- @staticmethod
663
- def __milliseconds_to_iso_instant(milliseconds: str) -> str:
664
- instant: datetime = datetime.fromtimestamp(
665
- int(milliseconds) / 1000.0, tz=timezone.utc
666
- )
667
- x = instant.strftime("%Y-%m-%dT%H:%M:%S.%f")[:-4]
668
- return x
@@ -1 +0,0 @@
1
- from .http_client import HTTPClient