truefoundry 0.5.10rc1__py3-none-any.whl → 0.5.11rc1__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 truefoundry might be problematic. Click here for more details.

Files changed (266) hide show
  1. truefoundry/__init__.py +19 -0
  2. truefoundry/_client.py +36 -0
  3. truefoundry/cli/display_util.py +1 -1
  4. truefoundry/common/utils.py +9 -0
  5. truefoundry/deploy/__init__.py +2 -2
  6. truefoundry/deploy/_autogen/models.py +1591 -0
  7. truefoundry/deploy/builder/__init__.py +1 -1
  8. truefoundry/deploy/builder/builders/dockerfile.py +1 -1
  9. truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +1 -1
  10. truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +1 -1
  11. truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +1 -1
  12. truefoundry/deploy/io/output_callback.py +13 -6
  13. truefoundry/deploy/io/rich_output_callback.py +8 -4
  14. truefoundry/deploy/lib/clients/servicefoundry_client.py +117 -138
  15. truefoundry/deploy/lib/dao/apply.py +2 -2
  16. truefoundry/deploy/lib/dao/delete.py +2 -2
  17. truefoundry/deploy/lib/model/entity.py +37 -24
  18. truefoundry/deploy/v2/lib/deploy.py +7 -7
  19. truefoundry/deploy/v2/lib/deploy_workflow.py +9 -9
  20. truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
  21. truefoundry/deploy/v2/lib/patched_models.py +7 -7
  22. truefoundry/deploy/v2/lib/source.py +1 -1
  23. truefoundry/ml/__init__.py +2 -2
  24. truefoundry/ml/_autogen/client/__init__.py +457 -0
  25. truefoundry/ml/_autogen/client/api/__init__.py +16 -0
  26. truefoundry/ml/{autogen → _autogen}/client/api/auth_api.py +6 -6
  27. truefoundry/ml/{autogen → _autogen}/client/api/deprecated_api.py +12 -345
  28. truefoundry/ml/{autogen → _autogen}/client/api/experiments_api.py +89 -44
  29. truefoundry/ml/{autogen → _autogen}/client/api/generate_code_snippet_api.py +10 -10
  30. truefoundry/ml/{autogen → _autogen}/client/api/health_api.py +5 -5
  31. truefoundry/ml/{autogen → _autogen}/client/api/metrics_api.py +10 -10
  32. truefoundry/ml/{autogen → _autogen}/client/api/mlfoundry_artifacts_api.py +589 -197
  33. truefoundry/ml/{autogen → _autogen}/client/api/run_artifacts_api.py +14 -9
  34. truefoundry/ml/{autogen → _autogen}/client/api/runs_api.py +41 -41
  35. truefoundry/ml/{autogen → _autogen}/client/api_client.py +8 -8
  36. truefoundry/ml/{autogen → _autogen}/client/configuration.py +30 -58
  37. truefoundry/ml/{autogen → _autogen}/client/exceptions.py +2 -2
  38. truefoundry/ml/_autogen/client/models/__init__.py +428 -0
  39. truefoundry/ml/{autogen → _autogen}/client/models/agent_app.py +14 -7
  40. truefoundry/ml/{autogen/client/models/agent.py → _autogen/client/models/agent_manifest.py} +37 -35
  41. truefoundry/ml/{autogen/client/models/agent_open_api_tool.py → _autogen/client/models/agent_open_api_tool_manifest.py} +50 -37
  42. truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_with_fqn.py +45 -32
  43. truefoundry/ml/{autogen → _autogen}/client/models/agent_with_fqn.py +32 -30
  44. truefoundry/ml/_autogen/client/models/apply_request_dto.py +75 -0
  45. truefoundry/ml/_autogen/client/models/apply_response_dto.py +79 -0
  46. truefoundry/ml/{autogen → _autogen}/client/models/artifact_dto.py +7 -5
  47. truefoundry/ml/{autogen/client/models/artifact_version_manifest.py → _autogen/client/models/artifact_manifest.py} +39 -31
  48. truefoundry/ml/_autogen/client/models/artifact_path.py +70 -0
  49. truefoundry/ml/{autogen → _autogen}/client/models/artifact_response_dto.py +3 -3
  50. truefoundry/ml/{autogen → _autogen}/client/models/artifact_type.py +3 -3
  51. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_dto.py +10 -18
  52. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_response_dto.py +5 -3
  53. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_serialization_format.py +2 -2
  54. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_status.py +2 -2
  55. truefoundry/ml/{autogen → _autogen}/client/models/assistant_message.py +6 -6
  56. truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_request_dto.py +2 -2
  57. truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_version_request_dto.py +2 -2
  58. truefoundry/ml/{autogen → _autogen}/client/models/blob_storage_reference.py +6 -9
  59. truefoundry/ml/{autogen → _autogen}/client/models/body_get_search_runs_get.py +2 -2
  60. truefoundry/ml/{autogen/client/models/chat_prompt.py → _autogen/client/models/chat_prompt_manifest.py} +39 -37
  61. truefoundry/ml/{autogen/client/models/chat_prompt_messages_inner.py → _autogen/client/models/chat_prompt_manifest_messages_inner.py} +15 -15
  62. truefoundry/ml/{autogen → _autogen}/client/models/columns_dto.py +2 -2
  63. truefoundry/ml/{autogen → _autogen}/client/models/command.py +2 -2
  64. truefoundry/ml/{autogen → _autogen}/client/models/content.py +4 -4
  65. truefoundry/ml/{autogen → _autogen}/client/models/content1.py +4 -4
  66. truefoundry/ml/{autogen → _autogen}/client/models/content2.py +5 -5
  67. truefoundry/ml/{autogen → _autogen}/client/models/content2_any_of_inner.py +4 -4
  68. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_request_dto.py +3 -3
  69. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_response_dto.py +2 -2
  70. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_request_dto.py +3 -3
  71. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_response_dto.py +2 -2
  72. truefoundry/ml/{autogen → _autogen}/client/models/create_dataset_request_dto.py +21 -5
  73. truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_request_dto.py +3 -3
  74. truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_response_dto.py +2 -2
  75. truefoundry/ml/{autogen → _autogen}/client/models/create_model_version_request_dto.py +4 -12
  76. truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_request_dto.py +2 -2
  77. truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_response_dto.py +3 -3
  78. truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_request_dto.py +2 -2
  79. truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_request_dto.py +2 -2
  80. truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_response_dto.py +2 -2
  81. truefoundry/ml/{autogen → _autogen}/client/models/create_run_request_dto.py +3 -3
  82. truefoundry/ml/{autogen → _autogen}/client/models/create_run_response_dto.py +3 -3
  83. truefoundry/ml/{autogen → _autogen}/client/models/create_workflow_task_config_request_dto.py +2 -2
  84. truefoundry/ml/_autogen/client/models/data_directory_manifest.py +124 -0
  85. truefoundry/ml/{autogen → _autogen}/client/models/dataset_dto.py +15 -4
  86. truefoundry/ml/{autogen → _autogen}/client/models/dataset_response_dto.py +3 -3
  87. truefoundry/ml/{autogen → _autogen}/client/models/delete_artifact_versions_request_dto.py +2 -2
  88. truefoundry/ml/{autogen → _autogen}/client/models/delete_dataset_request_dto.py +2 -2
  89. truefoundry/ml/{autogen → _autogen}/client/models/delete_files_for_dataset_request_dto.py +2 -2
  90. truefoundry/ml/{autogen → _autogen}/client/models/delete_model_version_request_dto.py +2 -2
  91. truefoundry/ml/{autogen → _autogen}/client/models/delete_run_request.py +2 -2
  92. truefoundry/ml/{autogen → _autogen}/client/models/delete_tag_request_dto.py +2 -2
  93. truefoundry/ml/{autogen → _autogen}/client/models/experiment_dto.py +5 -5
  94. truefoundry/ml/{autogen → _autogen}/client/models/experiment_id_request_dto.py +2 -2
  95. truefoundry/ml/{autogen → _autogen}/client/models/experiment_response_dto.py +3 -3
  96. truefoundry/ml/{autogen → _autogen}/client/models/experiment_tag_dto.py +2 -2
  97. truefoundry/ml/{autogen → _autogen}/client/models/export_deployment_files_request_dto.py +3 -3
  98. truefoundry/ml/{autogen → _autogen}/client/models/external_blob_storage_source.py +17 -9
  99. truefoundry/ml/{autogen → _autogen}/client/models/fast_ai_framework.py +4 -7
  100. truefoundry/ml/{autogen → _autogen}/client/models/file_info_dto.py +6 -3
  101. truefoundry/ml/{autogen → _autogen}/client/models/finalize_artifact_version_request_dto.py +7 -15
  102. truefoundry/ml/{autogen → _autogen}/client/models/framework.py +17 -17
  103. truefoundry/ml/{autogen → _autogen}/client/models/get_artifact_version_aliases_response_dto.py +2 -2
  104. truefoundry/ml/{autogen → _autogen}/client/models/get_experiment_response_dto.py +4 -4
  105. truefoundry/ml/{autogen → _autogen}/client/models/get_latest_run_log_response_dto.py +3 -3
  106. truefoundry/ml/{autogen → _autogen}/client/models/get_metric_history_response.py +3 -3
  107. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_url_for_dataset_write_request_dto.py +2 -2
  108. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +2 -2
  109. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +3 -3
  110. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +2 -2
  111. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +3 -3
  112. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_request_dto.py +2 -2
  113. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_response_dto.py +3 -3
  114. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_write_response_dto.py +3 -3
  115. truefoundry/ml/{autogen → _autogen}/client/models/get_tenant_id_response_dto.py +2 -2
  116. truefoundry/ml/{autogen → _autogen}/client/models/gluon_framework.py +4 -6
  117. truefoundry/ml/{autogen → _autogen}/client/models/h2_o_framework.py +4 -6
  118. truefoundry/ml/{autogen → _autogen}/client/models/http_validation_error.py +3 -3
  119. truefoundry/ml/{autogen → _autogen}/client/models/image_content_part.py +6 -7
  120. truefoundry/ml/{autogen → _autogen}/client/models/image_url.py +4 -4
  121. truefoundry/ml/{autogen → _autogen}/client/models/infer_method_name.py +3 -3
  122. truefoundry/ml/{autogen → _autogen}/client/models/keras_framework.py +4 -6
  123. truefoundry/ml/{autogen → _autogen}/client/models/latest_run_log_dto.py +3 -3
  124. truefoundry/ml/{autogen → _autogen}/client/models/library_name.py +3 -3
  125. truefoundry/ml/{autogen → _autogen}/client/models/light_gbm_framework.py +4 -7
  126. truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_request_dto.py +4 -4
  127. truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_response_dto.py +5 -3
  128. truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_request_dto.py +3 -3
  129. truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_response_dto.py +3 -3
  130. truefoundry/ml/{autogen → _autogen}/client/models/list_colums_response_dto.py +3 -3
  131. truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_request_dto.py +2 -2
  132. truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_response_dto.py +3 -3
  133. truefoundry/ml/{autogen → _autogen}/client/models/list_experiments_response_dto.py +3 -3
  134. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_version_request_dto.py +2 -2
  135. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_versions_response_dto.py +3 -3
  136. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_request_dto.py +2 -2
  137. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_response_dto.py +3 -3
  138. truefoundry/ml/{autogen → _autogen}/client/models/list_latest_run_logs_response_dto.py +3 -3
  139. truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_request_dto.py +2 -2
  140. truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_response_dto.py +3 -3
  141. truefoundry/ml/{autogen → _autogen}/client/models/list_model_version_response_dto.py +3 -3
  142. truefoundry/ml/{autogen → _autogen}/client/models/list_model_versions_request_dto.py +3 -3
  143. truefoundry/ml/{autogen → _autogen}/client/models/list_models_request_dto.py +2 -2
  144. truefoundry/ml/{autogen → _autogen}/client/models/list_models_response_dto.py +3 -3
  145. truefoundry/ml/{autogen → _autogen}/client/models/list_run_artifacts_response_dto.py +3 -3
  146. truefoundry/ml/{autogen → _autogen}/client/models/list_run_logs_response_dto.py +3 -3
  147. truefoundry/ml/_autogen/client/models/local_artifact_source.py +91 -0
  148. truefoundry/ml/_autogen/client/models/local_model_source.py +77 -0
  149. truefoundry/ml/{autogen → _autogen}/client/models/log_batch_request_dto.py +5 -5
  150. truefoundry/ml/{autogen → _autogen}/client/models/log_metric_request_dto.py +2 -2
  151. truefoundry/ml/{autogen → _autogen}/client/models/log_param_request_dto.py +2 -2
  152. truefoundry/ml/_autogen/client/models/manifest.py +229 -0
  153. truefoundry/ml/_autogen/client/models/manifest1.py +217 -0
  154. truefoundry/ml/{autogen/client/models/internal_metadata.py → _autogen/client/models/manifest2.py} +68 -50
  155. truefoundry/ml/{autogen → _autogen}/client/models/method.py +3 -3
  156. truefoundry/ml/{autogen → _autogen}/client/models/metric_collection_dto.py +3 -3
  157. truefoundry/ml/{autogen → _autogen}/client/models/metric_dto.py +2 -2
  158. truefoundry/ml/{autogen → _autogen}/client/models/mime_type.py +3 -3
  159. truefoundry/ml/{autogen → _autogen}/client/models/model_configuration.py +8 -9
  160. truefoundry/ml/{autogen → _autogen}/client/models/model_dto.py +6 -6
  161. truefoundry/ml/{autogen/client/models/model_version_manifest.py → _autogen/client/models/model_manifest.py} +43 -35
  162. truefoundry/ml/{autogen → _autogen}/client/models/model_response_dto.py +3 -3
  163. truefoundry/ml/{autogen → _autogen}/client/models/model_server.py +2 -2
  164. truefoundry/ml/{autogen → _autogen}/client/models/model_version_dto.py +9 -11
  165. truefoundry/ml/{autogen → _autogen}/client/models/model_version_environment.py +5 -7
  166. truefoundry/ml/{autogen → _autogen}/client/models/model_version_response_dto.py +3 -3
  167. truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_dto.py +4 -4
  168. truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_response_dto.py +3 -3
  169. truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_storage_provider.py +2 -2
  170. truefoundry/ml/{autogen → _autogen}/client/models/notify_artifact_version_failure_dto.py +2 -2
  171. truefoundry/ml/{autogen → _autogen}/client/models/onnx_framework.py +4 -6
  172. truefoundry/ml/{autogen → _autogen}/client/models/openapi_spec.py +4 -4
  173. truefoundry/ml/{autogen → _autogen}/client/models/paddle_framework.py +4 -7
  174. truefoundry/ml/{autogen → _autogen}/client/models/param_dto.py +2 -2
  175. truefoundry/ml/{autogen → _autogen}/client/models/parameters.py +4 -4
  176. truefoundry/ml/{autogen → _autogen}/client/models/py_torch_framework.py +4 -7
  177. truefoundry/ml/{autogen → _autogen}/client/models/resolve_agent_app_response_dto.py +3 -3
  178. truefoundry/ml/{autogen → _autogen}/client/models/restore_run_request_dto.py +2 -2
  179. truefoundry/ml/{autogen → _autogen}/client/models/run_data_dto.py +5 -5
  180. truefoundry/ml/{autogen → _autogen}/client/models/run_dto.py +4 -4
  181. truefoundry/ml/{autogen → _autogen}/client/models/run_info_dto.py +3 -3
  182. truefoundry/ml/{autogen → _autogen}/client/models/run_log_dto.py +2 -2
  183. truefoundry/ml/{autogen → _autogen}/client/models/run_log_input_dto.py +2 -2
  184. truefoundry/ml/{autogen → _autogen}/client/models/run_response_dto.py +3 -3
  185. truefoundry/ml/{autogen → _autogen}/client/models/run_tag_dto.py +2 -2
  186. truefoundry/ml/{autogen → _autogen}/client/models/search_runs_request_dto.py +2 -2
  187. truefoundry/ml/{autogen → _autogen}/client/models/search_runs_response_dto.py +3 -3
  188. truefoundry/ml/{autogen → _autogen}/client/models/set_experiment_tag_request_dto.py +2 -2
  189. truefoundry/ml/{autogen → _autogen}/client/models/set_tag_request_dto.py +2 -2
  190. truefoundry/ml/{autogen → _autogen}/client/models/signed_url_dto.py +3 -4
  191. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_framework.py +9 -10
  192. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_model_schema.py +7 -8
  193. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_serialization_format.py +3 -3
  194. truefoundry/ml/{autogen → _autogen}/client/models/source.py +34 -9
  195. truefoundry/ml/{autogen → _autogen}/client/models/source1.py +5 -5
  196. truefoundry/ml/_autogen/client/models/source2.py +177 -0
  197. truefoundry/ml/{autogen → _autogen}/client/models/spa_cy_framework.py +4 -6
  198. truefoundry/ml/{autogen → _autogen}/client/models/stats_models_framework.py +4 -7
  199. truefoundry/ml/{autogen → _autogen}/client/models/stop.py +2 -2
  200. truefoundry/ml/{autogen → _autogen}/client/models/store_run_logs_request_dto.py +3 -3
  201. truefoundry/ml/{autogen → _autogen}/client/models/subject.py +3 -3
  202. truefoundry/ml/{autogen → _autogen}/client/models/subject_type.py +2 -2
  203. truefoundry/ml/{autogen → _autogen}/client/models/system_message.py +6 -8
  204. truefoundry/ml/{autogen → _autogen}/client/models/tensor_flow_framework.py +4 -7
  205. truefoundry/ml/{autogen → _autogen}/client/models/text.py +4 -4
  206. truefoundry/ml/{autogen → _autogen}/client/models/text_content_part.py +5 -5
  207. truefoundry/ml/{autogen → _autogen}/client/models/transformers_framework.py +8 -12
  208. truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_request_dto.py +3 -3
  209. truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_response_dto.py +2 -2
  210. truefoundry/ml/{autogen → _autogen}/client/models/true_foundry_managed_source.py +18 -12
  211. truefoundry/ml/{autogen → _autogen}/client/models/update_artifact_version_request_dto.py +5 -7
  212. truefoundry/ml/{autogen → _autogen}/client/models/update_dataset_request_dto.py +13 -3
  213. truefoundry/ml/{autogen → _autogen}/client/models/update_experiment_request_dto.py +2 -2
  214. truefoundry/ml/{autogen → _autogen}/client/models/update_model_version_request_dto.py +5 -7
  215. truefoundry/ml/{autogen → _autogen}/client/models/update_run_request_dto.py +2 -2
  216. truefoundry/ml/{autogen → _autogen}/client/models/update_run_response_dto.py +3 -3
  217. truefoundry/ml/{autogen → _autogen}/client/models/url.py +4 -4
  218. truefoundry/ml/{autogen → _autogen}/client/models/user_message.py +6 -6
  219. truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_request_dto.py +2 -2
  220. truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_response_dto.py +2 -2
  221. truefoundry/ml/{autogen → _autogen}/client/models/validation_error.py +3 -3
  222. truefoundry/ml/{autogen → _autogen}/client/models/validation_error_loc_inner.py +2 -2
  223. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_framework.py +7 -10
  224. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_model_schema.py +6 -7
  225. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_serialization_format.py +3 -3
  226. truefoundry/ml/{autogen → _autogen}/client/rest.py +3 -3
  227. truefoundry/ml/_autogen/client_README.md +359 -0
  228. truefoundry/ml/_autogen/entities/artifacts.py +558 -0
  229. truefoundry/ml/artifact/truefoundry_artifact_repo.py +1 -1
  230. truefoundry/ml/cli/commands/model_init.py +1 -1
  231. truefoundry/ml/clients/servicefoundry_client.py +7 -2
  232. truefoundry/ml/entities.py +1 -1
  233. truefoundry/ml/log_types/artifacts/artifact.py +22 -85
  234. truefoundry/ml/log_types/artifacts/dataset.py +5 -5
  235. truefoundry/ml/log_types/artifacts/general_artifact.py +1 -1
  236. truefoundry/ml/log_types/artifacts/model.py +12 -13
  237. truefoundry/ml/log_types/artifacts/utils.py +18 -2
  238. truefoundry/ml/log_types/image/image.py +1 -1
  239. truefoundry/ml/log_types/plot.py +1 -1
  240. truefoundry/ml/mlfoundry_api.py +2 -42
  241. truefoundry/ml/mlfoundry_run.py +1 -1
  242. truefoundry/ml/model_framework.py +3 -3
  243. truefoundry/ml/session.py +7 -4
  244. truefoundry/ml/validation_utils.py +1 -1
  245. truefoundry/workflow/map_task.py +5 -2
  246. {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/METADATA +2 -1
  247. truefoundry-0.5.11rc1.dist-info/RECORD +377 -0
  248. truefoundry/deploy/auto_gen/models.py +0 -1915
  249. truefoundry/ml/autogen/client/__init__.py +0 -445
  250. truefoundry/ml/autogen/client/api/__init__.py +0 -16
  251. truefoundry/ml/autogen/client/models/__init__.py +0 -416
  252. truefoundry/ml/autogen/client/models/add_custom_metrics_to_model_version_request_dto.py +0 -69
  253. truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +0 -69
  254. truefoundry/ml/autogen/client/models/manifest.py +0 -154
  255. truefoundry/ml/autogen/client_README.md +0 -361
  256. truefoundry/ml/autogen/entities/artifacts.py +0 -670
  257. truefoundry-0.5.10rc1.dist-info/RECORD +0 -370
  258. /truefoundry/ml/{autogen → _autogen}/__init__.py +0 -0
  259. /truefoundry/ml/{autogen → _autogen}/client/api_response.py +0 -0
  260. /truefoundry/ml/{autogen → _autogen}/models/__init__.py +0 -0
  261. /truefoundry/ml/{autogen → _autogen}/models/exceptions.py +0 -0
  262. /truefoundry/ml/{autogen → _autogen}/models/schema.py +0 -0
  263. /truefoundry/ml/{autogen → _autogen}/models/signature.py +0 -0
  264. /truefoundry/ml/{autogen → _autogen}/models/utils.py +0 -0
  265. {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/WHEEL +0 -0
  266. {truefoundry-0.5.10rc1.dist-info → truefoundry-0.5.11rc1.dist-info}/entry_points.txt +0 -0
@@ -1,1915 +0,0 @@
1
- # generated by datamodel-codegen:
2
- # filename: application.json
3
- # timestamp: 2025-02-19T09:48:05+00:00
4
-
5
- from __future__ import annotations
6
-
7
- from enum import Enum
8
- from typing import Any, Dict, List, Literal, Optional, Union
9
-
10
- from truefoundry.pydantic_v1 import (
11
- BaseModel,
12
- Field,
13
- PositiveFloat,
14
- PositiveInt,
15
- confloat,
16
- conint,
17
- constr,
18
- )
19
-
20
-
21
- class AMQPInputConfig(BaseModel):
22
- """
23
- +docs=Describes the configuration for the input AMQP worker
24
- +label=AMQP
25
- """
26
-
27
- type: Literal["amqp"] = Field(..., description="+value=amqp")
28
- url: constr(
29
- regex=r"^(amqp|amqps?)://(?:[^:@]+(?::[^:@]+)?@)?([^/?]+)(?:/([^?]+))?/?([^?]+)?(?:\?(.*))?$"
30
- ) = Field(
31
- ...,
32
- description="+label=Queue URL\n+usage=AMQP Queue URL of Subscriber\n+sort=1",
33
- )
34
- queue_name: str = Field(
35
- ..., description="+label=Queue Name\n+usage=AMQP Queue Name\n+sort=2"
36
- )
37
- wait_time_seconds: conint(ge=1) = Field(
38
- 5, description="+label=Wait Time Seconds\n+usage=Wait timeout for long polling."
39
- )
40
-
41
-
42
- class AMQPMetricConfig(BaseModel):
43
- type: Literal["amqp"] = Field(..., description="+value=amqp")
44
- queue_length: conint(ge=1) = Field(
45
- ...,
46
- description="+label=Queue Length\n+usage=Upper limit of the number of backlog messages the auto-scaler will try to maintain per replica. If you set this number to 10 and have 30 messages in the stream and one replica, the auto-scaler will scale the number of replicas to 3.",
47
- )
48
-
49
-
50
- class AMQPOutputConfig(BaseModel):
51
- """
52
- +docs=Describes the configuration for the output AMQP worker
53
- +label=AMQP
54
- """
55
-
56
- type: Literal["amqp"] = Field(..., description="+value=amqp")
57
- url: constr(
58
- regex=r"^(amqp|amqps?)://(?:[^:@]+(?::[^:@]+)?@)?([^/?]+)(?:/([^?]+))?/?([^?]+)?(?:\?(.*))?$"
59
- ) = Field(
60
- ..., description="+label=Queue URL\n+usage=AMQP Queue URL of Publisher\n+sort=1"
61
- )
62
- routing_key: str = Field(
63
- ...,
64
- description="+label=Routing Key\n+usage=AMQP Routing Key to publish to.\n+sort=2",
65
- )
66
- exchange_name: Optional[str] = Field(
67
- None, description="+label=Exchange Name\n+usage=AMQP Exchange Name\n+sort=3"
68
- )
69
-
70
-
71
- class AWSAccessKeyAuth(BaseModel):
72
- aws_access_key_id: str = Field(
73
- ..., description="+label=AWS Access Key ID\n+usage=AWS Access Key ID\n+sort=1"
74
- )
75
- aws_secret_access_key: str = Field(
76
- ...,
77
- description="+label=AWS Secret Access Key\n+usage=AWS Secret Access Key for the user to authenticate with\n+sort=2",
78
- )
79
- aws_session_token: Optional[str] = Field(
80
- None,
81
- description="+label=AWS Session Token\n+usage=AWS Session Token, only required when using temporary credentials\n+sort=3",
82
- )
83
-
84
-
85
- class AWSInferentia(BaseModel):
86
- type: Literal["aws_inferentia"] = Field(..., description="+value=aws_inferentia")
87
- name: Optional[str] = Field(
88
- None,
89
- description="+label=Inferentia accelerator name\n+usage=Name of the AWS Inferentia Accccelerator. One of [INF1, INF2].\nThis field is required for Node Selector and can be ignored in Nodepool Selector.",
90
- )
91
- count: conint(ge=1, le=16) = Field(
92
- ...,
93
- description="+label=Count\n+usage=Count of Inferentia accelerator chips to provide to the application",
94
- )
95
-
96
-
97
- class ArtifactsCacheVolume(BaseModel):
98
- """
99
- +docs=Describes the volume that will be used to cache the models
100
- +label=Artifacts Cache Volume
101
- """
102
-
103
- storage_class: str = Field(
104
- ...,
105
- description="+label=Storage Class\n+usage=Storage class of the Volume where artifacts will be cached",
106
- )
107
- cache_size: conint(ge=1, le=1000) = Field(
108
- 200,
109
- description="+label=Cache Size (GB)\n+usage=Size of the Volume (in GB) where artifacts will be cached. Should be greater than twice the size of artifacts getting cached",
110
- )
111
-
112
-
113
- class AsyncProcessorSidecar(BaseModel):
114
- destination_url: str = Field(
115
- ...,
116
- description="+label=Destination URL\n+usage=URL for the processor to invoke",
117
- )
118
- request_timeout: conint(ge=1) = Field(
119
- 10,
120
- description="+label=Request Timeout Seconds\n+usage=Timeout for the invoke request in seconds",
121
- )
122
- sidecar_image: Optional[str] = Field(
123
- None,
124
- description="+label=Sidecar Image\n+usage=Image for the processor sidecar (This field will be deprecated in the future)",
125
- )
126
-
127
-
128
- class Autoshutdown(BaseModel):
129
- wait_time: conint(ge=0) = Field(
130
- 300,
131
- description="+label=Wait Time\n+usage=The period to wait after the last received request before scaling the replicas to 0",
132
- )
133
-
134
-
135
- class BaseAutoscaling(BaseModel):
136
- min_replicas: conint(ge=0) = Field(
137
- 1,
138
- description="+label=Minimum replicas\n+usage=Minimum number of replicas to keep available\n+sort=1",
139
- )
140
- max_replicas: conint(ge=1, le=500) = Field(
141
- ...,
142
- description="+label=Maximum replicas\n+usage=Maximum number of replicas allowed for the component.\n+sort=2",
143
- )
144
- polling_interval: conint(ge=0) = Field(
145
- 30,
146
- description="+label=Polling Interval\n+usage=This is the interval to check each trigger on.",
147
- )
148
-
149
-
150
- class BasicAuthCreds(BaseModel):
151
- """
152
- +label=Username and password
153
- """
154
-
155
- type: Literal["basic_auth"] = Field(..., description="+value=basic_auth")
156
- username: str = Field(
157
- ...,
158
- description="+label=Username for service auth\n+message=Username for the user to authenticate with\n+sort=1",
159
- )
160
- password: str = Field(
161
- ...,
162
- description="+label=Password for service auth\n+message=Password for the user to authenticate with\n+sort=2",
163
- )
164
-
165
-
166
- class BlueGreen(BaseModel):
167
- """
168
- +docs=This strategy brings up the new release completely before switching the complete load to the new release.
169
- This minimizes the time that two versions are serving traffic at the same time.
170
- +label=Blue Green strategy
171
- """
172
-
173
- type: Literal["blue_green"] = Field(..., description="+value=blue_green")
174
- enable_auto_promotion: bool = Field(
175
- False,
176
- description="+docs=Promote the new release to handle the complete traffic. A manual promotion would be needed if this is disabled\n+label=Auto-promotion",
177
- )
178
- auto_promotion_seconds: conint(ge=0) = Field(
179
- 30,
180
- description="+docs=Promote the new release to handle the complete traffic after waiting for these many seconds\n+label=Auto-promotion seconds",
181
- )
182
-
183
-
184
- class CPUUtilizationMetric(BaseModel):
185
- type: Literal["cpu_utilization"] = Field(..., description="+value=cpu_utilization")
186
- value: conint(ge=1, le=100) = Field(
187
- ...,
188
- description="+label=CPU utilization %\n+usage=Percentage of cpu request averaged over all replicas which the autoscaler should try to maintain",
189
- )
190
-
191
-
192
- class CanaryStep(BaseModel):
193
- weight_percentage: conint(ge=0, le=100) = Field(
194
- ...,
195
- description="+docs=Percentage of total traffic to be shifted to the canary release.\nThe rest will continue to go to the existing deployment\n+label=Canary weight percentage\n+unit=%\n+placeholder=Weight",
196
- )
197
- pause_duration: conint(ge=0) = Field(
198
- 30,
199
- description="+docs=Duration for which to pause the release. The release process will wait for these seconds before proceeding to the next step.\nIf this is not set, the step will pause indefinitely on this step\n+label=Pause duration\n+unit=seconds\n+placeholder=Duration",
200
- )
201
-
202
-
203
- class CronMetric(BaseModel):
204
- type: Literal["cron"] = Field(..., description="+value=cron")
205
- desired_replicas: Optional[conint(ge=1)] = Field(
206
- None,
207
- description="+label=Desired Replicas\n+usage=Desired number of replicas during the given interval. Default value is max_replicas.",
208
- )
209
- start: str = Field(
210
- ...,
211
- description="+label=Start Schedule\n+docs=Cron expression indicating the start of the cron schedule.\n+usage=Cron expression indicating the start of the cron schedule.\n```\n* * * * *\n| | | | |\n| | | | |___ day of week (0-6) (Sunday is 0)\n| | | |_____ month (1-12)\n| | |_______ day of month (1-31)\n| |_________ hour (0-23)\n|___________ minute (0-59)\n```",
212
- )
213
- end: str = Field(
214
- ...,
215
- description="+label=End Schedule\n+docs=Cron expression indicating the end of the cron schedule.\n+usage=Cron expression indicating the end of the cron schedule.\n```\n* * * * *\n| | | | |\n| | | | |___ day of week (0-6) (Sunday is 0)\n| | | |_____ month (1-12)\n| | |_______ day of month (1-31)\n| |_________ hour (0-23)\n|___________ minute (0-59)\n```",
216
- )
217
- timezone: str = Field(
218
- "UTC",
219
- description='+usage=Timezone against which the cron schedule will be calculated, e.g. "Asia/Tokyo". Default is machine\'s local time.\nhttps://docs.truefoundry.com/docs/list-of-supported-timezones',
220
- )
221
-
222
-
223
- class DockerFileBuild(BaseModel):
224
- """
225
- +docs=Describes that we are using a dockerfile to build our image
226
- +label=Docker File (I already have Docker File)
227
- +icon=fa-brands fa-docker:#0db7ed
228
- """
229
-
230
- type: Literal["dockerfile"] = Field(..., description="+value=dockerfile")
231
- dockerfile_path: str = Field(
232
- "./Dockerfile",
233
- description="+label=Path to Dockerfile\n+usage=The file path of the Dockerfile relative to project root path.",
234
- )
235
- build_context_path: str = Field(
236
- "./",
237
- description="+label=Path to build context\n+usage=Build context path for the Dockerfile relative to project root path.",
238
- )
239
- command: Optional[Union[str, List[str]]] = Field(
240
- None,
241
- description="+label=Command Override\n+usage=Override the command to run when the container starts\nWhen deploying a Job, the command can be templatized by defining `params` and referencing them in command\nE.g. `python main.py --learning_rate {{learning_rate}}`",
242
- )
243
- build_args: Optional[Dict[str, str]] = Field(
244
- None, description="+label=Build arguments to pass to docker build"
245
- )
246
-
247
-
248
- class DynamicVolumeConfig(BaseModel):
249
- """
250
- +label=Dynamic Volume Config
251
- """
252
-
253
- type: Literal["dynamic"] = Field(
254
- ...,
255
- description="+label=Volume Type\n+value=dynamic\n+usage=Volume Type for the volume.",
256
- )
257
- storage_class: str = Field(
258
- ...,
259
- description="+label=Storage Class Name\n+usage=Name of the storage class to be used for the volume.",
260
- )
261
- size: conint(ge=1, le=64000) = Field(
262
- ..., description="+label=Size\n+unit=Gi\n+usage=Size of volume in Gi"
263
- )
264
-
265
-
266
- class Endpoint(BaseModel):
267
- host: constr(
268
- regex=r"^((([a-zA-Z0-9\-]{1,63}\.)([a-zA-Z0-9\-]{1,63}\.)*([A-Za-z]{1,63}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$"
269
- ) = Field(
270
- ...,
271
- description="+usage=Host e.g. ai.example.com, app.truefoundry.com\n+message=Upto 253 characters, each part of host should be at most 63 characters long, can contain alphabets, digits and hypen, must begin and end with an alphanumeric characters. Parts must be separated by periods (.)",
272
- )
273
- path: Optional[
274
- constr(regex=r"^(/([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9]))*/$")
275
- ] = Field(
276
- None,
277
- description="+usage=Path e.g. /v1/api/ml/, /v2/docs/\n+message=Should begin and end with a forward slash (/). Each part can can contain alphabets, digits and hypen, must begin and end with an alphanumeric characters. Parts should be separated by forward slashes (/)",
278
- )
279
-
280
-
281
- class FlyteLaunchPlanID(BaseModel):
282
- resourceType: Literal["LAUNCH_PLAN"]
283
- name: str
284
-
285
-
286
- class FlyteTaskID(BaseModel):
287
- resourceType: Literal["TASK"]
288
- name: str
289
-
290
-
291
- class FlyteWorkflowID(BaseModel):
292
- resourceType: Literal["WORKFLOW"]
293
- name: str
294
-
295
-
296
- class FlyteWorkflowTemplate(BaseModel):
297
- id: FlyteWorkflowID
298
-
299
-
300
- class GcpTPU(BaseModel):
301
- type: Literal["gcp_tpu"] = Field(..., description="+value=gcp_tpu")
302
- name: constr(regex=r"^tpu-[a-z\d\-]+$") = Field(
303
- ...,
304
- description="+label=TPU Type name\n+usage=Name of the TPU Type. One of\n - `tpu-v4-podslice` (TPU v4, ct4p)\n - `tpu-v5-lite-device` (TPU v5e, ct5l)\n - `tpu-v5-lite-podslice` (TPU v5e, ct5lp)\n - `tpu-v5p-slice` (TPU v5p, ct5p)",
305
- )
306
- topology: constr(regex=r"^\d+x\d+(x\d+)?$") = Field(
307
- ...,
308
- description="+label=Slice Topology\n+usage=Topology of the TPU slices. Currently only single-host topology is supported.\n Please refer to [TPUs on GKE docs](https://cloud.google.com/kubernetes-engine/docs/concepts/tpus#plan-tpu-configuration)\n Allowed Values:\n - `2x2x1` for `tpu-v4-podslice`\n - One of `1x1`, `2x2`, `2x4` for `tpu-v5-lite-device` and `tpu-v5-lite-podslice`\n - `2x2x1` for `tpu-v5p-slice`",
309
- )
310
-
311
-
312
- class GitHelmRepo(BaseModel):
313
- type: Literal["git-helm-repo"] = Field(..., description="+value=git-helm-repo")
314
- repo_url: constr(
315
- regex=r"^(((https?|wss):\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$"
316
- ) = Field(
317
- ...,
318
- description="TODO: Check this regex and add guidelines\n+label=Git repository URL\n+sort=1\n+message=Needs to be a valid URL.",
319
- )
320
- revision: str = Field(
321
- ...,
322
- description="+label=Revision\n+sort=2\n+usage=Branch/Commit SHA/Tag of the git repo.",
323
- )
324
- path: str = Field(
325
- ..., description="+label=Path\n+sort=3\n+usage=Path to the chart."
326
- )
327
- value_files: Optional[List[str]] = Field(
328
- None,
329
- description="+label=Value files\n+sort=3\n+usage=Helm values files for overriding values in the helm chart.\nThe path is relative to the Path directory defined above",
330
- )
331
-
332
-
333
- class GitSource(BaseModel):
334
- """
335
- +docs=Describes that we are using code stored in a git repository to build our image
336
- +label=Git Source
337
- +icon=fa-solid fa-code-branch:black
338
- +sort=300
339
- """
340
-
341
- type: Literal["git"] = Field(..., description="+value=git")
342
- repo_url: constr(
343
- regex=r"^(http(s?)://)(github\.com|(.+@)*bitbucket\.org|gitlab\.com|(.*)@dev.azure.com).*$"
344
- ) = Field(
345
- ...,
346
- description="+label=Repo URL\n+usage=The repository URL.\n+sort=1\n+message=Needs to be a valid Github, Bitbucket, Azure Repos or Gitlab link",
347
- )
348
- ref: str = Field(
349
- ..., description="+label=Commit SHA\n+usage=The commit SHA.\n+sort=2"
350
- )
351
- branch_name: Optional[str] = Field(
352
- None,
353
- description="+label=Branch Name\n+usage=Selecting branch will select latest commit SHA of the branch.\n+sort=3",
354
- )
355
-
356
-
357
- class HelmRepo(BaseModel):
358
- type: Literal["helm-repo"] = Field(..., description="+value=helm-repo")
359
- repo_url: constr(
360
- regex=r"^(((https?|wss):\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$"
361
- ) = Field(
362
- ...,
363
- description="+label=Helm repository URL\n+sort=1\n+message=Needs to be a valid URL.",
364
- )
365
- integration_fqn: Optional[str] = Field(
366
- None,
367
- description='+docs=FQN of the helm repo integration. You can use the FQN of your desired helm integration (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations) page\n+label=Helm repo integration\n+sort=2\n+usage=FQN of the helm repo integration. If you can\'t find your integration here,\nadd it through the [Integrations](/integrations) page\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"helm-repo"}',
368
- )
369
- chart: str = Field(
370
- ...,
371
- description='+label=Chart name\n+sort=3\n+usage=The helm chart name\n+uiType=InputSelect\n+uiProps={"creatable":true, "searchable":true}',
372
- )
373
- version: str = Field(
374
- ...,
375
- description='+label=Version\n+sort=4\n+usage=Helm chart version\n+uiType=InputSelect\n+uiProps={"creatable":true, "searchable":true}',
376
- )
377
-
378
-
379
- class HttpProbe(BaseModel):
380
- """
381
- +docs=Describes the Instructions for assessing container health by executing an HTTP GET request.
382
- To learn more you can go [here](https://docs.truefoundry.com/docs/liveness-readiness-probe)
383
- +label=Instructions for assessing container health by executing an HTTP GET request.
384
- """
385
-
386
- type: Literal["http"] = Field(
387
- ..., description="+sort=1\n+label=Request Type\n+value=http"
388
- )
389
- path: str = Field(
390
- ..., description="+usage=Path to the health check endpoint\n+sort=2"
391
- )
392
- port: conint(ge=0, le=65535) = Field(
393
- ..., description="+usage=Listening port for the health check endpoint\n+sort=3"
394
- )
395
- host: Optional[str] = Field(
396
- None,
397
- description="+sort=4\n+usage=Host name to connect to, defaults to the pod IP",
398
- )
399
- scheme: str = Field(
400
- "HTTP", description="+sort=5\n+usage=Scheme to use for connecting to the host"
401
- )
402
-
403
-
404
- class HuggingfaceArtifactSource(BaseModel):
405
- """
406
- +docs=Input for Artifact from Huggingface Model Hub
407
- +label=Huggingface Model Source
408
- """
409
-
410
- type: Literal["huggingface-hub"] = Field(..., description="+value=huggingface-hub")
411
- model_id: str = Field(
412
- ...,
413
- description="+label=Model ID\n+usage=Model ID of the artifact to be downloaded",
414
- )
415
- revision: str = Field(
416
- ...,
417
- description="+label=Revision\n+usage=Revision of the artifact to be downloaded",
418
- )
419
- ignore_patterns: List[str] = Field(
420
- ["*.h5", "*.ot", "*.tflite", "*.msgpack"],
421
- description="+label=Ignore Patterns\n+usage=List of patterns to ignore while downloading the artifact",
422
- )
423
- download_path_env_variable: str = Field(
424
- ...,
425
- description="+label=Download Path Environment Variable\n+usage=Environment variable which will contain the download path of the artifact",
426
- )
427
-
428
-
429
- class Image(BaseModel):
430
- """
431
- +docs=Describes that we are using a pre-built image stored in a Docker Image registry
432
- +label=Docker Image (Deploy an existing image)
433
- +icon=fa-brands fa-docker:#0db7ed
434
- """
435
-
436
- type: Literal["image"] = Field(..., description="+value=image")
437
- image_uri: constr(regex=r"^\S*$") = Field(
438
- ...,
439
- description="+label=Image URI\n+usage=The image URI. Specify the name of the image and the tag.\nIf the image is in Dockerhub, you can skip registry-url (for e.g. `tensorflow/tensorflow`).\nYou can use an image from a private registry using Advanced fields\n+placeholder=registry-url/account/image:version (e.g. docker.io/tensorflow/tensorflow)",
440
- )
441
- docker_registry: Optional[str] = Field(
442
- None,
443
- description="+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+usage=FQN of the container registry. If you can't find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page",
444
- )
445
- command: Optional[Union[str, List[str]]] = Field(
446
- None,
447
- description="+label=Command Override\n+usage=Override the command to run when container starts.\nWhen deploying a Job, the command can be templatized by defining `params` and referencing them in command\nE.g. `python main.py --learning_rate {{learning_rate}}`",
448
- )
449
-
450
-
451
- class JobAlert(BaseModel):
452
- """
453
- +docs=Describes the configuration for the job alerts
454
- +label=Alert
455
- """
456
-
457
- notification_channel: constr(min_length=1) = Field(
458
- ...,
459
- description='+label=Notification Channel\n+usage=Specify the notification channel to send alerts to\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"notification-channel"}\n+sort=660',
460
- )
461
- to_emails: Optional[List[constr(min_length=1)]] = Field(
462
- None,
463
- description="+label=To Emails\n+usage=List of recipients' email addresses if the notification channel is Email.\n+docs=Specify the emails to send alerts to\n+sort=665",
464
- )
465
- on_start: bool = Field(
466
- False,
467
- description="+label=On Start\n+usage=Send an alert when the job starts\n+sort=670",
468
- )
469
- on_completion: bool = Field(
470
- False,
471
- description="+label=On Completion\n+usage=Send an alert when the job completes\n+sort=680",
472
- )
473
- on_failure: bool = Field(
474
- True,
475
- description="+label=On Failure\n+usage=Send an alert when the job fails\n+sort=690",
476
- )
477
-
478
-
479
- class Claim(BaseModel):
480
- key: str
481
- values: List[str]
482
-
483
-
484
- class JwtAuthCreds(BaseModel):
485
- """
486
- +label=JWT Authentication
487
- +usage=Configure JWT-based authentication using JWKS
488
- """
489
-
490
- type: Literal["jwt_auth"] = Field(..., description="+value=jwt_auth")
491
- issuer: str = Field(
492
- ..., description="+label=Issuer\n+usage=The issuer of the JWT tokens"
493
- )
494
- jwksUri: str = Field(
495
- ...,
496
- description="+label=JWKS URI\n+usage=The URI of the JSON Web Key Set (JWKS) containing the public keys",
497
- )
498
- claims: Optional[List[Claim]] = Field(
499
- None,
500
- description="+label=Claims\n+usage=List of key-value pairs of claims to verify in the JWT token",
501
- )
502
-
503
-
504
- class KafkaMetricConfig(BaseModel):
505
- type: Literal["kafka"] = Field(..., description="+value=kafka")
506
- lag_threshold: conint(ge=1) = Field(
507
- ...,
508
- description="+label=Lag Threshold\n+usage=Upper limit of the number of backlog messages the auto-scaler will try to maintain per replica. If you set this number to 10 and have 30 messages in the stream and one replica, the auto-scaler will scale the number of replicas to 3.",
509
- )
510
-
511
-
512
- class KafkaSASLAuth(BaseModel):
513
- username: str = Field(
514
- ...,
515
- description="+label=Username\n+usage=Username for SASL authentication\n+sort=1",
516
- )
517
- password: str = Field(
518
- ...,
519
- description="+label=Password\n+usage=Password for SASL authentication\n+sort=2",
520
- )
521
-
522
-
523
- class Kustomize(BaseModel):
524
- patch: Optional[Dict[str, Any]] = Field(
525
- None,
526
- description="+label=Patch\n+usage=Content of kustomization.yaml to perform kustomize operation. Please do not include the `resources` section. It is filled in automatically",
527
- )
528
- additions: Optional[List[Dict[str, Any]]] = Field(
529
- None,
530
- description="+label=Additional Manifests\n+usage=Additional kubernetes manifests to be included in the application",
531
- )
532
-
533
-
534
- class LocalSource(BaseModel):
535
- """
536
- +docs=Describes that we are using code stored in a local developement environment to build our image
537
- +label=Local
538
- +icon=fa-folder:black
539
- +sort=100
540
- """
541
-
542
- type: Literal["local"] = Field(..., description="+value=local")
543
- project_root_path: str = Field("./", description="+usage=Local project root path.")
544
- local_build: bool = Field(True, description="run docker build locally")
545
-
546
-
547
- class Manual(BaseModel):
548
- """
549
- +docs=Describes that we are going to manually trigger our job.
550
- +label=Manual
551
- +usage=Trigger the job manually. [Docs](https://docs.truefoundry.com/docs/deploy-a-cron-job)
552
- """
553
-
554
- type: Literal["manual"] = Field(..., description="+value=manual")
555
-
556
-
557
- class NATSMetricConfig(BaseModel):
558
- type: Literal["nats"] = Field(..., description="+value=nats")
559
- lag_threshold: conint(ge=1) = Field(
560
- ...,
561
- description="+label=Lag Threshold\n+usage=Upper limit of the number of backlog messages the auto-scaler will try to maintain per replica. If you set this number to 10 and have 30 messages in the stream and one replica, the auto-scaler will scale the number of replicas to 3.",
562
- )
563
-
564
-
565
- class NATSUserPasswordAuth(BaseModel):
566
- """
567
- +docs=NATS User Password Authentication
568
- +label=NATS User Password Authentication
569
- """
570
-
571
- account_name: str = Field(
572
- "$G",
573
- description="+label=Account Name\n+usage=Name of the NATS account\n+sort=1",
574
- )
575
- user: str = Field(
576
- ..., description="+label=User\n+usage=User for NATS authentication\n+sort=2"
577
- )
578
- password: str = Field(
579
- ...,
580
- description="+label=Password\n+usage=Password for NATS authentication\n+sort=3",
581
- )
582
-
583
-
584
- class CapacityType(str, Enum):
585
- """
586
- +label=Capacity Type
587
- +usage=Configure what type of nodes to run the app. By default no placement logic is applied.
588
- "spot_fallback_on_demand" will try to place the application on spot nodes but will fallback to on-demand when spot nodes are not available.
589
- "spot" will strictly place the application on spot nodes.
590
- "on_demand" will strictly place the application on on-demand nodes.
591
- """
592
-
593
- spot_fallback_on_demand = "spot_fallback_on_demand"
594
- spot = "spot"
595
- on_demand = "on_demand"
596
-
597
-
598
- class NodeSelector(BaseModel):
599
- """
600
- +label=Node selector
601
- +usage=Constraints to select a Node - Specific GPU / Instance Families, On-Demand/Spot.
602
- """
603
-
604
- type: Literal["node_selector"] = Field(..., description="+value=node_selector")
605
- gpu_type: Optional[str] = Field(
606
- None,
607
- description="+label=GPU Type\n+usage=Name of the Nvidia GPU. One of [P4, P100, V100, T4, A10G, A100_40GB, A100_80GB]\nOne instance of the card contains the following amount of memory -\nP4: 8 GB, P100: 16 GB, V100: 16 GB, T4: 16 GB, A10G: 24 GB, A100_40GB: 40GB, A100_80GB: 80 GB",
608
- )
609
- instance_families: Optional[List[str]] = Field(
610
- None,
611
- description="+label=Instance family\n+usage=Instance family of the underlying machine to use. Multiple instance families can be supplied.\nThe workload is guaranteed to be scheduled on one of them.",
612
- )
613
- capacity_type: Optional[CapacityType] = Field(
614
- None,
615
- description='+label=Capacity Type\n+usage=Configure what type of nodes to run the app. By default no placement logic is applied.\n"spot_fallback_on_demand" will try to place the application on spot nodes but will fallback to on-demand when spot nodes are not available.\n"spot" will strictly place the application on spot nodes.\n"on_demand" will strictly place the application on on-demand nodes.',
616
- )
617
-
618
-
619
- class NodepoolSelector(BaseModel):
620
- """
621
- +label=Nodepool selector
622
- +usage=Specify one or more nodepools to run your application on.
623
- """
624
-
625
- type: Literal["nodepool_selector"] = Field(
626
- ..., description="+value=nodepool_selector"
627
- )
628
- nodepools: Optional[List[str]] = Field(
629
- None,
630
- description="+label=Nodepools\n+usage=Nodepools where you want to run your workload. Multiple nodepools can be selected.\n The workload is guaranteed to be scheduled on one of the nodepool",
631
- )
632
-
633
-
634
- class NvidiaGPU(BaseModel):
635
- type: Literal["nvidia_gpu"] = Field(..., description="+value=nvidia_gpu")
636
- name: Optional[str] = Field(
637
- None,
638
- description="+label=GPU Name\n+usage=Name of the Nvidia GPU. One of [P4, P100, V100, T4, A10G, A100_40GB, A100_80GB]\nThis field is required for Node Selector and can be ignored in Nodepool Selector.\nOne instance of the card contains the following amount of memory -\nP4: 8 GB, P100: 16 GB, V100: 16 GB, T4: 16 GB, A10G: 24 GB, A100_40GB: 40GB, A100_80GB: 80 GB",
639
- )
640
- count: conint(ge=1, le=16) = Field(
641
- ...,
642
- description="+label=GPU Count\n+usage=Count of GPUs to provide to the application\nNote the exact count and max count available for a given GPU type depends on cloud provider and cluster type.",
643
- )
644
-
645
-
646
- class Profile(str, Enum):
647
- """
648
- +label=MIG Profile
649
- +usage=Name of the MIG profile to use. One of [1g.5gb, 2g.10gb, 3g.20gb, 1g.10gb, 2g.20gb, 3g.40gb]
650
- """
651
-
652
- field_1g_5gb = "1g.5gb"
653
- field_2g_10gb = "2g.10gb"
654
- field_3g_20gb = "3g.20gb"
655
- field_1g_10gb = "1g.10gb"
656
- field_2g_20gb = "2g.20gb"
657
- field_3g_40gb = "3g.40gb"
658
-
659
-
660
- class NvidiaMIGGPU(BaseModel):
661
- type: Literal["nvidia_mig_gpu"] = Field(..., description="+value=nvidia_mig_gpu")
662
- name: Optional[str] = Field(
663
- None,
664
- description="+label=GPU Name\n+usage=Name of the Nvidia GPU. One of [P4, P100, V100, T4, A10G, A100_40GB, A100_80GB]\nThis field is required for Node Selector and can be ignored in Nodepool Selector.\nOne instance of the card contains the following amount of memory -\nP4: 8 GB, P100: 16 GB, V100: 16 GB, T4: 16 GB, A10G: 24 GB, A100_40GB: 40GB, A100_80GB: 80 GB",
665
- )
666
- profile: Profile = Field(
667
- ...,
668
- description="+label=MIG Profile\n+usage=Name of the MIG profile to use. One of [1g.5gb, 2g.10gb, 3g.20gb, 1g.10gb, 2g.20gb, 3g.40gb]",
669
- )
670
-
671
-
672
- class NvidiaTimeslicingGPU(BaseModel):
673
- type: Literal["nvidia_timeslicing_gpu"] = Field(
674
- ..., description="+value=nvidia_timeslicing_gpu"
675
- )
676
- name: Optional[str] = Field(
677
- None,
678
- description="+label=GPU Name\n+usage=Name of the Nvidia GPU. One of [P4, P100, V100, T4, A10G, A100_40GB, A100_80GB]\nThis field is required for Node Selector and can be ignored in Nodepool Selector.\nOne instance of the card contains the following amount of memory -\nP4: 8 GB, P100: 16 GB, V100: 16 GB, T4: 16 GB, A10G: 24 GB, A100_40GB: 40GB, A100_80GB: 80 GB",
679
- )
680
- gpu_memory: conint(ge=1, le=200000) = Field(
681
- ...,
682
- description="+label=GPU Memory (MB)\n+usage=Amount of GPU memory (in MB) to allocate. Please note, this limit is not being enforced today but will be in future. Applications are expected to operate in co-opertative mode",
683
- )
684
-
685
-
686
- class OCIRepo(BaseModel):
687
- """
688
- +label=OCIRepo
689
- """
690
-
691
- type: Literal["oci-repo"] = Field(..., description="+value=oci-repo")
692
- oci_chart_url: constr(
693
- regex=r"^(((oci):\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$"
694
- ) = Field(..., description="+label=OCI chart URL\n+message=Need to be a valid URL.")
695
- integration_fqn: Optional[str] = Field(
696
- None,
697
- description='+docs=FQN of the container registry. You can use the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations) page\n+label=Container Registry\n+usage=FQN of the container registry. If you can\'t find your registry here,\nadd it through the [Integrations](/integrations) page\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"docker-registry"}',
698
- )
699
- version: str = Field(..., description="+label=Version\n+usage=Helm chart version")
700
-
701
-
702
- class ParamType(str, Enum):
703
- string = "string"
704
- ml_repo = "ml_repo"
705
-
706
-
707
- class Param(BaseModel):
708
- name: constr(regex=r"^[a-z][a-z0-9\-_]{0,30}[a-z0-9]$") = Field(
709
- ...,
710
- description="+usage=Name of the param\n+message=name can contain lower case alphabets, digits, underscore (_) and hypen (-). It can be 32 characters long, should start with an alphabet, and should end with either an alphabet or digit.",
711
- )
712
- description: Optional[constr(regex=r"^.{1,127}$")] = Field(
713
- None,
714
- description="+usage=Description of param\n+message=description cannot be longer than 127 characters",
715
- )
716
- default: Optional[constr(regex=r"^.{0,127}$")] = Field(
717
- None,
718
- description="+usage=Default value or placeholder\n+message=default value cannot be longer than 127 characters\n+label=Default value",
719
- )
720
- param_type: ParamType = "string"
721
-
722
-
723
- class Protocol(str, Enum):
724
- """
725
- +usage=Protocol for the port.
726
- """
727
-
728
- TCP = "TCP"
729
- UDP = "UDP"
730
-
731
-
732
- class AppProtocol(str, Enum):
733
- """
734
- +label=Application Protocol
735
- +usage=Application Protocol for the port.
736
- Select the application protocol used by your service. For most use cases, this should be `http`(HTTP/1.1).
737
- If you are running a gRPC server, select the `grpc` option.
738
- This is only applicable if `expose=true`.
739
- """
740
-
741
- http = "http"
742
- grpc = "grpc"
743
- tcp = "tcp"
744
-
745
-
746
- class PythonBuild(BaseModel):
747
- """
748
- +docs=Describes that we are using python to build a container image with a specific python version and pip packages installed.
749
- +label=Python Code (I don't have Dockerfile)
750
- +icon=fa-brands fa-python:#306998
751
- """
752
-
753
- type: Literal["tfy-python-buildpack"] = Field(
754
- ..., description="+value=tfy-python-buildpack"
755
- )
756
- python_version: constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$") = Field(
757
- "3.11",
758
- description="+label=Python version\n+usage=Python version to run your application. Should be one of the tags listed on [Official Python Docker Page](https://hub.docker.com/_/python)\n+message=Please enter a valid Python version tag",
759
- )
760
- build_context_path: str = Field(
761
- "./",
762
- description="+label=Path to build context\n+usage=Build path relative to project root path.",
763
- )
764
- requirements_path: Optional[str] = Field(
765
- None,
766
- description="`Path to build context`\n+label=Path to requirements\n+usage=Path to `requirements.txt` relative to\n`Path to build context`",
767
- )
768
- pip_packages: Optional[List[str]] = Field(
769
- None,
770
- description='+label=Pip packages to install\n+usage=Define pip package requirements.\nIn Python/YAML E.g. ["fastapi>=0.90,<1.0", "uvicorn"]\n+placeholder=Enter a pip package name E.g. fastapi>=0.90,<1.0',
771
- )
772
- apt_packages: Optional[List[str]] = Field(
773
- None,
774
- description='+label=List of Debian packages to install.\n+usage=Debian packages to install via `apt get`.\nIn Python/YAML E.g. ["git", "ffmpeg", "htop"]\n+placeholder=Enter a debian package name E.g. ffmpeg',
775
- )
776
- command: Union[str, List[str]] = Field(
777
- ...,
778
- description="Command will be set as the Entrypoint of the generated\nimage.\n+label=Command\n+usage=Command to run when the container starts.\nCommand will be set as the Entrypoint of the generated image.\nWhen deploying a Job, the command can be templatized by defining `params` and referencing them in command\nE.g. `python main.py --learning_rate {{learning_rate}}`",
779
- )
780
- cuda_version: Optional[
781
- constr(
782
- regex=r"^((\d+\.\d+(\.\d+)?-cudnn\d+-(runtime|devel)-ubuntu\d+\.\d+)|11\.0-cudnn8|11\.1-cudnn8|11\.2-cudnn8|11\.3-cudnn8|11\.4-cudnn8|11\.5-cudnn8|11\.6-cudnn8|11\.7-cudnn8|11\.8-cudnn8|12\.0-cudnn8|12\.1-cudnn8|12\.2-cudnn8)$"
783
- )
784
- ] = Field(
785
- None,
786
- description="+label=CUDA Version\n+usage=Version of CUDA Toolkit and CUDNN to install in the image\nThese combinations are based off of publically available docker images on docker hub\nYou can also specify a valid tag of the form {cuda_version_number}-cudnn{cudnn_version_number}-{runtime|devel}-ubuntu{ubuntu_version}\nRefer https://hub.docker.com/r/nvidia/cuda/tags for valid set of values\nNote: We use deadsnakes ubuntu ppa to add Python that currently supports only Ubuntu 18.04, 20.04 and 22.04",
787
- )
788
-
789
-
790
- class RPSMetric(BaseModel):
791
- type: Literal["rps"] = Field(..., description="+value=rps")
792
- value: PositiveFloat = Field(
793
- ...,
794
- description="+label=Requests per second\n+usage=Average request per second averaged over all replicas that autoscaler should try to maintain",
795
- )
796
-
797
-
798
- class RemoteSource(BaseModel):
799
- """
800
- +docs=Describes that we are using code stored in a remote respository to build our image
801
- +label=S3
802
- +icon=fa-brands fa-aws:black
803
- +sort=200
804
- """
805
-
806
- type: Literal["remote"] = Field(..., description="+value=remote")
807
- remote_uri: str = Field(
808
- ..., description="+docs=Remote repository URI\n+label=Remote URI"
809
- )
810
-
811
-
812
- class Resources(BaseModel):
813
- """
814
- +docs=Describes the resource constraints for the application so that it can be deployed accordingly on the cluster
815
- To learn more you can go [here](https://docs.truefoundry.com/docs/resources)
816
- +icon=fa-microchip
817
- +label=Resources
818
- +usage=Configure resource allocations, specify node constraints and capacity types to improve performance and reduce expenses. [Docs](https://docs.truefoundry.com/docs/resources)
819
- """
820
-
821
- cpu_request: confloat(ge=0.001, le=256.0) = Field(
822
- 0.2,
823
- description="+label=CPU Request\n+sort=1\n+usage=Requested CPU which determines the minimum cost incurred. The CPU usage can exceed the requested\namount, but not the value specified in the limit. 1 CPU means 1 CPU core. Fractional CPU can be requested\nlike `0.5` or `0.05`",
824
- )
825
- cpu_limit: confloat(ge=0.001, le=256.0) = Field(
826
- 0.5,
827
- description="+label=CPU Limit\n+usage=CPU limit beyond which the usage cannot be exceeded. 1 CPU means 1 CPU core. Fractional CPU can be requested\nlike `0.5`. CPU limit should be >= cpu request.\n+sort=2",
828
- )
829
- memory_request: conint(ge=1, le=2000000) = Field(
830
- 200,
831
- description="+label=Memory Request\n+usage=Requested memory which determines the minimum cost incurred. The unit of memory is in megabytes(MB).\nSo 1 means 1 MB and 2000 means 2GB.\n+sort=3",
832
- )
833
- memory_limit: conint(ge=1, le=2000000) = Field(
834
- 500,
835
- description="+label=Memory Limit\n+usage=Memory limit after which the application will be killed with an OOM error. The unit of memory is\nin megabytes(MB). So 1 means 1 MB and 2000 means 2GB. MemoryLimit should be greater than memory request.\n+sort=4",
836
- )
837
- ephemeral_storage_request: conint(ge=1, le=2000000) = Field(
838
- 1000,
839
- description="+label=Storage Request\n+usage=Requested disk storage. The unit of memory is in megabytes(MB).\nThis is ephemeral storage and will be wiped out on pod restarts or eviction\n+sort=5",
840
- )
841
- ephemeral_storage_limit: conint(ge=1, le=2000000) = Field(
842
- 2000,
843
- description="+label=Storage Limit\n+usage=Disk storage limit. The unit of memory is in megabytes(MB). Exceeding this limit will result in eviction.\nIt should be greater than the request. This is ephemeral storage and will be wiped out on pod restarts or eviction\n+sort=6",
844
- )
845
- gpu_count: Optional[conint(ge=0, le=16)] = Field(
846
- None,
847
- description="+label=GPU Count\n+usage=Count of GPUs to provide to the application\nNote the exact count and max count available for a given GPU type depends on cloud provider and cluster type.",
848
- )
849
- shared_memory_size: Optional[conint(ge=64, le=2000000)] = Field(
850
- None,
851
- description="+label=Shared Memory Size (MB)\n+usage=Define the shared memory requirements for your workload. Machine learning libraries like Pytorch can use Shared Memory\nfor inter-process communication. If you use this, we will mount a `tmpfs` backed volume at the `/dev/shm` directory.\nAny usage will also count against the workload's memory limit (`resources.memory_limit`) along with your workload's memory usage.\nIf the overall usage goes above `resources.memory_limit` the user process may get killed.\nShared Memory Size cannot be more than the defined Memory Limit for the workload.",
852
- )
853
- node: Optional[Union[NodeSelector, NodepoolSelector]] = Field(
854
- None,
855
- description="+label=Node\n+usage=This field determines how the underlying node resource is to be utilized",
856
- )
857
- devices: Optional[
858
- List[
859
- Union[NvidiaGPU, AWSInferentia, NvidiaMIGGPU, NvidiaTimeslicingGPU, GcpTPU]
860
- ]
861
- ] = Field(
862
- None,
863
- description="+label=Devices\n+usage=Define custom device or accelerator requirements for your workload. We currently support NVIDIA GPUs, AWS Inferentia Accelerators, Single Host TPU Slices.",
864
- )
865
-
866
-
867
- class Rolling(BaseModel):
868
- """
869
- +docs=This strategy updates the pods in a rolling fashion such that a subset of the
870
- total pods are replaced with new version at one time.
871
- A commonly used strategy can be to have maxUnavailablePercentage close to 0 so that there
872
- is no downtime and keep the maxSurgePercentage to around 25%. If you are anyways running
873
- a large number of pods, the service can often tolerate a few pods going down - so you
874
- max maxUnavailablePercentage = 10 and maxSurgePercentage=0. You can read about it more
875
- [here](https://spot.io/resources/kubernetes-autoscaling/5-kubernetes-deployment-strategies-roll-out-like-the-pros/)
876
- +label=Rolling update strategy
877
- """
878
-
879
- type: Literal["rolling_update"] = Field(..., description="+value=rolling_update")
880
- max_unavailable_percentage: conint(ge=0, le=100) = Field(
881
- 25,
882
- description="+label=Max unavailable(%)\n+usage=Percentage of total replicas that can be brought down at one time.\nFor a value of 25 when replicas are set to 12 this would mean minimum (25% of 12) = 3 pods might be unavailable during the deployment.\nSetting this to a higher value can help in speeding up the deployment process.",
883
- )
884
- max_surge_percentage: conint(ge=0, le=100) = Field(
885
- 25,
886
- description="+label=Max Surge(%)\n+usage=Percentage of total replicas of updated image that can be brought up over the total replicas count.\nFor a value of 25 when replicas are set to 12 this would mean (12+(25% of 12) = 15) pods might be running at one time.\nSetting this to a higher value can help in speeding up the deployment process.",
887
- )
888
-
889
-
890
- class SQSInputConfig(BaseModel):
891
- """
892
- +docs=Describes the configuration for the input SQS worker
893
- +label=SQS
894
- """
895
-
896
- type: Literal["sqs"] = Field(..., description="+value=sqs")
897
- queue_url: str = Field(
898
- ...,
899
- description="+label=Queue URL\n+usage=AWS SQS Queue URL of Subscriber\n+sort=1",
900
- )
901
- region_name: str = Field(
902
- ..., description="+label=Region Name\n+usage=AWS Region Name\n+sort=2"
903
- )
904
- visibility_timeout: conint(ge=1, le=43200) = Field(
905
- ...,
906
- description="+label=Visibility Timeout (seconds)\n+usage=A period during which Amazon SQS prevents all consumers from receiving and processing the message. If one message takes 5 seconds to process, you can set this number to 7 or any number higher than 5. This will ensure that while the message is being processed, it will not be available to other replicas. For more information, see [here](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html)\n+sort=3",
907
- )
908
- wait_time_seconds: conint(ge=1, le=20) = Field(
909
- 19,
910
- description="+label=Wait Time Seconds\n+usage=Wait timeout for long polling. For more information, see [here](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html)",
911
- )
912
- auth: AWSAccessKeyAuth
913
-
914
-
915
- class SQSOutputConfig(BaseModel):
916
- """
917
- +docs=Describes the configuration for the output SQS worker
918
- +label=SQS
919
- """
920
-
921
- type: Literal["sqs"] = Field(..., description="+value=sqs")
922
- queue_url: str = Field(
923
- ...,
924
- description="+label=Queue URL\n+usage=AWS SQS Queue URL of Publisher\n+sort=1",
925
- )
926
- region_name: str = Field(
927
- ..., description="+label=Region Name\n+usage=AWS Region Name\n+sort=2"
928
- )
929
- auth: AWSAccessKeyAuth
930
-
931
-
932
- class SQSQueueMetricConfig(BaseModel):
933
- type: Literal["sqs"] = Field(..., description="+value=sqs")
934
- queue_length: conint(ge=1) = Field(
935
- ...,
936
- description="+label=Queue length\n+usage=Upper limit of the number of backlog messages the auto-scaler will try to maintain per replica. If you set this number to 10 and have 30 messages in the queue and one replica, the auto-scaler will scale the number of replicas to 3.",
937
- )
938
-
939
-
940
- class ConcurrencyPolicy(str, Enum):
941
- """
942
- +usage=Choose whether to allow this job to run while another instance of the job is running, or to replace the currently running instance. Allow
943
- will enable multiple instances of this job to run. Forbid will keep the current instance of the job running and stop a new instance from being run.
944
- Replace will terminate any currently running instance of the job and start a new one.
945
- """
946
-
947
- Forbid = "Forbid"
948
- Allow = "Allow"
949
- Replace = "Replace"
950
-
951
-
952
- class Schedule(BaseModel):
953
- """
954
- +docs=Describes that we are going to schedule our job to run at a schedule, making our job a cron job.
955
- +label=Schedule
956
- +usage=Run the job on a schedule. [Docs](https://docs.truefoundry.com/docs/deploy-a-cron-job)
957
- """
958
-
959
- type: Literal["scheduled"] = Field(..., description="+value=scheduled")
960
- schedule: str = Field(
961
- ...,
962
- description="+docs=Specify the schedule for this job to be run periodically in cron format. [Learn more](https://docs.truefoundry.com/docs/deploy-a-cron-job)\n+usage=Specify the schedule for this job to be run periodically in cron format.\n```\n* * * * *\n| | | | |\n| | | | |___ day of week (0-6) (Sunday is 0)\n| | | |_____ month (1-12)\n| | |_______ day of month (1-31)\n| |_________ hour (0-23)\n|___________ minute (0-59)\n```",
963
- )
964
- concurrency_policy: ConcurrencyPolicy = Field(
965
- "Forbid",
966
- description="+usage=Choose whether to allow this job to run while another instance of the job is running, or to replace the currently running instance. Allow\nwill enable multiple instances of this job to run. Forbid will keep the current instance of the job running and stop a new instance from being run.\nReplace will terminate any currently running instance of the job and start a new one.",
967
- )
968
- timezone: Optional[str] = Field(
969
- None,
970
- description='+usage=Timezone against which the cron schedule will be calculated, e.g. "Asia/Tokyo". Default is machine\'s local time.\nhttps://docs.truefoundry.com/docs/list-of-supported-timezones',
971
- )
972
-
973
-
974
- class SecretMount(BaseModel):
975
- type: Literal["secret"] = Field(..., description="+value=secret")
976
- mount_path: constr(regex=r"^\/(?:[^/\n]+\/*)*[^/\n]+(\.[^/\n]+)?$") = Field(
977
- ...,
978
- description="+label=File path\n+usage=Absolute file path where the file will be created.\n+message=Please enter a valid file path",
979
- )
980
- secret_fqn: constr(regex=r"^tfy-secret:\/\/.+:.+:.+$") = Field(
981
- ...,
982
- description="+label=Secret\n+usage=The TrueFoundry secret whose value will be the file content.",
983
- )
984
-
985
-
986
- class ServiceAutoscaling(BaseAutoscaling):
987
- metrics: Union[CPUUtilizationMetric, RPSMetric, CronMetric] = Field(
988
- ...,
989
- description="+label=Autoscaling metrics\n+usage=Metrics to use for the autoscaler\n+sort=4",
990
- )
991
-
992
-
993
- class SparkDriverConfig(BaseModel):
994
- """
995
- +label=Driver Config
996
- """
997
-
998
- ui_endpoint: Endpoint
999
- resources: Optional[Resources] = None
1000
-
1001
-
1002
- class SparkExecutorDynamicScaling(BaseModel):
1003
- """
1004
- +label=Dynamic Scaling
1005
- """
1006
-
1007
- type: Literal["dynamic"] = Field(..., description="+value=dynamic")
1008
- min: conint(ge=0, le=500) = Field(
1009
- 1,
1010
- description="+label=Min Instances\n+usage=Minimum number of instances to start / scale down to\n+sort=100",
1011
- )
1012
- max: conint(ge=0, le=500) = Field(
1013
- 1,
1014
- description="+label=Max Instances\n+usage=Maximum number of instances to scale up to\n+sort=200",
1015
- )
1016
-
1017
-
1018
- class SparkExecutorFixedInstances(BaseModel):
1019
- """
1020
- +label=Fixed Instances
1021
- """
1022
-
1023
- type: Literal["fixed"] = Field(..., description="+value=fixed")
1024
- count: conint(ge=0, le=500) = Field(
1025
- 1, description="+label=Instances Count\n+usage=Number of instances to start"
1026
- )
1027
-
1028
-
1029
- class StaticVolumeConfig(BaseModel):
1030
- """
1031
- +label=Static Volume Config
1032
- """
1033
-
1034
- type: Literal["static"] = Field(
1035
- ...,
1036
- description="+label=Volume Type\n+value=static\n+usage=Volume Type for the volume.",
1037
- )
1038
- persistent_volume_name: str = Field(
1039
- ...,
1040
- description="+label=Persistent Volume\n+usage=Persistent Volume Name of the volume to be used.",
1041
- )
1042
-
1043
-
1044
- class StringDataMount(BaseModel):
1045
- type: Literal["string"] = Field(..., description="+value=string")
1046
- mount_path: constr(regex=r"^\/(?:[^/\n]+\/*)*[^/\n]+(\.[^/\n]+)?$") = Field(
1047
- ...,
1048
- description="+label=File Path\n+usage=Absolute file path where the file will be created.\n+message=Please enter a valid file path",
1049
- )
1050
- data: str = Field(..., description="+label=Data\n+usage=The file content.")
1051
-
1052
-
1053
- class TaskDockerFileBuild(BaseModel):
1054
- """
1055
- +docs=Describes the configuration for the docker build for a task
1056
- +label=Docker File
1057
- +icon=fa-brands fa-docker:#0db7ed
1058
- """
1059
-
1060
- type: Literal["task-dockerfile-build"] = Field(..., description="+value=dockerfile")
1061
- docker_registry: Optional[str] = Field(
1062
- None,
1063
- description="+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+usage=FQN of the container registry. If you can't find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page",
1064
- )
1065
- dockerfile_path: str = Field(
1066
- "./Dockerfile",
1067
- description="+label=Path to Dockerfile\n+usage=The file path of the Dockerfile relative to project root path.",
1068
- )
1069
- build_args: Optional[Dict[str, str]] = Field(
1070
- None, description="+label=Build arguments to pass to docker build"
1071
- )
1072
-
1073
-
1074
- class TaskPythonBuild(BaseModel):
1075
- """
1076
- +docs=Describes the configuration for the python build for a task
1077
- +label=Python Buid Spec
1078
- +icon=fa-brands fa-python:#306998
1079
- """
1080
-
1081
- type: Literal["task-python-build"] = Field(
1082
- ..., description="+value=task-python-build"
1083
- )
1084
- docker_registry: Optional[str] = Field(
1085
- None,
1086
- description="+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+usage=FQN of the container registry. If you can't find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page",
1087
- )
1088
- python_version: constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$") = Field(
1089
- "3.11",
1090
- description="+label=Python version\n+usage=Python version to run your application. Should be one of the tags listed on [Official Python Docker Page](https://hub.docker.com/_/python)\n+message=Please enter a valid Python version tag",
1091
- )
1092
- requirements_path: Optional[str] = Field(
1093
- None,
1094
- description="`Path to build context`\n+label=Path to requirements\n+usage=Path to `requirements.txt` relative to\n`Path to build context`",
1095
- )
1096
- pip_packages: Optional[List[str]] = Field(
1097
- None,
1098
- description='+label=Pip packages to install\n+usage=Define pip package requirements.\nIn Python/YAML E.g. ["fastapi>=0.90,<1.0", "uvicorn"]\n+placeholder=Enter a pip package name E.g. fastapi>=0.90,<1.0',
1099
- )
1100
- apt_packages: Optional[List[str]] = Field(
1101
- None,
1102
- description='+label=List of Debian packages to install.\n+usage=Debian packages to install via `apt get`.\nIn Python/YAML E.g. ["git", "ffmpeg", "htop"]\n+placeholder=Enter a debian package name E.g. ffmpeg',
1103
- )
1104
- cuda_version: Optional[
1105
- constr(
1106
- regex=r"^((\d+\.\d+(\.\d+)?-cudnn\d+-(runtime|devel)-ubuntu\d+\.\d+)|11\.0-cudnn8|11\.1-cudnn8|11\.2-cudnn8|11\.3-cudnn8|11\.4-cudnn8|11\.5-cudnn8|11\.6-cudnn8|11\.7-cudnn8|11\.8-cudnn8|12\.0-cudnn8|12\.1-cudnn8|12\.2-cudnn8)$"
1107
- )
1108
- ] = Field(
1109
- None,
1110
- description="+label=CUDA Version\n+usage=Version of CUDA Toolkit and CUDNN to install in the image\nThese combinations are based off of publically available docker images on docker hub\nYou can also specify a valid tag of the form {cuda_version_number}-cudnn{cudnn_version_number}-{runtime|devel}-ubuntu{ubuntu_version}\nRefer https://hub.docker.com/r/nvidia/cuda/tags for valid set of values\nNote: We use deadsnakes ubuntu ppa to add Python that currently supports only Ubuntu 18.04, 20.04 and 22.04",
1111
- )
1112
-
1113
-
1114
- class TrueFoundryArtifactSource(BaseModel):
1115
- """
1116
- +docs=Input for Artifact from TrueFoundry Artifact Registry
1117
- +label=TrueFoundry Artifact Source
1118
- """
1119
-
1120
- type: Literal["truefoundry-artifact"] = Field(
1121
- ..., description="+value=truefoundry-artifact"
1122
- )
1123
- artifact_version_fqn: str = Field(
1124
- ...,
1125
- description="+label=Artifact or Model Version FQN\n+usage=Artifact or Model Version FQN of the artifact to be downloaded",
1126
- )
1127
- download_path_env_variable: str = Field(
1128
- ...,
1129
- description="+label=Download Path Environment Variable\n+usage=Environment variable which will contain the download path of the artifact",
1130
- )
1131
-
1132
-
1133
- class TrueFoundryInteractiveLogin(BaseModel):
1134
- """
1135
- +label=Login with truefoundry
1136
- """
1137
-
1138
- type: Literal["truefoundry_oauth"] = Field(
1139
- ..., description="+value=truefoundry_oauth"
1140
- )
1141
-
1142
-
1143
- class VolumeBrowser(BaseModel):
1144
- """
1145
- +label=Volume Browser
1146
- """
1147
-
1148
- username: constr(regex=r"^[a-z][a-z0-9]{1,8}[a-z0-9]$") = Field(
1149
- ...,
1150
- description="+message=3 to 10 lower case characters long alphanumeric word, may contain - in between, cannot start with a number.\n+usage=Username for logging in the volume browser.\n+sort=1",
1151
- )
1152
- password_secret_fqn: constr(regex=r"^tfy-secret:\/\/.+:.+:.+$") = Field(
1153
- ...,
1154
- description="+label=Password Secret FQN\n+usage=TFY Secret containing the password for logging in the volume browser.\n+sort=2",
1155
- )
1156
- endpoint: Endpoint
1157
- service_account: Optional[str] = Field(
1158
- None,
1159
- description="+label=Service Account Name\n+usage=Kubernetes Service account name for the volume browser.\n+sort=4",
1160
- )
1161
-
1162
-
1163
- class VolumeMount(BaseModel):
1164
- type: Literal["volume"] = Field(..., description="+value=volume")
1165
- mount_path: constr(regex=r"^\/(?:[^/\n]+\/*)*[^/\n]+(\.[^/\n]+)?$") = Field(
1166
- ...,
1167
- description="+label=Volume mount path\n+usage=Absolute file path where the volume will be mounted.\n+message=Please enter a valid mount path",
1168
- )
1169
- sub_path: Optional[constr(regex=r"^(?:[^/\n]+/*)*[^/\n]+(\.[^/\n]+)?$")] = Field(
1170
- None,
1171
- description="+label=Sub Path\n+usage=Sub path within the volume to mount. Defaults to root of the volume.",
1172
- )
1173
- volume_fqn: constr(regex=r"^tfy-volume:\/\/.+:.+:.+$") = Field(
1174
- ...,
1175
- description="+label=Volume\n+usage=The TrueFoundry volume that needs to be mounted.",
1176
- )
1177
-
1178
-
1179
- class WorkbenchImage(BaseModel):
1180
- """
1181
- +usage=Workbench Image with persistent environment (Python 3.11.6)
1182
- """
1183
-
1184
- image_uri: str = Field(
1185
- ...,
1186
- description="+label=Image URI\n+usage=The image URI. Specify the name of the image and the tag.\nIf the image is in Dockerhub, you can skip registry-url (for e.g. `tensorflow/tensorflow`).\nYou can use an image from a private registry using Advanced fields\n+placeholder=registry-url/account/image:version",
1187
- )
1188
- build_script: Optional[constr(min_length=1, max_length=1024)] = Field(
1189
- None,
1190
- description='+label=Build Script\n+usage=The build script to run when building the image.\nThis will be executed as the last step in the docker build process as the root user (RUN DEBIAN_FRONTEND=noninteractive bash -ex build_script.sh)\n+placeholder=Enter the build script\n+uiType=CodeEditor\n+uiProps={"language":"shell"}',
1191
- )
1192
- docker_registry: Optional[str] = Field(
1193
- None,
1194
- description='+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"docker-registry"}\n+usage=FQN of the container registry. If you can\'t find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page',
1195
- )
1196
-
1197
-
1198
- class ArtifactsDownload(BaseModel):
1199
- """
1200
- +docs=Describes the configuration for the artifacts cache
1201
- +label=Artifacts Download
1202
- +usage=Download and cache models in a volume to enhance loading speeds and reduce costs by avoiding repeated downloads. [Docs](https://docs.truefoundry.com/docs/download-and-cache-models)
1203
- """
1204
-
1205
- cache_volume: Optional[ArtifactsCacheVolume] = None
1206
- artifacts: List[Union[TrueFoundryArtifactSource, HuggingfaceArtifactSource]] = (
1207
- Field(
1208
- ..., description="+label=Artifacts\n+usage=List of artifacts to be cached"
1209
- )
1210
- )
1211
-
1212
-
1213
- class AsyncServiceAutoscaling(BaseAutoscaling):
1214
- metrics: Union[
1215
- SQSQueueMetricConfig,
1216
- NATSMetricConfig,
1217
- KafkaMetricConfig,
1218
- CronMetric,
1219
- AMQPMetricConfig,
1220
- ] = Field(
1221
- ...,
1222
- description="+label=Autoscaling metrics\n+usage=Metrics to use for the autoscaler\n+sort=4",
1223
- )
1224
-
1225
-
1226
- class BaseWorkbenchInput(BaseModel):
1227
- """
1228
- +docs=Describes the configuration for the service
1229
- """
1230
-
1231
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1232
- ...,
1233
- description="+usage=Name of the workbench. This uniquely identifies this workbench in the workspace.\n> Name can only contain alphanumeric characters and '-' and can be atmost 25 characters long\n+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number",
1234
- )
1235
- home_directory_size: conint(ge=5, le=64000) = Field(
1236
- 20,
1237
- description="+label=Home Directory Size in GB (Persistent)\n+usage=Size of the home directory for the workbench (Persistent Storage)\n+sort=6",
1238
- )
1239
- resources: Optional[Resources] = None
1240
- env: Optional[Dict[str, str]] = Field(
1241
- None,
1242
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/environment-variables-and-secrets-jobs)\n+sort=10110",
1243
- )
1244
- mounts: Optional[List[Union[SecretMount, StringDataMount, VolumeMount]]] = Field(
1245
- None,
1246
- description="+usage=Configure data to be mounted to workbench pod(s) as a string, secret or volume. [Docs](https://docs.truefoundry.com/docs/mounting-volumes-job)\n+sort=10111",
1247
- )
1248
- service_account: Optional[str] = Field(None, description="+sort=10113")
1249
- kustomize: Optional[Kustomize] = None
1250
- workspace_fqn: Optional[str] = Field(
1251
- None,
1252
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1253
- )
1254
-
1255
-
1256
- class Build(BaseModel):
1257
- """
1258
- +docs=Describes how we build our code into a Docker image.
1259
- +label=Source Code (Build and deploy source code)
1260
- +icon=fa-code
1261
- """
1262
-
1263
- type: Literal["build"] = Field(..., description="+value=build")
1264
- docker_registry: Optional[str] = Field(
1265
- None,
1266
- description="+docs=FQN of the container registry. You can the FQN of your desired container registry (or add one)\nin the Integrations page[Integrations](https://app.truefoundry.tech/integrations?tab=docker-registry) page\n+label=Docker Registry\n+usage=FQN of the container registry. If you can't find your registry here,\nadd it through the [Integrations](/integrations?tab=docker-registry) page",
1267
- )
1268
- build_source: Union[RemoteSource, GitSource, LocalSource] = Field(
1269
- ...,
1270
- description="+docs=Source code location.\n+label=Fetch source code to build and deploy\n+icon=fa-code\n+sort=1",
1271
- )
1272
- build_spec: Union[DockerFileBuild, PythonBuild] = Field(
1273
- ...,
1274
- description="+docs=Instructions to build a container image out of the build source\n+label=Build using DockerFile or using Buildpack\n+icon=fa-wrench\n+sort=2",
1275
- )
1276
-
1277
-
1278
- class Canary(BaseModel):
1279
- """
1280
- +docs=This strategy brings up the new release without bringing the older release down. Traffic is shifted from the older release to the newer release in a staged manner.
1281
- This can help with verifying the health of the new release without shifting complete traffic.
1282
- +label=Canary strategy
1283
- """
1284
-
1285
- type: Literal["canary"] = Field(..., description="+value=canary")
1286
- steps: List[CanaryStep] = Field(
1287
- ...,
1288
- description="+docs=These steps would be executed in order to enable shifting of traffic slowly from stable to canary version\n+label=Steps",
1289
- )
1290
-
1291
-
1292
- class Codeserver(BaseWorkbenchInput):
1293
- """
1294
- +docs=Describes the configuration for the code server
1295
- """
1296
-
1297
- type: Literal["codeserver"] = Field(..., description="+value=codeserver")
1298
- image: WorkbenchImage
1299
-
1300
-
1301
- class ContainerTaskConfig(BaseModel):
1302
- type: Literal["container-task-config"] = Field(
1303
- ..., description="+value=container-task-config"
1304
- )
1305
- image: Union[Build, Image] = Field(
1306
- ...,
1307
- description="+docs=Specify whether you want to deploy a Docker image or build and deploy from source code\n+label=Deploy a Docker image or build and deploy from source code\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=200",
1308
- )
1309
- env: Optional[Dict[str, str]] = Field(
1310
- None,
1311
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the task either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=200",
1312
- )
1313
- resources: Optional[Resources] = None
1314
- mounts: Optional[List[Union[SecretMount, StringDataMount, VolumeMount]]] = Field(
1315
- None,
1316
- description="+usage=Configure data to be mounted to Workflow pod(s) as a volume.\n+sort=400",
1317
- )
1318
- service_account: Optional[str] = Field(
1319
- None, description="+label=Service Account\n+sort=500"
1320
- )
1321
-
1322
-
1323
- class CoreNATSOutputConfig(BaseModel):
1324
- """
1325
- +docs=Describes the configuration for the output Core NATS worker
1326
- +label=Core NATS
1327
- """
1328
-
1329
- type: Literal["core-nats"] = Field(..., description="+value=core-nats")
1330
- nats_url: str = Field(
1331
- ..., description="+label=NATS URL\n+usage=Output NATS URL\n+sort=1"
1332
- )
1333
- root_subject: constr(regex=r"^[a-zA-Z0-9][a-zA-Z0-9\-.]+[a-zA-Z0-9]$") = Field(
1334
- ...,
1335
- description="+label=Root Subject\n+usage=Root subject of output NATS\n+message=Output NATS root subject should only contain alphanumeric letters, dashes(-), and periods(.)\n+sort=2",
1336
- )
1337
- auth: Optional[NATSUserPasswordAuth] = None
1338
-
1339
-
1340
- class FlyteLaunchPlanSpec(BaseModel):
1341
- workflowId: FlyteWorkflowID
1342
-
1343
-
1344
- class FlyteWorkflow(BaseModel):
1345
- template: FlyteWorkflowTemplate
1346
- description: Optional[Any] = None
1347
-
1348
-
1349
- class HealthProbe(BaseModel):
1350
- """
1351
- +docs=Describes the configuration for the Health Probe's
1352
- To learn more you can go [here](https://docs.truefoundry.com/docs/liveness-readiness-probe)
1353
- +icon=fa-heart
1354
- +uiType=HealthProbe
1355
- """
1356
-
1357
- config: HttpProbe
1358
- initial_delay_seconds: conint(ge=0, le=36000) = Field(
1359
- 0,
1360
- description="+usage=Time to wait after container has started before checking the endpoint",
1361
- )
1362
- period_seconds: conint(ge=1, le=36000) = Field(
1363
- 10, description="+usage=How often to check the endpoint"
1364
- )
1365
- timeout_seconds: conint(ge=1, le=36000) = Field(
1366
- 1,
1367
- description="+usage=Time to wait for a response from the endpoint before considering it down",
1368
- )
1369
- success_threshold: conint(ge=1, le=100) = Field(
1370
- 1,
1371
- description="+usage=Number of successful responses from the endpoint before container is considered healthy",
1372
- )
1373
- failure_threshold: conint(ge=1, le=100) = Field(
1374
- 3,
1375
- description="+usage=Number of consecutive failures before the container is considered down",
1376
- )
1377
-
1378
-
1379
- class Helm(BaseModel):
1380
- type: Literal["helm"] = Field(..., description="+value=helm")
1381
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1382
- ...,
1383
- description="+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number\n+usage=Name of the Helm deployment. This will be set as the release name of the chart you are deploying.",
1384
- )
1385
- labels: Optional[Dict[str, str]] = Field(
1386
- None, description="+label=Labels\n+usage=Add labels to base argo app"
1387
- )
1388
- source: Union[HelmRepo, OCIRepo, GitHelmRepo] = Field(
1389
- ..., description="+label=Source helm repository\n+sort=2"
1390
- )
1391
- values: Optional[Dict[str, Any]] = Field(
1392
- None, description="+label=Values\n+usage=Values file as block file"
1393
- )
1394
- kustomize: Optional[Kustomize] = None
1395
- ignoreDifferences: Optional[List[Dict[str, Any]]] = None
1396
- workspace_fqn: Optional[str] = Field(
1397
- None,
1398
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1399
- )
1400
-
1401
-
1402
- class Job(BaseModel):
1403
- """
1404
- +docs=Describes the configuration for the job
1405
- """
1406
-
1407
- type: Literal["job"] = Field(..., description="+value=job")
1408
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1409
- ...,
1410
- description="+usage=Name of the job\n+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number",
1411
- )
1412
- image: Union[Build, Image] = Field(
1413
- ...,
1414
- description="+docs=Specify whether you want to deploy a Docker image or build and deploy from source code\n+label=Deploy a Docker image or build and deploy from source code\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=200",
1415
- )
1416
- trigger: Union[Manual, Schedule] = Field(
1417
- {"type": "manual"}, description="+docs=Specify the trigger\n+sort=300"
1418
- )
1419
- trigger_on_deploy: bool = Field(
1420
- False,
1421
- description="+docs=Trigger on deploy\n+sort=350\n+usage=Trigger the job after deploy immediately",
1422
- )
1423
- params: Optional[List[Param]] = Field(
1424
- None,
1425
- description="+label=Params for input\n+usage=Configure params and pass it to create different job runs\n+sort=400",
1426
- )
1427
- env: Optional[Dict[str, str]] = Field(
1428
- None,
1429
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=500",
1430
- )
1431
- resources: Optional[Resources] = None
1432
- alerts: Optional[List[JobAlert]] = Field(
1433
- None,
1434
- description="+label=Alerts\n+usage=Configure alerts to be sent when the job starts/fails/completes\n+icon=fa-bell\n+sort=650",
1435
- )
1436
- retries: conint(ge=0, le=10) = Field(
1437
- 0,
1438
- description="+label=Retries\n+usage=Specify the maximum number of attempts to retry a job before it is marked as failed.\n+icon=fa-repeat\n+sort=700",
1439
- )
1440
- timeout: Optional[conint(le=432000, gt=0)] = Field(
1441
- None,
1442
- description="+label=Timeout\n+usage=Job timeout in seconds.\n+icon=fa-clock\n+sort=800",
1443
- )
1444
- concurrency_limit: Optional[PositiveInt] = Field(
1445
- None,
1446
- description="+label=Concurrency Limit\n+usage=Number of runs that can run concurrently\n+icon=fa-copy\n+sort=900",
1447
- )
1448
- service_account: Optional[str] = Field(None, description="+sort=1000")
1449
- mounts: Optional[List[Union[SecretMount, StringDataMount, VolumeMount]]] = Field(
1450
- None,
1451
- description="+usage=Configure data to be mounted to job pod(s) as a string, secret or volume. [Docs](https://docs.truefoundry.com/docs/mounting-volumes-job)",
1452
- )
1453
- labels: Optional[Dict[str, str]] = Field(None, description="+label=Labels")
1454
- kustomize: Optional[Kustomize] = None
1455
- workspace_fqn: Optional[str] = Field(
1456
- None,
1457
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1458
- )
1459
-
1460
-
1461
- class KafkaInputConfig(BaseModel):
1462
- """
1463
- +docs=Describes the configuration for the input Kafka worker
1464
- +label=Kafka
1465
- """
1466
-
1467
- type: Literal["kafka"] = Field(..., description="+value=kafka")
1468
- bootstrap_servers: str = Field(
1469
- ...,
1470
- description="+label=Bootstrap servers\n+usage='Kafka Bootstrap servers - Comma separated list of Kafka brokers \"hostname:port\" to connect to for bootstrap'\n+sort=1",
1471
- )
1472
- topic_name: str = Field(
1473
- ...,
1474
- description="+label=Topic Name\n+usage=Kafka topic to subscribe to\n+sort=2",
1475
- )
1476
- consumer_group: str = Field(
1477
- ...,
1478
- description="+label=Consumer Group Name\n+usage=The name of the consumer group to join for dynamic partition assignment\n+sort=3",
1479
- )
1480
- tls: bool = Field(
1481
- True, description="+label=TLS\n+usage=TLS configuration for SASL authentication"
1482
- )
1483
- wait_time_seconds: conint(ge=1, le=300) = Field(
1484
- 10,
1485
- description="+label=Wait Time Seconds\n+usage=Wait timeout for long polling.",
1486
- )
1487
- auth: Optional[KafkaSASLAuth] = None
1488
-
1489
-
1490
- class KafkaOutputConfig(BaseModel):
1491
- """
1492
- +docs=Describes the configuration for the output Kafka worker
1493
- +label=Kafka
1494
- """
1495
-
1496
- type: Literal["kafka"] = Field(..., description="+value=kafka")
1497
- bootstrap_servers: str = Field(
1498
- ...,
1499
- description="+label=Bootstrap servers\n+usage='Kafka Bootstrap servers - Comma separated list of Kafka brokers \"hostname:port\" to connect to for bootstrap'\n+sort=1",
1500
- )
1501
- topic_name: str = Field(
1502
- ..., description="+label=Topic Name\n+usage=Kafka topic to publish to\n+sort=2"
1503
- )
1504
- tls: bool = Field(
1505
- True, description="+label=TLS\n+usage=TLS configuration for SASL authentication"
1506
- )
1507
- auth: Optional[KafkaSASLAuth] = None
1508
-
1509
-
1510
- class NATSInputConfig(BaseModel):
1511
- """
1512
- +docs=Describes the configuration for the input NATS worker
1513
- +label=NATS
1514
- """
1515
-
1516
- type: Literal["nats"] = Field(..., description="+value=nats")
1517
- nats_url: str = Field(
1518
- ..., description="+label=NATS URL\n+usage=Input NATS URL\n+sort=1"
1519
- )
1520
- stream_name: str = Field(
1521
- ..., description="+label=Stream Name\n+usage=Name of the NATS stream\n+sort=2"
1522
- )
1523
- root_subject: constr(regex=r"^[a-zA-Z0-9][a-zA-Z0-9\-.]+[a-zA-Z0-9]$") = Field(
1524
- ...,
1525
- description="+label=Root Subject\n+usage=Root subject of input NATS\n+message=Input NATS root subject should only contain alphanumeric letters, dashes(-), and periods(.)\n+sort=3",
1526
- )
1527
- consumer_name: constr(regex=r"^[a-zA-Z0-9][a-zA-Z0-9\-_]+[a-zA-Z0-9]$") = Field(
1528
- ...,
1529
- description="+label=Consumer Name\n+usage=Consumer name of input NATS\n+message=Consumer name should only contain alphanumeric letters, dashes(-), and underscores(_)\n+sort=4",
1530
- )
1531
- wait_time_seconds: conint(ge=1, le=20) = Field(
1532
- 19,
1533
- description="+label=Wait Time Seconds\n+usage=Wait timeout for long polling.\n+sort=5",
1534
- )
1535
- nats_metrics_url: Optional[constr(regex=r"^(http(s?)://).*$")] = Field(
1536
- None,
1537
- description="+label=NATS metrics URL\n+usage=URL for the NATS metrics endpoint. It is compulsory if you want to use NATS autoscaling.\n+message=NATS Metrics URL should be a valid HTTP/HTTPS URL",
1538
- )
1539
- auth: Optional[NATSUserPasswordAuth] = None
1540
-
1541
-
1542
- class NATSOutputConfig(BaseModel):
1543
- """
1544
- +docs=Describes the configuration for the output NATS worker
1545
- +label=NATS
1546
- """
1547
-
1548
- type: Literal["nats"] = Field(..., description="+value=nats")
1549
- nats_url: str = Field(
1550
- ..., description="+label=NATS URL\n+usage=Output NATS URL\n+sort=1"
1551
- )
1552
- root_subject: constr(regex=r"^[a-zA-Z0-9][a-zA-Z0-9\-.]+[a-zA-Z0-9]$") = Field(
1553
- ...,
1554
- description="+label=Root Subject\n+usage=Root subject of output NATS\n+message=Output NATS root subject should only contain alphanumeric letters, dashes(-), and periods(.)\n+sort=2",
1555
- )
1556
- auth: Optional[NATSUserPasswordAuth] = None
1557
-
1558
-
1559
- class Notebook(BaseWorkbenchInput):
1560
- """
1561
- +docs=Describes the configuration for the service
1562
- """
1563
-
1564
- type: Literal["notebook"] = Field(..., description="+value=notebook")
1565
- image: WorkbenchImage
1566
- cull_timeout: conint(ge=5) = Field(
1567
- 30,
1568
- description='+label=Stop after (minutes of inactivity)\n+usage=Stop the notebook instance after this much time in minutes of inactivity.\nThe notebook instance will be stopped even if the notebook is open in your browser, but nothing is running on the notebook.\n+sort=5\n+uiProps={"descriptionInline":true}',
1569
- )
1570
-
1571
-
1572
- class Port(BaseModel):
1573
- """
1574
- +docs=Describes the ports the service should be exposed to.
1575
- """
1576
-
1577
- port: conint(ge=1, le=65535) = Field(
1578
- 80, description="+usage=Port number to expose."
1579
- )
1580
- protocol: Protocol = Field("TCP", description="+usage=Protocol for the port.")
1581
- expose: bool = Field(True, description="+usage=Expose the port")
1582
- app_protocol: AppProtocol = Field(
1583
- "http",
1584
- description="+label=Application Protocol\n+usage=Application Protocol for the port.\nSelect the application protocol used by your service. For most use cases, this should be `http`(HTTP/1.1).\nIf you are running a gRPC server, select the `grpc` option.\nThis is only applicable if `expose=true`.",
1585
- )
1586
- host: Optional[
1587
- constr(
1588
- regex=r"^((([a-zA-Z0-9\-]{1,63}\.)([a-zA-Z0-9\-]{1,63}\.)*([A-Za-z]{1,63}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)))$"
1589
- )
1590
- ] = Field(
1591
- None,
1592
- description="+usage=Host e.g. ai.example.com, app.truefoundry.com\n+message=Upto 253 characters, each part of host should be at most 63 characters long, can contain alphabets, digits and hypen, must begin and end with an alphanumeric characters. Parts must be separated by periods (.)",
1593
- )
1594
- path: Optional[
1595
- constr(regex=r"^(/([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9]))*/$")
1596
- ] = Field(
1597
- None,
1598
- description="+usage=Path e.g. /v1/api/ml/, /v2/docs/\n+message=Should begin and end with a forward slash (/). Each part can can contain alphabets, digits and hypen, must begin and end with an alphanumeric characters. Parts should be separated by forward slashes (/)",
1599
- )
1600
- rewrite_path_to: Optional[
1601
- constr(regex=r"^(/([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-_\.]*[a-zA-Z0-9]))*/$")
1602
- ] = Field(
1603
- None,
1604
- description="+label=Rewrite Path to\n+usage=Rewrite the path prefix to a different path.\nIf `path` is `/v1/api` and `rewrite_path_to` is `/api`. The URI in the HTTP request `http://0.0.0.0:8080/v1/api/houses` will be rewritten to `http://0.0.0.0:8080/api/houses` before the request is forwarded your service.\nDefaults to `/`.\nThis is only applicable if `path` is given.\n+message=Should begin and end with a forward slash (/). Each part can can contain alphabets, digits and hypen, must begin and end with an alphanumeric characters. Parts should be separated by forward slashes (/)",
1605
- )
1606
- auth: Optional[Union[BasicAuthCreds, JwtAuthCreds, TrueFoundryInteractiveLogin]] = (
1607
- Field(None, description="+usage=Authentication method for inbound traffic")
1608
- )
1609
-
1610
-
1611
- class PythonTaskConfig(BaseModel):
1612
- """
1613
- +docs=Describes the configuration for the python function task
1614
- """
1615
-
1616
- type: Literal["python-task-config"] = Field(
1617
- ..., description="+value=python-task-config"
1618
- )
1619
- image: Union[TaskPythonBuild, TaskDockerFileBuild] = Field(
1620
- ...,
1621
- description="+label=Image Spec\n+docs=Specification for the image to be used for the task\n+sort=100\n+usage=Specify the image spec for the task",
1622
- )
1623
- env: Optional[Dict[str, str]] = Field(
1624
- None,
1625
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the task either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=200",
1626
- )
1627
- resources: Optional[Resources] = None
1628
- mounts: Optional[List[Union[SecretMount, StringDataMount, VolumeMount]]] = Field(
1629
- None,
1630
- description="+usage=Configure data to be mounted to Workflow pod(s) as a volume.\n+sort=400",
1631
- )
1632
- service_account: Optional[str] = Field(
1633
- None, description="+label=Service Account\n+sort=500"
1634
- )
1635
-
1636
-
1637
- class RStudio(BaseWorkbenchInput):
1638
- """
1639
- +docs=Describes the configuration for the Rstudio server
1640
- """
1641
-
1642
- type: Literal["rstudio"] = Field(..., description="+value=rstudio")
1643
- image: WorkbenchImage
1644
-
1645
-
1646
- class SSHServer(BaseWorkbenchInput):
1647
- """
1648
- +docs=Describes the configuration for the ssh server
1649
- """
1650
-
1651
- type: Literal["ssh-server"] = Field(..., description="+value=ssh-server")
1652
- image: WorkbenchImage
1653
- ssh_public_key: str = Field(
1654
- ...,
1655
- description="+label: SSH Public Key\n+usage=Add Your SSH Public Key, this will be used to authenticate you to the SSH Server. \\\nYou can find it using `cat ~/.ssh/id_rsa.pub` in Mac/Linux or `type $home\\.ssh\\id_rsa.pub` in Windows Powershell. \\\nYou can also generate a new SSH key pair using `ssh-keygen -t rsa` in your local terminal. (same for both Mac/Linux and Windows Powershell)\n+uiType=TextArea\n+sort=4",
1656
- )
1657
- cull_timeout: Optional[conint(ge=5)] = Field(
1658
- None,
1659
- description='+label=Stop after (minutes of inactivity)\n+usage=Stop the SSH Server instance after this much time in minutes of inactivity. The instance is considered active if there is at least one active SSH connection (a client connected to the SSH server), or if a background job is running using tmux or screen, or if the pod has restarted.\n+sort=5\n+uiProps={"descriptionInline":true, "warningMessage":"Please note that stop after inactivity is only available for images with tag(including custom images) >= v0.3.10"}',
1660
- )
1661
-
1662
-
1663
- class SparkExecutorConfig(BaseModel):
1664
- """
1665
- +label=Executor Config
1666
- """
1667
-
1668
- instances: Union[SparkExecutorFixedInstances, SparkExecutorDynamicScaling] = Field(
1669
- {"type": "fixed", "count": 1}, description="+label=Executor Instances"
1670
- )
1671
- resources: Optional[Resources] = None
1672
-
1673
-
1674
- class SparkJob(BaseModel):
1675
- type: Literal["spark-job"] = Field(..., description="+value=spark-job\n+sort=1")
1676
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1677
- ...,
1678
- description="+label=Name\n+usage=Name of the job\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number\n+sort=2",
1679
- )
1680
- image: Image
1681
- spark_version: str = Field(
1682
- "3.5.2",
1683
- description="+label=Spark Version\n+usage=Spark version should match the spark version installed in the image.\n+sort=2000",
1684
- )
1685
- main_application_file: str = Field(
1686
- ...,
1687
- description="+label=Main Application File\n+usage=The main application file to be executed by the spark job.\n+sort=3000",
1688
- )
1689
- arguments: Optional[str] = Field(
1690
- None,
1691
- description="+label=Arguments\n+usage=Arguments to be passed to the main application file.\n+sort=4000",
1692
- )
1693
- driver_config: SparkDriverConfig
1694
- executor_config: SparkExecutorConfig
1695
- env: Optional[Dict[str, Any]] = Field(
1696
- None,
1697
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=21000",
1698
- )
1699
- conf: Optional[Dict[str, Any]] = Field(
1700
- None,
1701
- description="+label=Spark Config Properties\n+usage=Extra configuration properties to be passed to the spark job. [Docs](https://spark.apache.org/docs/latest/configuration.html)\n+icon=fa-gear:#68BBE3\n+sort=21500",
1702
- )
1703
- mounts: Optional[List[VolumeMount]] = Field(
1704
- None,
1705
- description="+label=Mounts\n+usage=Configure volumes to be mounted to driver and executors. [Docs](https://docs.truefoundry.com/docs/mounting-volumes-job)\n+sort=22000\n+uiType=Mounts",
1706
- )
1707
- retries: conint(ge=0, le=10) = Field(
1708
- 0,
1709
- description="+label=Retries\n+usage=Specify the maximum number of attempts to retry a job before it is marked as failed.\n+icon=fa-repeat\n+sort=23000",
1710
- )
1711
- service_account: Optional[str] = Field(
1712
- None, description="+label=Service Account\n+sort=24000"
1713
- )
1714
- workspace_fqn: Optional[str] = Field(
1715
- None,
1716
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1717
- )
1718
-
1719
-
1720
- class Volume(BaseModel):
1721
- type: Literal["volume"] = Field(..., description="+value=volume")
1722
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1723
- ...,
1724
- description="+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number\n+usage=Name of the Volume. This will be set as the volume name.",
1725
- )
1726
- config: Union[DynamicVolumeConfig, StaticVolumeConfig] = Field(
1727
- ...,
1728
- description="+sort=2\n+label=Volume Config\n+message=Volume Configuration, can be either Dynamically provisioned or statically provisioned.",
1729
- )
1730
- volume_browser: Optional[VolumeBrowser] = None
1731
- workspace_fqn: Optional[str] = Field(
1732
- None,
1733
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1734
- )
1735
-
1736
-
1737
- class WorkerConfig(BaseModel):
1738
- input_config: Union[
1739
- SQSInputConfig, NATSInputConfig, KafkaInputConfig, AMQPInputConfig
1740
- ] = Field(..., description="+label=Input Config\n+usage=Input Config\n+sort=1")
1741
- output_config: Optional[
1742
- Union[
1743
- SQSOutputConfig,
1744
- NATSOutputConfig,
1745
- CoreNATSOutputConfig,
1746
- KafkaOutputConfig,
1747
- AMQPOutputConfig,
1748
- ]
1749
- ] = Field(None, description="+label=Output Config\n+usage=Output Config\n+sort=2")
1750
- num_concurrent_workers: conint(ge=1, le=10) = Field(
1751
- 1,
1752
- description="+label=Number of Concurrent Workers\n+usage=Number of concurrent workers to spawn for the processor\n+sort=3",
1753
- )
1754
-
1755
-
1756
- class BaseService(BaseModel):
1757
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1758
- ...,
1759
- description="+usage=Name of the service. This uniquely identifies this service in the workspace.\n> Name can only contain alphanumeric characters and '-' and can be atmost 25 characters long\n+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number",
1760
- )
1761
- image: Union[Build, Image] = Field(
1762
- ...,
1763
- description="+docs=Specify whether you want to deploy a Docker image or build and deploy from source code\n+label=Deploy a Docker image or build and deploy from source code\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=2",
1764
- )
1765
- artifacts_download: Optional[ArtifactsDownload] = None
1766
- resources: Optional[Resources] = None
1767
- env: Optional[Dict[str, str]] = Field(
1768
- None,
1769
- description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=6",
1770
- )
1771
- ports: List[Port] = Field(
1772
- ...,
1773
- description="+docs=Specify the ports you want the service to be exposed to\n+label=Configure ports and endpoints to route customer traffic\n+usage=Expose the deployment to make it accessible over the internet or keep it private. Implement authentication to restrict access. [Docs](https://docs.truefoundry.com/docs/define-ports-and-domains)\n+icon=fa-plug\n+sort=4",
1774
- )
1775
- service_account: Optional[str] = None
1776
- mounts: Optional[List[Union[SecretMount, StringDataMount, VolumeMount]]] = Field(
1777
- None,
1778
- description="+usage=Configure data to be mounted to service pod(s) as a string, secret or volume. [Docs](https://docs.truefoundry.com/docs/mounting-volumes-service)\n+sort=10011",
1779
- )
1780
- labels: Optional[Dict[str, str]] = Field(None, description="+label=Labels")
1781
- kustomize: Optional[Kustomize] = None
1782
- liveness_probe: Optional[HealthProbe] = None
1783
- readiness_probe: Optional[HealthProbe] = None
1784
- workspace_fqn: Optional[str] = Field(
1785
- None,
1786
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1787
- )
1788
-
1789
-
1790
- class FlyteLaunchPlan(BaseModel):
1791
- id: FlyteLaunchPlanID
1792
- spec: FlyteLaunchPlanSpec
1793
- closure: Any
1794
-
1795
-
1796
- class FlyteTaskCustom(BaseModel):
1797
- truefoundry: Union[PythonTaskConfig, ContainerTaskConfig]
1798
-
1799
-
1800
- class FlyteTaskTemplate(BaseModel):
1801
- id: FlyteTaskID
1802
- custom: FlyteTaskCustom
1803
-
1804
-
1805
- class Service(BaseService):
1806
- """
1807
- +docs=Describes the configuration for the service
1808
- """
1809
-
1810
- type: Literal["service"] = Field(..., description="+value=service")
1811
- replicas: Union[confloat(ge=0.0, le=500.0), ServiceAutoscaling] = Field(
1812
- 1,
1813
- description="+label=Replicas\n+usage=Deploy multiple instances of your pods to distribute incoming traffic across them, ensuring effective load balancing.\n+icon=fa-clone\n+sort=4",
1814
- )
1815
- auto_shutdown: Optional[Autoshutdown] = None
1816
- allow_interception: bool = Field(
1817
- False,
1818
- description="+label=Allow intercepts\n+usage=Whether to allow intercepts to be applied for this service.\nThis would inject an additional sidecar in each pod of the service. Not recommended on production",
1819
- )
1820
- rollout_strategy: Optional[Union[Rolling, Canary, BlueGreen]] = Field(
1821
- None,
1822
- description="+label=Rollout strategy\n+usage=Strategy to dictate how a rollout should happen when a new release for this service is made [Docs](https://docs.truefoundry.com/docs/rollout-strategy)",
1823
- )
1824
-
1825
-
1826
- class AsyncService(BaseService):
1827
- """
1828
- +docs=Describes the configuration for the async-service
1829
- """
1830
-
1831
- type: Literal["async-service"] = Field(..., description="+value=async-service")
1832
- replicas: Union[confloat(ge=0.0, le=500.0), AsyncServiceAutoscaling] = Field(
1833
- 1,
1834
- description="+label=Replicas\n+usage=Deploy multiple instances of your pods to distribute incoming traffic across them, ensuring effective load balancing.\n+icon=fa-clone",
1835
- )
1836
- rollout_strategy: Optional[Rolling] = None
1837
- worker_config: WorkerConfig
1838
- sidecar: Optional[AsyncProcessorSidecar] = None
1839
-
1840
-
1841
- class FlyteTask(BaseModel):
1842
- template: FlyteTaskTemplate
1843
- description: Optional[Any] = None
1844
-
1845
-
1846
- class Workflow(BaseModel):
1847
- """
1848
- +docs=Describes the configuration for the worflow
1849
- """
1850
-
1851
- type: Literal["workflow"] = Field(..., description="+value=workflow")
1852
- name: constr(regex=r"^[a-z](?:[a-z0-9]|-(?!-)){1,30}[a-z0-9]$") = Field(
1853
- ...,
1854
- description="+usage=Name of the workflow\n+sort=1\n+message=3 to 32 lower case characters long alphanumeric word, may contain - in between, cannot start with a number",
1855
- )
1856
- source: Union[LocalSource, RemoteSource] = Field(
1857
- ...,
1858
- description="+docs=Source Code for the workflow, either local or remote\n+label=Source Code for your workflow\n+icon=fa-solid fa-cloud-arrow-up:#21B6A8\n+sort=200",
1859
- )
1860
- workflow_file_path: str = Field(
1861
- ...,
1862
- description="+label=Workflow File Path\n+docs=Path to the workflow file relative to the project root path\n+sort=550",
1863
- )
1864
- flyte_entities: Optional[List[Union[FlyteTask, FlyteWorkflow, FlyteLaunchPlan]]] = (
1865
- Field(None, description="+label=Flyte Entities")
1866
- )
1867
-
1868
-
1869
- class ApplicationSet(BaseModel):
1870
- """
1871
- +docs=Describes the configuration for the application set
1872
- """
1873
-
1874
- type: Literal["application-set"] = Field(..., description="+value=application-set")
1875
- name: str = Field(
1876
- ...,
1877
- description="+label=Name\n+usage=Name of the application set.\n+icon=fa-font",
1878
- )
1879
- components: Optional[List[Union[Service, AsyncService, Job, Helm]]] = Field(
1880
- None,
1881
- description="+label=Components\n+usage=Array of components with their specifications.\n+icon=fa-puzzle-piece\n+uiType=AppComponents",
1882
- )
1883
- template: Optional[str] = Field(
1884
- None,
1885
- description="+label=Template\n+usage=Template to be used for the application set.\n+icon=fa-file\n+uiType=Hidden",
1886
- )
1887
- values: Optional[Dict[str, Any]] = Field(
1888
- None,
1889
- description='+label=Values\n+usage=Values to be used to render components for the application set.\n+icon=fa-file\n+uiType=YamlInput\n+uiProps={"allowAllValues":true}',
1890
- )
1891
- workspace_fqn: Optional[str] = Field(
1892
- None,
1893
- description="+label=Workspace FQN\n+docs=Fully qualified name of the workspace\n+uiType=Hidden",
1894
- )
1895
- convert_template_manifest: Optional[bool] = Field(
1896
- None,
1897
- description="+label=Convert Template Manifest\n+docs=Flag to indicate if the template manifest should be converted to TrueFoundry manifest\n+uiType=Hidden",
1898
- )
1899
-
1900
-
1901
- class Application(BaseModel):
1902
- __root__: Union[
1903
- Service,
1904
- AsyncService,
1905
- Job,
1906
- Notebook,
1907
- Codeserver,
1908
- SSHServer,
1909
- RStudio,
1910
- Helm,
1911
- Volume,
1912
- ApplicationSet,
1913
- Workflow,
1914
- SparkJob,
1915
- ]