truefoundry 0.5.10rc2__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 (256) hide show
  1. truefoundry/__init__.py +19 -0
  2. truefoundry/_client.py +36 -0
  3. truefoundry/common/utils.py +9 -0
  4. truefoundry/deploy/__init__.py +2 -2
  5. truefoundry/deploy/_autogen/models.py +1591 -0
  6. truefoundry/deploy/builder/__init__.py +1 -1
  7. truefoundry/deploy/builder/builders/dockerfile.py +1 -1
  8. truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +1 -1
  9. truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +1 -1
  10. truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +1 -1
  11. truefoundry/deploy/lib/clients/servicefoundry_client.py +41 -35
  12. truefoundry/deploy/v2/lib/deploy.py +7 -7
  13. truefoundry/deploy/v2/lib/deploy_workflow.py +9 -9
  14. truefoundry/deploy/v2/lib/deployable_patched_models.py +1 -1
  15. truefoundry/deploy/v2/lib/patched_models.py +7 -7
  16. truefoundry/deploy/v2/lib/source.py +1 -1
  17. truefoundry/ml/__init__.py +2 -2
  18. truefoundry/ml/_autogen/client/__init__.py +457 -0
  19. truefoundry/ml/_autogen/client/api/__init__.py +16 -0
  20. truefoundry/ml/{autogen → _autogen}/client/api/auth_api.py +4 -4
  21. truefoundry/ml/{autogen → _autogen}/client/api/deprecated_api.py +7 -7
  22. truefoundry/ml/{autogen → _autogen}/client/api/experiments_api.py +12 -12
  23. truefoundry/ml/{autogen → _autogen}/client/api/generate_code_snippet_api.py +8 -8
  24. truefoundry/ml/{autogen → _autogen}/client/api/health_api.py +3 -3
  25. truefoundry/ml/{autogen → _autogen}/client/api/metrics_api.py +6 -6
  26. truefoundry/ml/{autogen → _autogen}/client/api/mlfoundry_artifacts_api.py +61 -59
  27. truefoundry/ml/{autogen → _autogen}/client/api/run_artifacts_api.py +4 -4
  28. truefoundry/ml/{autogen → _autogen}/client/api/runs_api.py +21 -21
  29. truefoundry/ml/{autogen → _autogen}/client/api_client.py +6 -6
  30. truefoundry/ml/{autogen → _autogen}/client/configuration.py +1 -1
  31. truefoundry/ml/_autogen/client/models/__init__.py +428 -0
  32. truefoundry/ml/{autogen → _autogen}/client/models/agent_app.py +5 -6
  33. truefoundry/ml/{autogen → _autogen}/client/models/agent_manifest.py +10 -17
  34. truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_manifest.py +12 -18
  35. truefoundry/ml/{autogen → _autogen}/client/models/agent_open_api_tool_with_fqn.py +15 -23
  36. truefoundry/ml/{autogen → _autogen}/client/models/agent_with_fqn.py +13 -22
  37. truefoundry/ml/{autogen → _autogen}/client/models/apply_request_dto.py +1 -1
  38. truefoundry/ml/{autogen → _autogen}/client/models/apply_response_dto.py +1 -1
  39. truefoundry/ml/{autogen → _autogen}/client/models/artifact_dto.py +5 -3
  40. truefoundry/ml/{autogen/client/models/artifact_version_manifest.py → _autogen/client/models/artifact_manifest.py} +16 -21
  41. truefoundry/ml/{autogen → _autogen}/client/models/artifact_path.py +2 -4
  42. truefoundry/ml/{autogen → _autogen}/client/models/artifact_response_dto.py +1 -1
  43. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_dto.py +4 -4
  44. truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_response_dto.py +3 -1
  45. truefoundry/ml/{autogen → _autogen}/client/models/assistant_message.py +4 -8
  46. truefoundry/ml/{autogen → _autogen}/client/models/blob_storage_reference.py +5 -8
  47. truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest.py +10 -15
  48. truefoundry/ml/{autogen → _autogen}/client/models/chat_prompt_manifest_messages_inner.py +3 -3
  49. truefoundry/ml/{autogen → _autogen}/client/models/content.py +2 -2
  50. truefoundry/ml/{autogen → _autogen}/client/models/content1.py +2 -2
  51. truefoundry/ml/{autogen → _autogen}/client/models/content2.py +3 -3
  52. truefoundry/ml/{autogen → _autogen}/client/models/content2_any_of_inner.py +2 -2
  53. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_request_dto.py +1 -1
  54. truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_request_dto.py +1 -1
  55. truefoundry/ml/{autogen → _autogen}/client/models/create_dataset_request_dto.py +1 -1
  56. truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_request_dto.py +1 -1
  57. truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_response_dto.py +1 -1
  58. truefoundry/ml/{autogen → _autogen}/client/models/create_run_request_dto.py +1 -1
  59. truefoundry/ml/{autogen → _autogen}/client/models/create_run_response_dto.py +1 -1
  60. truefoundry/ml/{autogen → _autogen}/client/models/data_directory_manifest.py +5 -7
  61. truefoundry/ml/{autogen → _autogen}/client/models/dataset_dto.py +3 -3
  62. truefoundry/ml/{autogen → _autogen}/client/models/dataset_response_dto.py +1 -1
  63. truefoundry/ml/{autogen → _autogen}/client/models/experiment_dto.py +2 -2
  64. truefoundry/ml/{autogen → _autogen}/client/models/experiment_response_dto.py +1 -1
  65. truefoundry/ml/{autogen → _autogen}/client/models/export_deployment_files_request_dto.py +1 -1
  66. truefoundry/ml/{autogen → _autogen}/client/models/external_blob_storage_source.py +14 -7
  67. truefoundry/ml/{autogen → _autogen}/client/models/fast_ai_framework.py +2 -5
  68. truefoundry/ml/{autogen → _autogen}/client/models/file_info_dto.py +4 -1
  69. truefoundry/ml/{autogen → _autogen}/client/models/finalize_artifact_version_request_dto.py +1 -1
  70. truefoundry/ml/{autogen → _autogen}/client/models/framework.py +15 -15
  71. truefoundry/ml/{autogen → _autogen}/client/models/get_experiment_response_dto.py +2 -2
  72. truefoundry/ml/{autogen → _autogen}/client/models/get_latest_run_log_response_dto.py +1 -1
  73. truefoundry/ml/{autogen → _autogen}/client/models/get_metric_history_response.py +1 -1
  74. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +1 -1
  75. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +1 -1
  76. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_response_dto.py +1 -1
  77. truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_write_response_dto.py +1 -1
  78. truefoundry/ml/{autogen → _autogen}/client/models/gluon_framework.py +2 -4
  79. truefoundry/ml/{autogen → _autogen}/client/models/h2_o_framework.py +2 -4
  80. truefoundry/ml/{autogen → _autogen}/client/models/http_validation_error.py +1 -1
  81. truefoundry/ml/{autogen → _autogen}/client/models/image_content_part.py +4 -7
  82. truefoundry/ml/{autogen → _autogen}/client/models/image_url.py +2 -2
  83. truefoundry/ml/{autogen → _autogen}/client/models/infer_method_name.py +1 -1
  84. truefoundry/ml/{autogen → _autogen}/client/models/keras_framework.py +2 -4
  85. truefoundry/ml/{autogen → _autogen}/client/models/latest_run_log_dto.py +1 -1
  86. truefoundry/ml/{autogen → _autogen}/client/models/library_name.py +1 -1
  87. truefoundry/ml/{autogen → _autogen}/client/models/light_gbm_framework.py +2 -5
  88. truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_request_dto.py +2 -2
  89. truefoundry/ml/{autogen → _autogen}/client/models/list_artifact_versions_response_dto.py +3 -1
  90. truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_request_dto.py +1 -1
  91. truefoundry/ml/{autogen → _autogen}/client/models/list_artifacts_response_dto.py +1 -1
  92. truefoundry/ml/{autogen → _autogen}/client/models/list_colums_response_dto.py +1 -1
  93. truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_response_dto.py +1 -1
  94. truefoundry/ml/{autogen → _autogen}/client/models/list_experiments_response_dto.py +1 -1
  95. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_versions_response_dto.py +1 -1
  96. truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_response_dto.py +1 -1
  97. truefoundry/ml/{autogen → _autogen}/client/models/list_latest_run_logs_response_dto.py +1 -1
  98. truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_response_dto.py +1 -1
  99. truefoundry/ml/{autogen → _autogen}/client/models/list_model_version_response_dto.py +1 -1
  100. truefoundry/ml/{autogen → _autogen}/client/models/list_model_versions_request_dto.py +1 -1
  101. truefoundry/ml/{autogen → _autogen}/client/models/list_models_response_dto.py +1 -1
  102. truefoundry/ml/{autogen → _autogen}/client/models/list_run_artifacts_response_dto.py +1 -1
  103. truefoundry/ml/{autogen → _autogen}/client/models/list_run_logs_response_dto.py +1 -1
  104. truefoundry/ml/{autogen → _autogen}/client/models/local_artifact_source.py +3 -5
  105. truefoundry/ml/{autogen → _autogen}/client/models/local_model_source.py +2 -5
  106. truefoundry/ml/{autogen → _autogen}/client/models/log_batch_request_dto.py +3 -3
  107. truefoundry/ml/{autogen → _autogen}/client/models/manifest.py +28 -30
  108. truefoundry/ml/{autogen → _autogen}/client/models/manifest1.py +26 -28
  109. truefoundry/ml/{autogen → _autogen}/client/models/manifest2.py +16 -16
  110. truefoundry/ml/{autogen → _autogen}/client/models/method.py +1 -1
  111. truefoundry/ml/{autogen → _autogen}/client/models/metric_collection_dto.py +1 -1
  112. truefoundry/ml/{autogen → _autogen}/client/models/mime_type.py +1 -1
  113. truefoundry/ml/{autogen → _autogen}/client/models/model_configuration.py +6 -7
  114. truefoundry/ml/{autogen → _autogen}/client/models/model_dto.py +4 -4
  115. truefoundry/ml/{autogen/client/models/model_version_manifest.py → _autogen/client/models/model_manifest.py} +18 -23
  116. truefoundry/ml/{autogen → _autogen}/client/models/model_response_dto.py +1 -1
  117. truefoundry/ml/{autogen → _autogen}/client/models/model_version_dto.py +7 -9
  118. truefoundry/ml/{autogen → _autogen}/client/models/model_version_environment.py +3 -5
  119. truefoundry/ml/{autogen → _autogen}/client/models/model_version_response_dto.py +1 -1
  120. truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_dto.py +2 -2
  121. truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_response_dto.py +1 -1
  122. truefoundry/ml/{autogen → _autogen}/client/models/onnx_framework.py +2 -4
  123. truefoundry/ml/{autogen → _autogen}/client/models/openapi_spec.py +2 -2
  124. truefoundry/ml/{autogen → _autogen}/client/models/paddle_framework.py +2 -5
  125. truefoundry/ml/{autogen → _autogen}/client/models/parameters.py +2 -2
  126. truefoundry/ml/{autogen → _autogen}/client/models/py_torch_framework.py +2 -5
  127. truefoundry/ml/{autogen → _autogen}/client/models/resolve_agent_app_response_dto.py +1 -1
  128. truefoundry/ml/{autogen → _autogen}/client/models/run_data_dto.py +3 -3
  129. truefoundry/ml/{autogen → _autogen}/client/models/run_dto.py +2 -2
  130. truefoundry/ml/{autogen → _autogen}/client/models/run_info_dto.py +1 -1
  131. truefoundry/ml/{autogen → _autogen}/client/models/run_response_dto.py +1 -1
  132. truefoundry/ml/{autogen → _autogen}/client/models/search_runs_response_dto.py +1 -1
  133. truefoundry/ml/{autogen → _autogen}/client/models/signed_url_dto.py +1 -2
  134. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_framework.py +7 -8
  135. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_model_schema.py +5 -8
  136. truefoundry/ml/{autogen → _autogen}/client/models/sklearn_serialization_format.py +1 -1
  137. truefoundry/ml/{autogen → _autogen}/client/models/source.py +4 -4
  138. truefoundry/ml/{autogen → _autogen}/client/models/source1.py +3 -3
  139. truefoundry/ml/{autogen → _autogen}/client/models/source2.py +4 -4
  140. truefoundry/ml/{autogen → _autogen}/client/models/spa_cy_framework.py +2 -4
  141. truefoundry/ml/{autogen → _autogen}/client/models/stats_models_framework.py +2 -5
  142. truefoundry/ml/{autogen → _autogen}/client/models/store_run_logs_request_dto.py +1 -1
  143. truefoundry/ml/{autogen → _autogen}/client/models/subject.py +1 -1
  144. truefoundry/ml/{autogen → _autogen}/client/models/system_message.py +4 -9
  145. truefoundry/ml/{autogen → _autogen}/client/models/tensor_flow_framework.py +2 -5
  146. truefoundry/ml/{autogen → _autogen}/client/models/text.py +2 -2
  147. truefoundry/ml/{autogen → _autogen}/client/models/text_content_part.py +3 -5
  148. truefoundry/ml/{autogen → _autogen}/client/models/transformers_framework.py +6 -10
  149. truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_request_dto.py +1 -1
  150. truefoundry/ml/{autogen → _autogen}/client/models/true_foundry_managed_source.py +16 -10
  151. truefoundry/ml/{autogen → _autogen}/client/models/update_artifact_version_request_dto.py +1 -1
  152. truefoundry/ml/{autogen → _autogen}/client/models/update_dataset_request_dto.py +1 -1
  153. truefoundry/ml/{autogen → _autogen}/client/models/update_model_version_request_dto.py +3 -5
  154. truefoundry/ml/{autogen → _autogen}/client/models/update_run_response_dto.py +1 -1
  155. truefoundry/ml/{autogen → _autogen}/client/models/url.py +2 -2
  156. truefoundry/ml/{autogen → _autogen}/client/models/user_message.py +4 -7
  157. truefoundry/ml/{autogen → _autogen}/client/models/validation_error.py +1 -1
  158. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_framework.py +5 -8
  159. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_model_schema.py +4 -7
  160. truefoundry/ml/{autogen → _autogen}/client/models/xg_boost_serialization_format.py +1 -1
  161. truefoundry/ml/{autogen → _autogen}/client/rest.py +1 -1
  162. truefoundry/ml/_autogen/client_README.md +359 -0
  163. truefoundry/ml/_autogen/entities/artifacts.py +558 -0
  164. truefoundry/ml/artifact/truefoundry_artifact_repo.py +1 -1
  165. truefoundry/ml/cli/commands/model_init.py +1 -1
  166. truefoundry/ml/clients/servicefoundry_client.py +4 -0
  167. truefoundry/ml/entities.py +1 -1
  168. truefoundry/ml/log_types/artifacts/artifact.py +9 -9
  169. truefoundry/ml/log_types/artifacts/dataset.py +5 -5
  170. truefoundry/ml/log_types/artifacts/general_artifact.py +1 -1
  171. truefoundry/ml/log_types/artifacts/model.py +9 -9
  172. truefoundry/ml/log_types/image/image.py +1 -1
  173. truefoundry/ml/log_types/plot.py +1 -1
  174. truefoundry/ml/mlfoundry_api.py +2 -2
  175. truefoundry/ml/mlfoundry_run.py +1 -1
  176. truefoundry/ml/model_framework.py +3 -3
  177. truefoundry/ml/session.py +7 -4
  178. truefoundry/ml/validation_utils.py +1 -1
  179. truefoundry/workflow/map_task.py +5 -2
  180. {truefoundry-0.5.10rc2.dist-info → truefoundry-0.5.11rc1.dist-info}/METADATA +2 -1
  181. truefoundry-0.5.11rc1.dist-info/RECORD +377 -0
  182. truefoundry/deploy/auto_gen/models.py +0 -1915
  183. truefoundry/ml/autogen/client/__init__.py +0 -453
  184. truefoundry/ml/autogen/client/api/__init__.py +0 -16
  185. truefoundry/ml/autogen/client/models/__init__.py +0 -424
  186. truefoundry/ml/autogen/client_README.md +0 -359
  187. truefoundry/ml/autogen/entities/artifacts.py +0 -795
  188. truefoundry-0.5.10rc2.dist-info/RECORD +0 -376
  189. /truefoundry/ml/{autogen → _autogen}/__init__.py +0 -0
  190. /truefoundry/ml/{autogen → _autogen}/client/api_response.py +0 -0
  191. /truefoundry/ml/{autogen → _autogen}/client/exceptions.py +0 -0
  192. /truefoundry/ml/{autogen → _autogen}/client/models/artifact_type.py +0 -0
  193. /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_serialization_format.py +0 -0
  194. /truefoundry/ml/{autogen → _autogen}/client/models/artifact_version_status.py +0 -0
  195. /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_request_dto.py +0 -0
  196. /truefoundry/ml/{autogen → _autogen}/client/models/authorize_user_for_model_version_request_dto.py +0 -0
  197. /truefoundry/ml/{autogen → _autogen}/client/models/body_get_search_runs_get.py +0 -0
  198. /truefoundry/ml/{autogen → _autogen}/client/models/columns_dto.py +0 -0
  199. /truefoundry/ml/{autogen → _autogen}/client/models/command.py +0 -0
  200. /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_response_dto.py +0 -0
  201. /truefoundry/ml/{autogen → _autogen}/client/models/create_artifact_version_response_dto.py +0 -0
  202. /truefoundry/ml/{autogen → _autogen}/client/models/create_experiment_response_dto.py +0 -0
  203. /truefoundry/ml/{autogen → _autogen}/client/models/create_model_version_request_dto.py +0 -0
  204. /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_for_dataset_request_dto.py +0 -0
  205. /truefoundry/ml/{autogen → _autogen}/client/models/create_multi_part_upload_request_dto.py +0 -0
  206. /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_request_dto.py +0 -0
  207. /truefoundry/ml/{autogen → _autogen}/client/models/create_python_deployment_config_response_dto.py +0 -0
  208. /truefoundry/ml/{autogen → _autogen}/client/models/create_workflow_task_config_request_dto.py +0 -0
  209. /truefoundry/ml/{autogen → _autogen}/client/models/delete_artifact_versions_request_dto.py +0 -0
  210. /truefoundry/ml/{autogen → _autogen}/client/models/delete_dataset_request_dto.py +0 -0
  211. /truefoundry/ml/{autogen → _autogen}/client/models/delete_files_for_dataset_request_dto.py +0 -0
  212. /truefoundry/ml/{autogen → _autogen}/client/models/delete_model_version_request_dto.py +0 -0
  213. /truefoundry/ml/{autogen → _autogen}/client/models/delete_run_request.py +0 -0
  214. /truefoundry/ml/{autogen → _autogen}/client/models/delete_tag_request_dto.py +0 -0
  215. /truefoundry/ml/{autogen → _autogen}/client/models/experiment_id_request_dto.py +0 -0
  216. /truefoundry/ml/{autogen → _autogen}/client/models/experiment_tag_dto.py +0 -0
  217. /truefoundry/ml/{autogen → _autogen}/client/models/get_artifact_version_aliases_response_dto.py +0 -0
  218. /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_url_for_dataset_write_request_dto.py +0 -0
  219. /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +0 -0
  220. /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +0 -0
  221. /truefoundry/ml/{autogen → _autogen}/client/models/get_signed_urls_for_dataset_read_request_dto.py +0 -0
  222. /truefoundry/ml/{autogen → _autogen}/client/models/get_tenant_id_response_dto.py +0 -0
  223. /truefoundry/ml/{autogen → _autogen}/client/models/list_datasets_request_dto.py +0 -0
  224. /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_artifact_version_request_dto.py +0 -0
  225. /truefoundry/ml/{autogen → _autogen}/client/models/list_files_for_dataset_request_dto.py +0 -0
  226. /truefoundry/ml/{autogen → _autogen}/client/models/list_metric_history_request_dto.py +0 -0
  227. /truefoundry/ml/{autogen → _autogen}/client/models/list_models_request_dto.py +0 -0
  228. /truefoundry/ml/{autogen → _autogen}/client/models/log_metric_request_dto.py +0 -0
  229. /truefoundry/ml/{autogen → _autogen}/client/models/log_param_request_dto.py +0 -0
  230. /truefoundry/ml/{autogen → _autogen}/client/models/metric_dto.py +0 -0
  231. /truefoundry/ml/{autogen → _autogen}/client/models/model_server.py +0 -0
  232. /truefoundry/ml/{autogen → _autogen}/client/models/multi_part_upload_storage_provider.py +0 -0
  233. /truefoundry/ml/{autogen → _autogen}/client/models/notify_artifact_version_failure_dto.py +0 -0
  234. /truefoundry/ml/{autogen → _autogen}/client/models/param_dto.py +0 -0
  235. /truefoundry/ml/{autogen → _autogen}/client/models/restore_run_request_dto.py +0 -0
  236. /truefoundry/ml/{autogen → _autogen}/client/models/run_log_dto.py +0 -0
  237. /truefoundry/ml/{autogen → _autogen}/client/models/run_log_input_dto.py +0 -0
  238. /truefoundry/ml/{autogen → _autogen}/client/models/run_tag_dto.py +0 -0
  239. /truefoundry/ml/{autogen → _autogen}/client/models/search_runs_request_dto.py +0 -0
  240. /truefoundry/ml/{autogen → _autogen}/client/models/set_experiment_tag_request_dto.py +0 -0
  241. /truefoundry/ml/{autogen → _autogen}/client/models/set_tag_request_dto.py +0 -0
  242. /truefoundry/ml/{autogen → _autogen}/client/models/stop.py +0 -0
  243. /truefoundry/ml/{autogen → _autogen}/client/models/subject_type.py +0 -0
  244. /truefoundry/ml/{autogen → _autogen}/client/models/trigger_job_run_config_response_dto.py +0 -0
  245. /truefoundry/ml/{autogen → _autogen}/client/models/update_experiment_request_dto.py +0 -0
  246. /truefoundry/ml/{autogen → _autogen}/client/models/update_run_request_dto.py +0 -0
  247. /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_request_dto.py +0 -0
  248. /truefoundry/ml/{autogen → _autogen}/client/models/validate_external_storage_root_response_dto.py +0 -0
  249. /truefoundry/ml/{autogen → _autogen}/client/models/validation_error_loc_inner.py +0 -0
  250. /truefoundry/ml/{autogen → _autogen}/models/__init__.py +0 -0
  251. /truefoundry/ml/{autogen → _autogen}/models/exceptions.py +0 -0
  252. /truefoundry/ml/{autogen → _autogen}/models/schema.py +0 -0
  253. /truefoundry/ml/{autogen → _autogen}/models/signature.py +0 -0
  254. /truefoundry/ml/{autogen → _autogen}/models/utils.py +0 -0
  255. {truefoundry-0.5.10rc2.dist-info → truefoundry-0.5.11rc1.dist-info}/WHEEL +0 -0
  256. {truefoundry-0.5.10rc2.dist-info → truefoundry-0.5.11rc1.dist-info}/entry_points.txt +0 -0
