truefoundry 0.5.9__py3-none-any.whl → 0.5.10rc2__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 (221) hide show
  1. truefoundry/cli/display_util.py +1 -1
  2. truefoundry/deploy/auto_gen/models.py +1 -1
  3. truefoundry/deploy/io/output_callback.py +13 -6
  4. truefoundry/deploy/io/rich_output_callback.py +8 -4
  5. truefoundry/deploy/lib/clients/servicefoundry_client.py +78 -105
  6. truefoundry/deploy/lib/dao/apply.py +2 -2
  7. truefoundry/deploy/lib/dao/delete.py +2 -2
  8. truefoundry/deploy/lib/model/entity.py +37 -24
  9. truefoundry/ml/autogen/client/__init__.py +22 -14
  10. truefoundry/ml/autogen/client/api/auth_api.py +2 -2
  11. truefoundry/ml/autogen/client/api/deprecated_api.py +5 -338
  12. truefoundry/ml/autogen/client/api/experiments_api.py +77 -32
  13. truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +2 -2
  14. truefoundry/ml/autogen/client/api/health_api.py +2 -2
  15. truefoundry/ml/autogen/client/api/metrics_api.py +4 -4
  16. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +530 -140
  17. truefoundry/ml/autogen/client/api/run_artifacts_api.py +10 -5
  18. truefoundry/ml/autogen/client/api/runs_api.py +20 -20
  19. truefoundry/ml/autogen/client/api_client.py +2 -2
  20. truefoundry/ml/autogen/client/configuration.py +29 -57
  21. truefoundry/ml/autogen/client/exceptions.py +2 -2
  22. truefoundry/ml/autogen/client/models/__init__.py +22 -14
  23. truefoundry/ml/autogen/client/models/agent_app.py +13 -5
  24. truefoundry/ml/autogen/client/models/{agent.py → agent_manifest.py} +39 -30
  25. truefoundry/ml/autogen/client/models/{agent_open_api_tool.py → agent_open_api_tool_manifest.py} +50 -31
  26. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +47 -26
  27. truefoundry/ml/autogen/client/models/agent_with_fqn.py +36 -25
  28. truefoundry/ml/autogen/client/models/{add_custom_metrics_to_model_version_request_dto.py → apply_request_dto.py} +23 -17
  29. truefoundry/ml/autogen/client/models/apply_response_dto.py +79 -0
  30. truefoundry/ml/autogen/client/models/artifact_dto.py +2 -2
  31. truefoundry/ml/autogen/client/models/{add_features_to_model_version_request_dto.py → artifact_path.py} +20 -17
  32. truefoundry/ml/autogen/client/models/artifact_response_dto.py +2 -2
  33. truefoundry/ml/autogen/client/models/artifact_type.py +3 -3
  34. truefoundry/ml/autogen/client/models/artifact_version_dto.py +7 -15
  35. truefoundry/ml/autogen/client/models/artifact_version_manifest.py +32 -19
  36. truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +2 -2
  37. truefoundry/ml/autogen/client/models/artifact_version_serialization_format.py +2 -2
  38. truefoundry/ml/autogen/client/models/artifact_version_status.py +2 -2
  39. truefoundry/ml/autogen/client/models/assistant_message.py +9 -5
  40. truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +2 -2
  41. truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +2 -2
  42. truefoundry/ml/autogen/client/models/blob_storage_reference.py +4 -4
  43. truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +2 -2
  44. truefoundry/ml/autogen/client/models/{chat_prompt.py → chat_prompt_manifest.py} +39 -32
  45. truefoundry/ml/autogen/client/models/{chat_prompt_messages_inner.py → chat_prompt_manifest_messages_inner.py} +12 -12
  46. truefoundry/ml/autogen/client/models/columns_dto.py +2 -2
  47. truefoundry/ml/autogen/client/models/command.py +2 -2
  48. truefoundry/ml/autogen/client/models/content.py +3 -3
  49. truefoundry/ml/autogen/client/models/content1.py +3 -3
  50. truefoundry/ml/autogen/client/models/content2.py +3 -3
  51. truefoundry/ml/autogen/client/models/content2_any_of_inner.py +2 -2
  52. truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +2 -2
  53. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +2 -2
  54. truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +2 -2
  55. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +2 -2
  56. truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +21 -5
  57. truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +2 -2
  58. truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +2 -2
  59. truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +4 -12
  60. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +2 -2
  61. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +2 -2
  62. truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +2 -2
  63. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +2 -2
  64. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +2 -2
  65. truefoundry/ml/autogen/client/models/create_run_request_dto.py +2 -2
  66. truefoundry/ml/autogen/client/models/create_run_response_dto.py +2 -2
  67. truefoundry/ml/autogen/client/models/create_workflow_task_config_request_dto.py +2 -2
  68. truefoundry/ml/autogen/client/models/data_directory_manifest.py +126 -0
  69. truefoundry/ml/autogen/client/models/dataset_dto.py +13 -2
  70. truefoundry/ml/autogen/client/models/dataset_response_dto.py +2 -2
  71. truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +2 -2
  72. truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +2 -2
  73. truefoundry/ml/autogen/client/models/delete_files_for_dataset_request_dto.py +2 -2
  74. truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +2 -2
  75. truefoundry/ml/autogen/client/models/delete_run_request.py +2 -2
  76. truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +2 -2
  77. truefoundry/ml/autogen/client/models/experiment_dto.py +3 -3
  78. truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +2 -2
  79. truefoundry/ml/autogen/client/models/experiment_response_dto.py +2 -2
  80. truefoundry/ml/autogen/client/models/experiment_tag_dto.py +2 -2
  81. truefoundry/ml/autogen/client/models/export_deployment_files_request_dto.py +2 -2
  82. truefoundry/ml/autogen/client/models/external_blob_storage_source.py +5 -4
  83. truefoundry/ml/autogen/client/models/fast_ai_framework.py +3 -3
  84. truefoundry/ml/autogen/client/models/file_info_dto.py +2 -2
  85. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +7 -15
  86. truefoundry/ml/autogen/client/models/framework.py +3 -3
  87. truefoundry/ml/autogen/client/models/get_artifact_version_aliases_response_dto.py +2 -2
  88. truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +2 -2
  89. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +2 -2
  90. truefoundry/ml/autogen/client/models/get_metric_history_response.py +2 -2
  91. truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +2 -2
  92. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +2 -2
  93. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +2 -2
  94. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +2 -2
  95. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +2 -2
  96. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +2 -2
  97. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +2 -2
  98. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +2 -2
  99. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +2 -2
  100. truefoundry/ml/autogen/client/models/gluon_framework.py +3 -3
  101. truefoundry/ml/autogen/client/models/h2_o_framework.py +3 -3
  102. truefoundry/ml/autogen/client/models/http_validation_error.py +2 -2
  103. truefoundry/ml/autogen/client/models/image_content_part.py +7 -5
  104. truefoundry/ml/autogen/client/models/image_url.py +3 -3
  105. truefoundry/ml/autogen/client/models/infer_method_name.py +2 -2
  106. truefoundry/ml/autogen/client/models/keras_framework.py +3 -3
  107. truefoundry/ml/autogen/client/models/latest_run_log_dto.py +2 -2
  108. truefoundry/ml/autogen/client/models/library_name.py +2 -2
  109. truefoundry/ml/autogen/client/models/light_gbm_framework.py +3 -3
  110. truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +2 -2
  111. truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +2 -2
  112. truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +2 -2
  113. truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +2 -2
  114. truefoundry/ml/autogen/client/models/list_colums_response_dto.py +2 -2
  115. truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +2 -2
  116. truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +2 -2
  117. truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +2 -2
  118. truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +2 -2
  119. truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +2 -2
  120. truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +2 -2
  121. truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +2 -2
  122. truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +2 -2
  123. truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +2 -2
  124. truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +2 -2
  125. truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +2 -2
  126. truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +2 -2
  127. truefoundry/ml/autogen/client/models/list_models_request_dto.py +2 -2
  128. truefoundry/ml/autogen/client/models/list_models_response_dto.py +2 -2
  129. truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +2 -2
  130. truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +2 -2
  131. truefoundry/ml/autogen/client/models/local_artifact_source.py +93 -0
  132. truefoundry/ml/autogen/client/models/local_model_source.py +80 -0
  133. truefoundry/ml/autogen/client/models/log_batch_request_dto.py +2 -2
  134. truefoundry/ml/autogen/client/models/log_metric_request_dto.py +2 -2
  135. truefoundry/ml/autogen/client/models/log_param_request_dto.py +2 -2
  136. truefoundry/ml/autogen/client/models/manifest.py +100 -23
  137. truefoundry/ml/autogen/client/models/manifest1.py +219 -0
  138. truefoundry/ml/autogen/client/models/manifest2.py +198 -0
  139. truefoundry/ml/autogen/client/models/method.py +3 -3
  140. truefoundry/ml/autogen/client/models/metric_collection_dto.py +2 -2
  141. truefoundry/ml/autogen/client/models/metric_dto.py +2 -2
  142. truefoundry/ml/autogen/client/models/mime_type.py +2 -2
  143. truefoundry/ml/autogen/client/models/model_configuration.py +7 -7
  144. truefoundry/ml/autogen/client/models/model_dto.py +2 -2
  145. truefoundry/ml/autogen/client/models/model_response_dto.py +2 -2
  146. truefoundry/ml/autogen/client/models/model_server.py +2 -2
  147. truefoundry/ml/autogen/client/models/model_version_dto.py +2 -2
  148. truefoundry/ml/autogen/client/models/model_version_environment.py +5 -5
  149. truefoundry/ml/autogen/client/models/model_version_manifest.py +35 -22
  150. truefoundry/ml/autogen/client/models/model_version_response_dto.py +2 -2
  151. truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +2 -2
  152. truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +2 -2
  153. truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +2 -2
  154. truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +2 -2
  155. truefoundry/ml/autogen/client/models/onnx_framework.py +3 -3
  156. truefoundry/ml/autogen/client/models/openapi_spec.py +3 -3
  157. truefoundry/ml/autogen/client/models/paddle_framework.py +3 -3
  158. truefoundry/ml/autogen/client/models/param_dto.py +2 -2
  159. truefoundry/ml/autogen/client/models/parameters.py +3 -3
  160. truefoundry/ml/autogen/client/models/py_torch_framework.py +3 -3
  161. truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +2 -2
  162. truefoundry/ml/autogen/client/models/restore_run_request_dto.py +2 -2
  163. truefoundry/ml/autogen/client/models/run_data_dto.py +2 -2
  164. truefoundry/ml/autogen/client/models/run_dto.py +2 -2
  165. truefoundry/ml/autogen/client/models/run_info_dto.py +2 -2
  166. truefoundry/ml/autogen/client/models/run_log_dto.py +2 -2
  167. truefoundry/ml/autogen/client/models/run_log_input_dto.py +2 -2
  168. truefoundry/ml/autogen/client/models/run_response_dto.py +2 -2
  169. truefoundry/ml/autogen/client/models/run_tag_dto.py +2 -2
  170. truefoundry/ml/autogen/client/models/search_runs_request_dto.py +2 -2
  171. truefoundry/ml/autogen/client/models/search_runs_response_dto.py +2 -2
  172. truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +2 -2
  173. truefoundry/ml/autogen/client/models/set_tag_request_dto.py +2 -2
  174. truefoundry/ml/autogen/client/models/signed_url_dto.py +2 -2
  175. truefoundry/ml/autogen/client/models/sklearn_framework.py +4 -4
  176. truefoundry/ml/autogen/client/models/sklearn_model_schema.py +7 -5
  177. truefoundry/ml/autogen/client/models/sklearn_serialization_format.py +3 -3
  178. truefoundry/ml/autogen/client/models/source.py +32 -7
  179. truefoundry/ml/autogen/client/models/source1.py +3 -3
  180. truefoundry/ml/autogen/client/models/{internal_metadata.py → source2.py} +52 -55
  181. truefoundry/ml/autogen/client/models/spa_cy_framework.py +3 -3
  182. truefoundry/ml/autogen/client/models/stats_models_framework.py +3 -3
  183. truefoundry/ml/autogen/client/models/stop.py +2 -2
  184. truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +2 -2
  185. truefoundry/ml/autogen/client/models/subject.py +2 -2
  186. truefoundry/ml/autogen/client/models/subject_type.py +2 -2
  187. truefoundry/ml/autogen/client/models/system_message.py +7 -4
  188. truefoundry/ml/autogen/client/models/tensor_flow_framework.py +3 -3
  189. truefoundry/ml/autogen/client/models/text.py +3 -3
  190. truefoundry/ml/autogen/client/models/text_content_part.py +6 -4
  191. truefoundry/ml/autogen/client/models/transformers_framework.py +5 -5
  192. truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +2 -2
  193. truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +2 -2
  194. truefoundry/ml/autogen/client/models/true_foundry_managed_source.py +3 -3
  195. truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +5 -7
  196. truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +13 -3
  197. truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +2 -2
  198. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +2 -2
  199. truefoundry/ml/autogen/client/models/update_run_request_dto.py +2 -2
  200. truefoundry/ml/autogen/client/models/update_run_response_dto.py +2 -2
  201. truefoundry/ml/autogen/client/models/url.py +3 -3
  202. truefoundry/ml/autogen/client/models/user_message.py +8 -5
  203. truefoundry/ml/autogen/client/models/validate_external_storage_root_request_dto.py +2 -2
  204. truefoundry/ml/autogen/client/models/validate_external_storage_root_response_dto.py +2 -2
  205. truefoundry/ml/autogen/client/models/validation_error.py +2 -2
  206. truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +2 -2
  207. truefoundry/ml/autogen/client/models/xg_boost_framework.py +4 -4
  208. truefoundry/ml/autogen/client/models/xg_boost_model_schema.py +7 -5
  209. truefoundry/ml/autogen/client/models/xg_boost_serialization_format.py +3 -3
  210. truefoundry/ml/autogen/client/rest.py +2 -2
  211. truefoundry/ml/autogen/client_README.md +17 -19
  212. truefoundry/ml/autogen/entities/artifacts.py +264 -139
  213. truefoundry/ml/clients/servicefoundry_client.py +5 -8
  214. truefoundry/ml/log_types/artifacts/artifact.py +15 -78
  215. truefoundry/ml/log_types/artifacts/model.py +4 -5
  216. truefoundry/ml/log_types/artifacts/utils.py +18 -2
  217. truefoundry/ml/mlfoundry_api.py +0 -40
  218. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10rc2.dist-info}/METADATA +3 -6
  219. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10rc2.dist-info}/RECORD +221 -215
  220. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10rc2.dist-info}/WHEEL +0 -0
  221. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10rc2.dist-info}/entry_points.txt +0 -0
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ TrueFoundry ML API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+
20
+ from truefoundry.ml.autogen.client.models.artifact_path import ArtifactPath
21
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, conlist, validator
22
+
23
+
24
+ class LocalArtifactSource(BaseModel):
25
+ """
26
+ LocalArtifactSource
27
+ """
28
+
29
+ type: StrictStr = Field(
30
+ default=..., description="+label=Type +usage=Type of the source +value=local"
31
+ )
32
+ paths: conlist(ArtifactPath) = Field(
33
+ default=...,
34
+ description="+label=Paths +usage=Array of ArtifactPath objects representing the source and destination paths",
35
+ )
36
+ __properties = ["type", "paths"]
37
+
38
+ @validator("type")
39
+ def type_validate_enum(cls, value):
40
+ """Validates the enum"""
41
+ if value not in ("local",):
42
+ raise ValueError("must be one of enum values ('local')")
43
+ return value
44
+
45
+ class Config:
46
+ """Pydantic configuration"""
47
+
48
+ allow_population_by_field_name = True
49
+ validate_assignment = True
50
+
51
+ def to_str(self) -> str:
52
+ """Returns the string representation of the model using alias"""
53
+ return pprint.pformat(self.dict(by_alias=True))
54
+
55
+ def to_json(self) -> str:
56
+ """Returns the JSON representation of the model using alias"""
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> LocalArtifactSource:
61
+ """Create an instance of LocalArtifactSource from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self):
65
+ """Returns the dictionary representation of the model using alias"""
66
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
67
+ # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of each item in paths (list)
68
+ _items = []
69
+ if self.paths:
70
+ for _item in self.paths:
71
+ if _item:
72
+ _items.append(_item.to_dict())
73
+ _dict["paths"] = _items
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: dict) -> LocalArtifactSource:
78
+ """Create an instance of LocalArtifactSource from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return LocalArtifactSource.parse_obj(obj)
84
+
85
+ _obj = LocalArtifactSource.parse_obj(
86
+ {
87
+ "type": obj.get("type"),
88
+ "paths": [ArtifactPath.from_dict(_item) for _item in obj.get("paths")]
89
+ if obj.get("paths") is not None
90
+ else None,
91
+ }
92
+ )
93
+ return _obj
@@ -0,0 +1,80 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ TrueFoundry ML API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
21
+
22
+
23
+ class LocalModelSource(BaseModel):
24
+ """
25
+ LocalModelSource
26
+ """
27
+
28
+ type: StrictStr = Field(
29
+ default=..., description="+label=Type +usage=Type of the source +value=local"
30
+ )
31
+ file_or_folder: StrictStr = Field(
32
+ default=...,
33
+ description="+label=Path to the model file or folder +usage=Path to the model file or folder",
34
+ )
35
+ __properties = ["type", "file_or_folder"]
36
+
37
+ @validator("type")
38
+ def type_validate_enum(cls, value):
39
+ """Validates the enum"""
40
+ if value not in ("local",):
41
+ raise ValueError("must be one of enum values ('local')")
42
+ return value
43
+
44
+ class Config:
45
+ """Pydantic configuration"""
46
+
47
+ allow_population_by_field_name = True
48
+ validate_assignment = True
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.dict(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> LocalModelSource:
60
+ """Create an instance of LocalModelSource from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self):
64
+ """Returns the dictionary representation of the model using alias"""
65
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
66
+ return _dict
67
+
68
+ @classmethod
69
+ def from_dict(cls, obj: dict) -> LocalModelSource:
70
+ """Create an instance of LocalModelSource from a dict"""
71
+ if obj is None:
72
+ return None
73
+
74
+ if not isinstance(obj, dict):
75
+ return LocalModelSource.parse_obj(obj)
76
+
77
+ _obj = LocalModelSource.parse_obj(
78
+ {"type": obj.get("type"), "file_or_folder": obj.get("file_or_folder")}
79
+ )
80
+ return _obj
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- FastAPI
4
+ TrueFoundry ML API
5
5
 
6
6
  No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
- The version of the OpenAPI document: 0.1.0
8
+ The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
11
  Do not edit the class manually.
@@ -18,9 +18,14 @@ import pprint
18
18
  import re # noqa: F401
19
19
  from typing import TYPE_CHECKING, Any, List, Optional, Union
20
20
 
21
+ from truefoundry.ml.autogen.client.models.agent_manifest import AgentManifest
22
+ from truefoundry.ml.autogen.client.models.agent_open_api_tool_manifest import (
23
+ AgentOpenAPIToolManifest,
24
+ )
21
25
  from truefoundry.ml.autogen.client.models.artifact_version_manifest import (
22
26
  ArtifactVersionManifest,
23
27
  )
28
+ from truefoundry.ml.autogen.client.models.chat_prompt_manifest import ChatPromptManifest
24
29
  from truefoundry.ml.autogen.client.models.model_version_manifest import (
25
30
  ModelVersionManifest,
26
31
  )
@@ -31,7 +36,13 @@ from truefoundry.pydantic_v1 import (
31
36
  validator,
32
37
  )
33
38
 
34
- MANIFEST_ANY_OF_SCHEMAS = ["ArtifactVersionManifest", "ModelVersionManifest"]
39
+ MANIFEST_ONE_OF_SCHEMAS = [
40
+ "AgentManifest",
41
+ "AgentOpenAPIToolManifest",
42
+ "ArtifactVersionManifest",
43
+ "ChatPromptManifest",
44
+ "ModelVersionManifest",
45
+ ]
35
46
 
36
47
 
37
48
  class Manifest(BaseModel):
@@ -40,18 +51,32 @@ class Manifest(BaseModel):
40
51
  """
41
52
 
42
53
  # data type: ModelVersionManifest
43
- anyof_schema_1_validator: Optional[ModelVersionManifest] = None
54
+ oneof_schema_1_validator: Optional[ModelVersionManifest] = None
55
+ # data type: ChatPromptManifest
56
+ oneof_schema_2_validator: Optional[ChatPromptManifest] = None
57
+ # data type: AgentOpenAPIToolManifest
58
+ oneof_schema_3_validator: Optional[AgentOpenAPIToolManifest] = None
59
+ # data type: AgentManifest
60
+ oneof_schema_4_validator: Optional[AgentManifest] = None
44
61
  # data type: ArtifactVersionManifest
45
- anyof_schema_2_validator: Optional[ArtifactVersionManifest] = None
62
+ oneof_schema_5_validator: Optional[ArtifactVersionManifest] = None
46
63
  if TYPE_CHECKING:
47
- actual_instance: Union[ArtifactVersionManifest, ModelVersionManifest]
64
+ actual_instance: Union[
65
+ AgentManifest,
66
+ AgentOpenAPIToolManifest,
67
+ ArtifactVersionManifest,
68
+ ChatPromptManifest,
69
+ ModelVersionManifest,
70
+ ]
48
71
  else:
49
72
  actual_instance: Any
50
- any_of_schemas: List[str] = Field(MANIFEST_ANY_OF_SCHEMAS, const=True)
73
+ one_of_schemas: List[str] = Field(MANIFEST_ONE_OF_SCHEMAS, const=True)
51
74
 
52
75
  class Config:
53
76
  validate_assignment = True
54
77
 
78
+ discriminator_value_class_map = {}
79
+
55
80
  def __init__(self, *args, **kwargs) -> None:
56
81
  if args:
57
82
  if len(args) > 1:
@@ -67,29 +92,55 @@ class Manifest(BaseModel):
67
92
  super().__init__(**kwargs)
68
93
 
69
94
  @validator("actual_instance")
70
- def actual_instance_must_validate_anyof(cls, v):
95
+ def actual_instance_must_validate_oneof(cls, v):
71
96
  instance = Manifest.construct()
72
97
  error_messages = []
98
+ match = 0
73
99
  # validate data type: ModelVersionManifest
74
100
  if not isinstance(v, ModelVersionManifest):
75
101
  error_messages.append(
76
102
  f"Error! Input type `{type(v)}` is not `ModelVersionManifest`"
77
103
  )
78
104
  else:
79
- return v
80
-
105
+ match += 1
106
+ # validate data type: ChatPromptManifest
107
+ if not isinstance(v, ChatPromptManifest):
108
+ error_messages.append(
109
+ f"Error! Input type `{type(v)}` is not `ChatPromptManifest`"
110
+ )
111
+ else:
112
+ match += 1
113
+ # validate data type: AgentOpenAPIToolManifest
114
+ if not isinstance(v, AgentOpenAPIToolManifest):
115
+ error_messages.append(
116
+ f"Error! Input type `{type(v)}` is not `AgentOpenAPIToolManifest`"
117
+ )
118
+ else:
119
+ match += 1
120
+ # validate data type: AgentManifest
121
+ if not isinstance(v, AgentManifest):
122
+ error_messages.append(
123
+ f"Error! Input type `{type(v)}` is not `AgentManifest`"
124
+ )
125
+ else:
126
+ match += 1
81
127
  # validate data type: ArtifactVersionManifest
82
128
  if not isinstance(v, ArtifactVersionManifest):
83
129
  error_messages.append(
84
130
  f"Error! Input type `{type(v)}` is not `ArtifactVersionManifest`"
85
131
  )
86
132
  else:
87
- return v
88
-
89
- if error_messages:
133
+ match += 1
134
+ if match > 1:
135
+ # more than 1 match
136
+ raise ValueError(
137
+ "Multiple matches found when setting `actual_instance` in Manifest with oneOf schemas: AgentManifest, AgentOpenAPIToolManifest, ArtifactVersionManifest, ChatPromptManifest, ModelVersionManifest. Details: "
138
+ + ", ".join(error_messages)
139
+ )
140
+ elif match == 0:
90
141
  # no match
91
142
  raise ValueError(
92
- "No match found when setting the actual_instance in Manifest with anyOf schemas: ArtifactVersionManifest, ModelVersionManifest. Details: "
143
+ "No match found when setting `actual_instance` in Manifest with oneOf schemas: AgentManifest, AgentOpenAPIToolManifest, ArtifactVersionManifest, ChatPromptManifest, ModelVersionManifest. Details: "
93
144
  + ", ".join(error_messages)
94
145
  )
95
146
  else:
@@ -104,23 +155,49 @@ class Manifest(BaseModel):
104
155
  """Returns the object represented by the json string"""
105
156
  instance = Manifest.construct()
106
157
  error_messages = []
107
- # anyof_schema_1_validator: Optional[ModelVersionManifest] = None
158
+ match = 0
159
+
160
+ # deserialize data into ModelVersionManifest
108
161
  try:
109
162
  instance.actual_instance = ModelVersionManifest.from_json(json_str)
110
- return instance
163
+ match += 1
164
+ except (ValidationError, ValueError) as e:
165
+ error_messages.append(str(e))
166
+ # deserialize data into ChatPromptManifest
167
+ try:
168
+ instance.actual_instance = ChatPromptManifest.from_json(json_str)
169
+ match += 1
170
+ except (ValidationError, ValueError) as e:
171
+ error_messages.append(str(e))
172
+ # deserialize data into AgentOpenAPIToolManifest
173
+ try:
174
+ instance.actual_instance = AgentOpenAPIToolManifest.from_json(json_str)
175
+ match += 1
176
+ except (ValidationError, ValueError) as e:
177
+ error_messages.append(str(e))
178
+ # deserialize data into AgentManifest
179
+ try:
180
+ instance.actual_instance = AgentManifest.from_json(json_str)
181
+ match += 1
111
182
  except (ValidationError, ValueError) as e:
112
183
  error_messages.append(str(e))
113
- # anyof_schema_2_validator: Optional[ArtifactVersionManifest] = None
184
+ # deserialize data into ArtifactVersionManifest
114
185
  try:
115
186
  instance.actual_instance = ArtifactVersionManifest.from_json(json_str)
116
- return instance
187
+ match += 1
117
188
  except (ValidationError, ValueError) as e:
118
189
  error_messages.append(str(e))
119
190
 
120
- if error_messages:
191
+ if match > 1:
192
+ # more than 1 match
193
+ raise ValueError(
194
+ "Multiple matches found when deserializing the JSON string into Manifest with oneOf schemas: AgentManifest, AgentOpenAPIToolManifest, ArtifactVersionManifest, ChatPromptManifest, ModelVersionManifest. Details: "
195
+ + ", ".join(error_messages)
196
+ )
197
+ elif match == 0:
121
198
  # no match
122
199
  raise ValueError(
123
- "No match found when deserializing the JSON string into Manifest with anyOf schemas: ArtifactVersionManifest, ModelVersionManifest. Details: "
200
+ "No match found when deserializing the JSON string into Manifest with oneOf schemas: AgentManifest, AgentOpenAPIToolManifest, ArtifactVersionManifest, ChatPromptManifest, ModelVersionManifest. Details: "
124
201
  + ", ".join(error_messages)
125
202
  )
126
203
  else:
@@ -140,10 +217,10 @@ class Manifest(BaseModel):
140
217
  def to_dict(self) -> dict:
141
218
  """Returns the dict representation of the actual instance"""
142
219
  if self.actual_instance is None:
143
- return "null"
220
+ return None
144
221
 
145
- to_json = getattr(self.actual_instance, "to_json", None)
146
- if callable(to_json):
222
+ to_dict = getattr(self.actual_instance, "to_dict", None)
223
+ if callable(to_dict):
147
224
  return self.actual_instance.to_dict()
148
225
  else:
149
226
  # primitive type