@@ -1,795 +0,0 @@
1
- # generated by datamodel-codegen:
2
- # filename: artifacts.json
3
- # timestamp: 2025-02-26T17:30:50+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 BaseModel, Field, conint, constr
11
-
12
-
13
- class Method(str, Enum):
14
- """
15
- +sort=50
16
- +uiType=Hidden
17
- +label=API HTTP Method
18
- +usage=HTTP Method for the tool call HTTP request
19
- """
20
-
21
- get = "get"
22
- post = "post"
23
- put = "put"
24
- delete = "delete"
25
- patch = "patch"
26
-
27
-
28
- class ArtifactPath(BaseModel):
29
- src: str = Field(
30
- ..., description="+label=Source path\n+usage=Local file or folder path"
31
- )
32
- dest: Optional[str] = Field(
33
- None,
34
- description="+label=Destination path\n+usage=Relative path where the file or folder will be uploaded to in the artifact",
35
- )
36
-
37
-
38
- class BaseArtifactVersion(BaseModel):
39
- name: Optional[constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256)] = Field(
40
- None,
41
- description="+sort=1\n+label=Name\n+message=The name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between\n+usage=Name of the entity",
42
- )
43
- description: Optional[constr(max_length=512)] = Field(
44
- None, description="+sort=2\n+label=Description"
45
- )
46
- metadata: Dict[str, Any] = Field(
47
- ...,
48
- description='+label=Metadata\n+usage=Key value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}`\n+uiType=JsonInput\n+uiProps={"descriptionInline":true}',
49
- )
50
- version_alias: Optional[
51
- constr(regex=r"^v[a-zA-Z0-9.-]*([a-zA-Z0-9]+)$", max_length=128)
52
- ] = Field(
53
- None,
54
- description='+label=Version Alias\n+usage=Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with `v` followed by alphanumeric and it can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc)\n+message=The version alias should start with `v` followed by alphanumeric and can include `.` and `-` in between (e.g. `v1.0.0`, `v1-prod`, `v3-dev`, etc)\n+uiProps={"descriptionInline":true}\n+placeholder=v1.0.0',
55
- )
56
- ml_repo: Optional[constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$")] = (
57
- Field(
58
- None,
59
- description="+label=ML Repo\n+usage=Name of the ML Repo\n+uiType=Hidden",
60
- )
61
- )
62
- version: Optional[conint(ge=1)] = Field(
63
- None,
64
- description="+label=Version of the entity\n+usage=Version of the entity\n+uiType=Hidden",
65
- )
66
-
67
-
68
- class MimeType(str, Enum):
69
- """
70
- +label=MIME Type
71
- +usage=MIME type of the content
72
- """
73
-
74
- text_plain = "text/plain"
75
- application_json = "application/json"
76
- image_png = "image/png"
77
- image_jpeg = "image/jpeg"
78
- application_x_directory = "application/x-directory"
79
-
80
-
81
- class BlobStorageReference(BaseModel):
82
- """
83
- +label=Blob Storage Reference
84
- +usage=A reference to content offloaded to blob storage
85
- +docs=Defines the structure for blob storage content references, including type, path, and mime_type
86
- """
87
-
88
- type: Literal["blob-storage"] = Field(..., description="+value=blob-storage")
89
- path: constr(regex=r"^.{1,}$") = Field(
90
- ..., description="+label=Path\n+usage=Path to the content in blob storage"
91
- )
92
- mime_type: MimeType = Field(
93
- ..., description="+label=MIME Type\n+usage=MIME type of the content"
94
- )
95
-
96
-
97
- class Collaborator(BaseModel):
98
- subject: str = Field(
99
- ...,
100
- description="+label=Subject FQN\n+usage=Fully Qualified Name of the subject. eg: user:email or team:teamname",
101
- )
102
- role_id: str = Field(
103
- ..., description="+label=Role ID\n+usage=Role ID for the resource"
104
- )
105
-
106
-
107
- class ExternalBlobStorageSource(BaseModel):
108
- """
109
- +label=External Blob Storage Source
110
- """
111
-
112
- type: Literal["external"] = Field(
113
- ..., description="+label=Type\n+usage=Type of the source\n+value=external"
114
- )
115
- uri: str = Field(
116
- ...,
117
- description="+label=URI\n+usage=URI referencing a path in the blob storage bucket linked to the MLRepo",
118
- )
119
-
120
-
121
- class FastAIFramework(BaseModel):
122
- """
123
- +label=FastAI
124
- +icon=fastai
125
- """
126
-
127
- type: Literal["fastai"] = Field(
128
- ..., description="+label=Type\n+usage=Type of the framework\n+value=fastai"
129
- )
130
-
131
-
132
- class GluonFramework(BaseModel):
133
- """
134
- +label=Gluon
135
- +icon=gluon
136
- """
137
-
138
- type: Literal["gluon"] = Field(
139
- ..., description="+label=Type\n+usage=Type of the framework\n+value=gluon"
140
- )
141
-
142
-
143
- class H2OFramework(BaseModel):
144
- """
145
- +label=H2O
146
- +icon=h2o
147
- """
148
-
149
- type: Literal["h2o"] = Field(
150
- ..., description="+label=Type\n+usage=Type of the framework\n+value=h2o"
151
- )
152
-
153
-
154
- class ImageUrl(BaseModel):
155
- """
156
- +label=Image URL
157
- +usage=Image URL linking to the image
158
- """
159
-
160
- url: Union[
161
- constr(
162
- regex=r"^\b((https?://)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)|data:image/[a-zA-Z]+;base64,[a-zA-Z0-9+/=\s]+)$"
163
- ),
164
- BlobStorageReference,
165
- ] = Field(..., description="+label=URL\n+usage=Image URL linking to the image")
166
-
167
-
168
- class ImageContentPart(BaseModel):
169
- """
170
- +label=Image Content
171
- +usage=Image content for the message
172
- """
173
-
174
- type: Literal["image_url"] = Field(
175
- ..., description="+value=image_url\n+usage=Type of the content part"
176
- )
177
- image_url: ImageUrl = Field(
178
- ..., description="+label=Image URL\n+usage=Image URL linking to the image"
179
- )
180
-
181
-
182
- class KerasFramework(BaseModel):
183
- """
184
- +label=Keras
185
- +icon=keras
186
- """
187
-
188
- type: Literal["keras"] = Field(
189
- ..., description="+label=Type\n+usage=Type of the framework\n+value=keras"
190
- )
191
-
192
-
193
- class LightGBMFramework(BaseModel):
194
- """
195
- +label=LightGBM
196
- +icon=lightbgm
197
- """
198
-
199
- type: Literal["lightgbm"] = Field(
200
- ..., description="+label=Type\n+usage=Type of the framework\n+value=lightgbm"
201
- )
202
-
203
-
204
- class LocalArtifactSource(BaseModel):
205
- type: Literal["local"] = Field(
206
- ..., description="+label=Type\n+usage=Type of the source\n+value=local"
207
- )
208
- paths: List[ArtifactPath] = Field(
209
- ...,
210
- description="+label=Paths\n+usage=Array of ArtifactPath objects representing the source and destination paths",
211
- )
212
-
213
-
214
- class LocalModelSource(BaseModel):
215
- type: Literal["local"] = Field(
216
- ..., description="+label=Type\n+usage=Type of the source\n+value=local"
217
- )
218
- file_or_folder: str = Field(
219
- ...,
220
- description="+label=Path to the model file or folder\n+usage=Path to the model file or folder",
221
- )
222
-
223
-
224
- class MLRepo(BaseModel):
225
- """
226
- +label=MLRepo
227
- +usage=MLRepo is a repository ML training runs that log params, metrics, plots, images and versioned entities like artifacts, models, prompts, tools, agents
228
- """
229
-
230
- type: Literal["ml-repo"] = Field(..., description="+value=ml-repo")
231
- name: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$") = Field(
232
- ...,
233
- description="+label=Name\n+icon=fa-desktop:#black\n+usage=Name of the ML Repo.\n+message=Alphanumeric word, may contain '-' with a maximum length of 100 characters\n+sort=1",
234
- )
235
- description: Optional[constr(regex=r"^.{0,500}$")] = Field(
236
- None,
237
- description='+label=Description\n+icon=fa-desktop:#black\n+usage=Description for the ML Repo.\n+message=Description can be maximum 500 characters\n+sort=2\n+placeholder=MLRepo to track text-classification experiments and models\n+uiProps={"descriptionInline":true}',
238
- )
239
- storage_integration_fqn: str = Field(
240
- ...,
241
- description="+label=Storage Integration\n+icon=hard-drive\n+usage=Storage Integration to store artifacts and models. A storage integration represents a connected blob storage like AWS S3 / Azure Blob Storage / Google Cloud Storage.\n+message=Select the storage-integration where you want to save your artifacts and models\n[View Docs](https://docs.truefoundry.com/docs/integrations)\n+sort=4",
242
- )
243
- collaborators: List[Collaborator] = Field(
244
- ...,
245
- description="+label=Collaborators\n+sort=5\n+usage=Users and Teams that have access to MLRepo\n+uiType=Collaborators",
246
- )
247
-
248
-
249
- class Parameters(BaseModel):
250
- """
251
- +label=Parameters
252
- +usage=Parameters to pass to the model when generating
253
- """
254
-
255
- max_tokens: Optional[int] = None
256
- temperature: Optional[float] = None
257
- top_k: Optional[float] = None
258
- top_p: Optional[float] = None
259
- stop: Optional[Union[List[str], str]] = None
260
-
261
-
262
- class ModelConfiguration(BaseModel):
263
- """
264
- +label=Model Configuration
265
- +icon=fa-cogs:#326ce5
266
- +usage=Add a model from Gateway along with parameters to be used for chat completion
267
- """
268
-
269
- provider: str = Field(
270
- ...,
271
- description='+sort=1000\n+uiType=SelectModelAndProvider\n+uiProps={"isModel": false,"providerJsonKey": "model_configuration.provider","searchable": true}\n+label=Provider Name\n+usage=Name of the provider, must be one of the integration providers configured for the Gateway',
272
- )
273
- model: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$") = Field(
274
- ...,
275
- description='+sort=1001\n+uiType=SelectModelAndProvider\n+uiProps={"isModel": true,"providerJsonKey": "model_configuration.provider","searchable": true}\n+label=Model Name\n+usage=Name of the model to be used for generations. This model should be available in the provider',
276
- )
277
- parameters: Optional[Parameters] = Field(
278
- None,
279
- description="+label=Parameters\n+usage=Parameters to pass to the model when generating",
280
- )
281
- extra_parameters: Optional[Dict[str, Any]] = Field(
282
- None,
283
- description="+label=Extra Parameters\n+usage=Arbitrary extra parameters to pass to the model when generating",
284
- )
285
-
286
-
287
- class ModelVersionEnvironment(BaseModel):
288
- """
289
- +label=Environment
290
- +usage=Runtime environment describing python version and dependencies for running the model
291
- +uiProps={"descriptionInline":true}
292
- """
293
-
294
- python_version: Optional[constr(regex=r"^\d+(\.\d+){1,2}([\-\.a-z0-9]+)?$")] = (
295
- Field(
296
- None,
297
- description="+label=Python Version\n+usage=Python version to use when running the model",
298
- )
299
- )
300
- pip_packages: Optional[List[str]] = Field(
301
- None,
302
- description="+label=PIP Packages\n+usage=pip dependencies needed for running the model",
303
- )
304
-
305
-
306
- class ONNXFramework(BaseModel):
307
- """
308
- +label=ONNX
309
- +icon=onnx
310
- """
311
-
312
- type: Literal["onnx"] = Field(
313
- ..., description="+label=Type\n+usage=Type of the framework\n+value=onnx"
314
- )
315
-
316
-
317
- class PaddleFramework(BaseModel):
318
- """
319
- +label=Paddle
320
- +icon=paddle
321
- """
322
-
323
- type: Literal["paddle"] = Field(
324
- ..., description="+label=Type\n+usage=Type of the framework\n+value=paddle"
325
- )
326
-
327
-
328
- class PyTorchFramework(BaseModel):
329
- """
330
- +label=PyTorch
331
- +icon=pytorch
332
- """
333
-
334
- type: Literal["pytorch"] = Field(
335
- ..., description="+label=Type\n+usage=Type of the framework\n+value=pytorch"
336
- )
337
-
338
-
339
- class InferMethodName(str, Enum):
340
- """
341
- +label=Inference Method Name
342
- +usage=Name of the method used for inference
343
- """
344
-
345
- predict = "predict"
346
- predict_proba = "predict_proba"
347
-
348
-
349
- class SklearnModelSchema(BaseModel):
350
- """
351
- +label=Scikit Learn Model Schema
352
- """
353
-
354
- infer_method_name: InferMethodName = Field(
355
- ...,
356
- description="+label=Inference Method Name\n+usage=Name of the method used for inference",
357
- )
358
- inputs: List[Dict[str, Any]] = Field(
359
- ...,
360
- description='+label= Input Schema\n+usage=Schema of the input\n+uiProps={"descriptionInline":true}',
361
- )
362
- outputs: List[Dict[str, Any]] = Field(
363
- ...,
364
- description='+label= Output Schema\n+usage=Schema of the output\n+uiProps={"descriptionInline":true}',
365
- )
366
-
367
-
368
- class SklearnSerializationFormat(str, Enum):
369
- """
370
- +label=Scikit Learn Serialization Format
371
- +usage=Serialization format used to save the sklearn model
372
- """
373
-
374
- cloudpickle = "cloudpickle"
375
- joblib = "joblib"
376
- pickle = "pickle"
377
-
378
-
379
- class SpaCyFramework(BaseModel):
380
- """
381
- +label=SpaCy
382
- +icon=spacy
383
- """
384
-
385
- type: Literal["spacy"] = Field(
386
- ..., description="+label=Type\n+usage=Type of the framework\n+value=spacy"
387
- )
388
-
389
-
390
- class StatsModelsFramework(BaseModel):
391
- """
392
- +label=StatsModels
393
- +icon=statsmodel
394
- """
395
-
396
- type: Literal["statsmodels"] = Field(
397
- ..., description="+label=Type\n+usage=Type of the framework\n+value=statsmodels"
398
- )
399
-
400
-
401
- class SystemMessage(BaseModel):
402
- """
403
- +label=System Message
404
- +usage=System message for the chat
405
- """
406
-
407
- role: Literal["system"] = Field(
408
- ...,
409
- description="+value=system\n+label=Role\n+usage=Role of the message\n+uiType=Ignore",
410
- )
411
- content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
412
- ...,
413
- description="+label=Content\n+usage=Text content for the system message\n+uiType=TextArea",
414
- )
415
- name: Optional[str] = Field(
416
- None, description="+label=Name\n+usage=Name of the system"
417
- )
418
-
419
-
420
- class TensorFlowFramework(BaseModel):
421
- """
422
- +label=Tensorflow
423
- +icon=tensorflow
424
- """
425
-
426
- type: Literal["tensorflow"] = Field(
427
- ..., description="+label=Type\n+usage=Type of the framework\n+value=tensorflow"
428
- )
429
-
430
-
431
- class TextContentPart(BaseModel):
432
- """
433
- +label=Text Content
434
- +usage=Text content for the message
435
- """
436
-
437
- type: Literal["text"] = Field(
438
- ..., description="+value=text\n+usage=Type of the content part"
439
- )
440
- text: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
441
- ..., description="+label=Text\n+usage=Text content for the message"
442
- )
443
-
444
-
445
- class LibraryName(str, Enum):
446
- """
447
- +label=Library Name
448
- +usage=Name of the library for the framework
449
- """
450
-
451
- transformers = "transformers"
452
- sentence_transformers = "sentence-transformers"
453
- diffusers = "diffusers"
454
-
455
-
456
- class TransformersFramework(BaseModel):
457
- """
458
- +label=Transformers
459
- +icon=transformers
460
- """
461
-
462
- type: Literal["transformers"] = Field(
463
- ...,
464
- description="+label=Type\n+usage=Type of the framework\n+value=transformers",
465
- )
466
- library_name: Optional[LibraryName] = Field(
467
- "transformers",
468
- description="+label=Library Name\n+usage=Name of the library for the framework",
469
- )
470
- pipeline_tag: Optional[str] = Field(
471
- None,
472
- description='+label=Pipeline Tag\n+usage=The `pipeline()` task this model can be used with e.g. `text-generation`. See [huggingface docs](https://huggingface.co/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline.task) for all possible values\n+uiProps={"descriptionInline":true}',
473
- )
474
- base_model: Optional[str] = Field(
475
- None,
476
- description='+label=Base Model\n+usage=Base model Id from HuggingFace Hub. If this is a finetuned model, this points to the base model id used for finetuning.\n+uiProps={"descriptionInline":true}',
477
- )
478
-
479
-
480
- class TrueFoundryManagedSource(BaseModel):
481
- """
482
- +label=TrueFoundry Managed Source
483
- """
484
-
485
- type: Literal["truefoundry"] = Field(
486
- ..., description="+label=Type\n+usage=Type of the source\n+value=truefoundry"
487
- )
488
- uri: Optional[str] = Field(
489
- None,
490
- description='+label=URI\n+uiType=ModelUploadInput\n+uiProps={"hideClear":true}',
491
- )
492
-
493
-
494
- class UserMessage(BaseModel):
495
- """
496
- +label=User Message
497
- +usage=User message turn
498
- """
499
-
500
- role: Literal["user"] = Field(
501
- ..., description="+value=user\n+usage=Role of the message\n+uiType=Ignore"
502
- )
503
- content: Union[
504
- constr(regex=r"^.[\s\S]*$"),
505
- BlobStorageReference,
506
- List[Union[TextContentPart, ImageContentPart]],
507
- ] = Field(
508
- ...,
509
- description="+label=Content\n+usage=Content of the user message. can be a mix of text and images\n+uiType=TextArea",
510
- )
511
- name: Optional[str] = Field(
512
- None, description="+label=Name\n+usage=Name of the user this message is from"
513
- )
514
-
515
-
516
- class XGBoostModelSchema(BaseModel):
517
- """
518
- +label=XGBoost Model Schema
519
- +usage=Schema of the XGBoost model
520
- """
521
-
522
- infer_method_name: Literal["predict"] = Field(
523
- ...,
524
- description="+label=Inference Method Name\n+usage=Name of the method used for inference",
525
- )
526
- inputs: List[Dict[str, Any]] = Field(
527
- ...,
528
- description='+label= Input Schema\n+usage=Schema of the input\n+uiProps={"descriptionInline":true}',
529
- )
530
- outputs: List[Dict[str, Any]] = Field(
531
- ...,
532
- description='+label= Output Schema\n+usage=Schema of the output\n+uiProps={"descriptionInline":true}',
533
- )
534
-
535
-
536
- class XGBoostSerializationFormat(str, Enum):
537
- """
538
- +label=Serialization format
539
- +usage=Serialization format used to save the xgboost model
540
- """
541
-
542
- cloudpickle = "cloudpickle"
543
- joblib = "joblib"
544
- pickle = "pickle"
545
- json = "json"
546
-
547
-
548
- class Agent(BaseArtifactVersion):
549
- type: Literal["agent"] = Field(
550
- ..., description="+value=agent\n+usage=Type of the entity"
551
- )
552
- available_tools: List[constr(min_length=1)] = Field(
553
- ...,
554
- description='+sort=30\n+uiType=Hidden\n+label=Tools\n+usage=Tools available to the agent\n+uiProps={"descriptionInline":true}',
555
- )
556
- goal: constr(min_length=1, max_length=128) = Field(
557
- ...,
558
- description='+sort=10\n+uiType=TextArea\n+label=Goal\n+usage=Short form description. Will be used as `description` when this agent is used as a tool.\n+uiProps={"descriptionInline":true}',
559
- )
560
- instruction: constr(min_length=1, max_length=2620) = Field(
561
- ...,
562
- description='`instruction` is the system prompt for now. (2.5 * 1024)\n+sort=20\n+uiType=AgentInstructions\n+uiProps={"helpText":"Use the syntax ${Tool FQN} to reference a tool, and ${AGENT FQN} to reference another agent"}\n+label=Instructions\n+usage=Instructions for the agent to follow to achieve the goal\n+uiProps={"descriptionInline":true}',
563
- )
564
- model_id: constr(min_length=1) = Field(
565
- ...,
566
- description='+sort=40\n+uiType=EnabledModelSelector\n+uiProps={"searchable":true,"modelType":"chat","providerType":"openai"}\n+label=Model\n+usage=Model to use when running the agent',
567
- )
568
-
569
-
570
- class AgentOpenAPITool(BaseArtifactVersion):
571
- type: Literal["openapi-tool"] = Field(
572
- ..., description="+value=openapi-tool\n+usage=Type of the agent"
573
- )
574
- openapi_spec: Union[BlobStorageReference, Dict[str, Any]] = Field(
575
- ...,
576
- description='+sort=20\n+uiType=OpenapiSchema\n+label=OpenAPI Spec\n+usage=OpenAPI Spec for the tool describing the API, endpoints and parameters. [Sample OpenAPI Spec Link](https://assets.production.truefoundry.com/sample-openapi.json)\n+uiProps={"descriptionInline":true}\n+placeholder={"openapi":"3.0.0","info":{"title":"LLM Agent Tools API","version":"1.0.0"},"servers":[{"url":"https://api.example.com/v1"}],"paths":{"/weather":{"get":{"summary":"Get current weather","description":"Fetches the current weather for a given location.","parameters":[{"name":"location","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"type":"string"},"temperature":{"type":"number"},"condition":{"type":"string"}}}}}}}}}}}',
577
- )
578
- base_url: constr(
579
- regex=r"^(https?://)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)$"
580
- ) = Field(
581
- ...,
582
- description='+sort=30\n+label=Base URL\n+usage=HTTP endpoint where the API is hosted for the tools. E.g. `https://api.example.com/v1`\n+uiProps={"descriptionInline":true}\n+placeholder=https://api.example.com/v1',
583
- )
584
- path: constr(min_length=1) = Field(
585
- ...,
586
- description='+sort=40\n+uiType=MethodPathSelector\n+label=API Route Path\n+usage=API Route Path for the tool call HTTP request. E.g. `GET /weather`\n+uiProps={"descriptionInline":true}',
587
- )
588
- method: Method = Field(
589
- ...,
590
- description="+sort=50\n+uiType=Hidden\n+label=API HTTP Method\n+usage=HTTP Method for the tool call HTTP request",
591
- )
592
- headers: Optional[Dict[str, str]] = Field(
593
- None,
594
- description='+sort=60\n+uiType=KV\n+uiProps={"allowSecrets":true,"secretConfig":{"enableNew":true,"hideOptions":true}}\n+label=Headers\n+usage=HTTP Headers for the tool call HTTP request. E.g. `Authorization: Bearer <token>`\n+uiProps={"descriptionInline":true}',
595
- )
596
-
597
-
598
- class AgentOpenAPIToolWithFQN(AgentOpenAPITool):
599
- id: str = Field(..., description="+usage=ID of the agent tool")
600
- fqn: str = Field(..., description="+usage=FQN of the agent tool")
601
-
602
-
603
- class AgentWithFQN(Agent):
604
- id: str = Field(..., description="+usage=ID of the agent")
605
- fqn: str = Field(..., description="+usage=FQN of the agent")
606
-
607
-
608
- class ArtifactVersion(BaseArtifactVersion):
609
- """
610
- +label=Artifact Version
611
- +usage=Log a new Artifact Version containing files and folders with metadata
612
- """
613
-
614
- type: Literal["artifact-version"] = Field(
615
- ..., description="+label=Type\n+usage=Artifact Version\n+value=artifact-version"
616
- )
617
- source: Union[
618
- TrueFoundryManagedSource, ExternalBlobStorageSource, LocalArtifactSource
619
- ] = Field(..., description="+label=Artifact Source\n+uiType=Group")
620
- step: conint(ge=0) = Field(
621
- 0,
622
- description='+label=Step\n+usage=Step/Epoch number in an iterative training loop the artifact version was created. Generally useful when logging a model version from a MLRepo Run\n+uiProps={"descriptionInline":true}',
623
- )
624
- run_id: Optional[str] = Field(
625
- None,
626
- description="+label=Run ID\n+usage=ID of the MLRepo Run that generated the artifact version\n+uiType=Hidden",
627
- )
628
-
629
-
630
- class AssistantMessage(BaseModel):
631
- """
632
- +label=Assistant Message
633
- +usage=Assistant message turn
634
- """
635
-
636
- role: Literal["assistant"] = Field(
637
- ...,
638
- description="+value=assistant\n+label=Role\n+usage=Role of the message\n+uiType=Ignore",
639
- )
640
- content: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference] = Field(
641
- ...,
642
- description="+label=Content\n+usage=Text content for the assistant message\n+uiType=TextArea",
643
- )
644
- name: Optional[str] = Field(
645
- None,
646
- description="+label=Name\n+usage=Name of the assistant this message is from",
647
- )
648
-
649
-
650
- class ChatPrompt(BaseArtifactVersion):
651
- """
652
- +label=Chat Prompt
653
- +usage=Fill in the information for opening a new chat prompt
654
- """
655
-
656
- type: Literal["chat_prompt"] = Field(
657
- ...,
658
- description="+label=Type\n+icon=fa-desktop:#326ce5\n+sort=3000\n+usage=Type of the prompt\n+value=chat_prompt",
659
- )
660
- messages: List[Union[SystemMessage, AssistantMessage, UserMessage]] = Field(
661
- ...,
662
- description="+sort=4000\n+label=Messages in the chat conversation\n+usage=List of messages in the chat conversation, must be non-empty",
663
- )
664
- variables: Optional[Dict[str, Optional[str]]] = Field(
665
- None,
666
- description="+label=Variables\n+usage=Variables referenced in messages and that can be replaced when running generation\n+sort=5000",
667
- )
668
- model_configuration: ModelConfiguration
669
-
670
-
671
- class DataDirectory(BaseModel):
672
- """
673
- +label=Data Directory
674
- """
675
-
676
- type: Literal["data-dir"] = Field(..., description="+label=Type\n+value=data-dir")
677
- name: constr(regex=r"^[A-Za-z0-9_\-]+$", max_length=256) = Field(
678
- ...,
679
- description="+sort=1\n+label=Name\n+usage=Name of the data directory\n+message=The data directory name should start with lowercase alphabets and can contain alphanumeric and can include '-' in between",
680
- )
681
- ml_repo: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,98}[a-zA-Z0-9]$") = Field(
682
- ...,
683
- description="+label=MLRepo\n+usage=Name of the ML Repo to create the data directory under\n+uiType=Hidden",
684
- )
685
- description: Optional[constr(max_length=512)] = Field(
686
- None,
687
- description="+sort=2\n+label=Description\n+usage=Description for the data directory",
688
- )
689
- metadata: Dict[str, Any] = Field(
690
- ...,
691
- description='+label=Metadata\n+usage=Key Value metadata. Should be valid JSON. For e.g. `{"business-unit": "sales", "quality": "good", "rating": 4.5}`\n+uiType=JsonInput',
692
- )
693
- source: Union[TrueFoundryManagedSource, ExternalBlobStorageSource] = Field(
694
- ..., description="+label=Data Directory Source\n+uiType=Group"
695
- )
696
-
697
-
698
- class SklearnFramework(BaseModel):
699
- """
700
- +label=Sklearn
701
- +icon=sklearn
702
- """
703
-
704
- type: Literal["sklearn"] = Field(
705
- ..., description="+label=Type\n+usage=Type of the framework\n+value=sklearn"
706
- )
707
- model_filepath: Optional[str] = Field(
708
- None,
709
- description='+label=Model file path\n+usage=Relative path to the model file in the model version contents\n+uiProps={"descriptionInline":true}',
710
- )
711
- serialization_format: Optional[SklearnSerializationFormat] = None
712
- model_schema: Optional[SklearnModelSchema] = None
713
-
714
-
715
- class XGBoostFramework(BaseModel):
716
- """
717
- +label=XGBoost
718
- +icon=xgboost
719
- """
720
-
721
- type: Literal["xgboost"] = Field(
722
- ..., description="+label=Type\n+usage=Type of the framework\n+value=xgboost"
723
- )
724
- serialization_format: Optional[XGBoostSerializationFormat] = None
725
- model_filepath: Optional[str] = Field(
726
- None,
727
- description="+label=Model file path\n+usage=Relative path to the model file in the model version contents",
728
- )
729
- model_schema: Optional[XGBoostModelSchema] = None
730
-
731
-
732
- class AgentApp(BaseModel):
733
- type: Literal["agent-app"] = Field(
734
- ..., description="+value=agent-app\n+usage=Type of the app"
735
- )
736
- tools: List[AgentOpenAPIToolWithFQN] = Field(
737
- ..., description="+label=Tools\n+usage=Tools available to the Agent app"
738
- )
739
- agents: List[AgentWithFQN] = Field(
740
- ..., description="+label=Agents\n+usage=Agents available to the Agent app"
741
- )
742
- root_agent: constr(min_length=1) = Field(
743
- ...,
744
- description="+label=Root Agent\n+usage=Root Agent for the app. This will be the first agent invoked",
745
- )
746
-
747
-
748
- class ModelVersion(BaseArtifactVersion):
749
- """
750
- +label=Artifact Version
751
- +usage=Log a new Model Version containing model files and folders with metadata
752
- """
753
-
754
- type: Literal["model-version"] = Field(
755
- ..., description="+label=Type\n+usage=Model Version\n+value=model-version"
756
- )
757
- source: Union[
758
- TrueFoundryManagedSource, ExternalBlobStorageSource, LocalModelSource
759
- ] = Field(..., description="+label=Model Source\n+uiType=Group")
760
- framework: Optional[
761
- Union[
762
- TransformersFramework,
763
- TensorFlowFramework,
764
- SklearnFramework,
765
- PyTorchFramework,
766
- KerasFramework,
767
- XGBoostFramework,
768
- LightGBMFramework,
769
- FastAIFramework,
770
- H2OFramework,
771
- ONNXFramework,
772
- SpaCyFramework,
773
- StatsModelsFramework,
774
- GluonFramework,
775
- PaddleFramework,
776
- ]
777
- ] = Field(
778
- None,
779
- description='+label=Framework\n+usage=Framework for the model version like Transformers, PyTorch, Sklearn, Xgboost etc with framework specific metadata. This will be used to infer model deployment configuration\n+uiProps={"descriptionInline":true}',
780
- )
781
- environment: Optional[ModelVersionEnvironment] = None
782
- step: conint(ge=0) = Field(
783
- 0,
784
- description='+label=Step\n+usage=Step/Epoch number in an iterative training loop the model version was created. Generally useful when logging a model version from a MLRepo Run\n+uiProps={"descriptionInline":true}',
785
- )
786
- run_id: Optional[str] = Field(
787
- None,
788
- description="+label=Run ID\n+usage=ID of the MLRepo Run that generated the model version\n+uiType=Hidden",
789
- )
790
-
791
-
792
- class VersionedArtifactType(BaseModel):
793
- __root__: Union[
794
- ArtifactVersion, ModelVersion, ChatPrompt, AgentOpenAPITool, Agent, AgentApp
795
- ]