truefoundry 0.5.9__py3-none-any.whl → 0.5.10__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 (223) hide show
  1. truefoundry/cli/display_util.py +1 -1
  2. truefoundry/common/utils.py +9 -0
  3. truefoundry/deploy/auto_gen/models.py +1 -1
  4. truefoundry/deploy/io/output_callback.py +13 -6
  5. truefoundry/deploy/io/rich_output_callback.py +8 -4
  6. truefoundry/deploy/lib/clients/servicefoundry_client.py +115 -136
  7. truefoundry/deploy/lib/dao/apply.py +2 -2
  8. truefoundry/deploy/lib/dao/delete.py +2 -2
  9. truefoundry/deploy/lib/model/entity.py +37 -24
  10. truefoundry/ml/autogen/client/__init__.py +22 -14
  11. truefoundry/ml/autogen/client/api/auth_api.py +2 -2
  12. truefoundry/ml/autogen/client/api/deprecated_api.py +5 -338
  13. truefoundry/ml/autogen/client/api/experiments_api.py +77 -32
  14. truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +2 -2
  15. truefoundry/ml/autogen/client/api/health_api.py +2 -2
  16. truefoundry/ml/autogen/client/api/metrics_api.py +4 -4
  17. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +530 -140
  18. truefoundry/ml/autogen/client/api/run_artifacts_api.py +10 -5
  19. truefoundry/ml/autogen/client/api/runs_api.py +20 -20
  20. truefoundry/ml/autogen/client/api_client.py +2 -2
  21. truefoundry/ml/autogen/client/configuration.py +29 -57
  22. truefoundry/ml/autogen/client/exceptions.py +2 -2
  23. truefoundry/ml/autogen/client/models/__init__.py +22 -14
  24. truefoundry/ml/autogen/client/models/agent_app.py +13 -5
  25. truefoundry/ml/autogen/client/models/{agent.py → agent_manifest.py} +39 -30
  26. truefoundry/ml/autogen/client/models/{agent_open_api_tool.py → agent_open_api_tool_manifest.py} +50 -31
  27. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +47 -26
  28. truefoundry/ml/autogen/client/models/agent_with_fqn.py +36 -25
  29. truefoundry/ml/autogen/client/models/{add_custom_metrics_to_model_version_request_dto.py → apply_request_dto.py} +23 -17
  30. truefoundry/ml/autogen/client/models/apply_response_dto.py +79 -0
  31. truefoundry/ml/autogen/client/models/artifact_dto.py +2 -2
  32. truefoundry/ml/autogen/client/models/{add_features_to_model_version_request_dto.py → artifact_path.py} +20 -17
  33. truefoundry/ml/autogen/client/models/artifact_response_dto.py +2 -2
  34. truefoundry/ml/autogen/client/models/artifact_type.py +3 -3
  35. truefoundry/ml/autogen/client/models/artifact_version_dto.py +7 -15
  36. truefoundry/ml/autogen/client/models/artifact_version_manifest.py +32 -19
  37. truefoundry/ml/autogen/client/models/artifact_version_response_dto.py +2 -2
  38. truefoundry/ml/autogen/client/models/artifact_version_serialization_format.py +2 -2
  39. truefoundry/ml/autogen/client/models/artifact_version_status.py +2 -2
  40. truefoundry/ml/autogen/client/models/assistant_message.py +9 -5
  41. truefoundry/ml/autogen/client/models/authorize_user_for_model_request_dto.py +2 -2
  42. truefoundry/ml/autogen/client/models/authorize_user_for_model_version_request_dto.py +2 -2
  43. truefoundry/ml/autogen/client/models/blob_storage_reference.py +4 -4
  44. truefoundry/ml/autogen/client/models/body_get_search_runs_get.py +2 -2
  45. truefoundry/ml/autogen/client/models/{chat_prompt.py → chat_prompt_manifest.py} +39 -32
  46. truefoundry/ml/autogen/client/models/{chat_prompt_messages_inner.py → chat_prompt_manifest_messages_inner.py} +12 -12
  47. truefoundry/ml/autogen/client/models/columns_dto.py +2 -2
  48. truefoundry/ml/autogen/client/models/command.py +2 -2
  49. truefoundry/ml/autogen/client/models/content.py +3 -3
  50. truefoundry/ml/autogen/client/models/content1.py +3 -3
  51. truefoundry/ml/autogen/client/models/content2.py +3 -3
  52. truefoundry/ml/autogen/client/models/content2_any_of_inner.py +2 -2
  53. truefoundry/ml/autogen/client/models/create_artifact_request_dto.py +2 -2
  54. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +2 -2
  55. truefoundry/ml/autogen/client/models/create_artifact_version_request_dto.py +2 -2
  56. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +2 -2
  57. truefoundry/ml/autogen/client/models/create_dataset_request_dto.py +21 -5
  58. truefoundry/ml/autogen/client/models/create_experiment_request_dto.py +2 -2
  59. truefoundry/ml/autogen/client/models/create_experiment_response_dto.py +2 -2
  60. truefoundry/ml/autogen/client/models/create_model_version_request_dto.py +4 -12
  61. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_request_dto.py +2 -2
  62. truefoundry/ml/autogen/client/models/create_multi_part_upload_for_dataset_response_dto.py +2 -2
  63. truefoundry/ml/autogen/client/models/create_multi_part_upload_request_dto.py +2 -2
  64. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +2 -2
  65. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +2 -2
  66. truefoundry/ml/autogen/client/models/create_run_request_dto.py +2 -2
  67. truefoundry/ml/autogen/client/models/create_run_response_dto.py +2 -2
  68. truefoundry/ml/autogen/client/models/create_workflow_task_config_request_dto.py +2 -2
  69. truefoundry/ml/autogen/client/models/data_directory_manifest.py +126 -0
  70. truefoundry/ml/autogen/client/models/dataset_dto.py +13 -2
  71. truefoundry/ml/autogen/client/models/dataset_response_dto.py +2 -2
  72. truefoundry/ml/autogen/client/models/delete_artifact_versions_request_dto.py +2 -2
  73. truefoundry/ml/autogen/client/models/delete_dataset_request_dto.py +2 -2
  74. truefoundry/ml/autogen/client/models/delete_files_for_dataset_request_dto.py +2 -2
  75. truefoundry/ml/autogen/client/models/delete_model_version_request_dto.py +2 -2
  76. truefoundry/ml/autogen/client/models/delete_run_request.py +2 -2
  77. truefoundry/ml/autogen/client/models/delete_tag_request_dto.py +2 -2
  78. truefoundry/ml/autogen/client/models/experiment_dto.py +3 -3
  79. truefoundry/ml/autogen/client/models/experiment_id_request_dto.py +2 -2
  80. truefoundry/ml/autogen/client/models/experiment_response_dto.py +2 -2
  81. truefoundry/ml/autogen/client/models/experiment_tag_dto.py +2 -2
  82. truefoundry/ml/autogen/client/models/export_deployment_files_request_dto.py +2 -2
  83. truefoundry/ml/autogen/client/models/external_blob_storage_source.py +5 -4
  84. truefoundry/ml/autogen/client/models/fast_ai_framework.py +3 -3
  85. truefoundry/ml/autogen/client/models/file_info_dto.py +2 -2
  86. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +7 -15
  87. truefoundry/ml/autogen/client/models/framework.py +3 -3
  88. truefoundry/ml/autogen/client/models/get_artifact_version_aliases_response_dto.py +2 -2
  89. truefoundry/ml/autogen/client/models/get_experiment_response_dto.py +2 -2
  90. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +2 -2
  91. truefoundry/ml/autogen/client/models/get_metric_history_response.py +2 -2
  92. truefoundry/ml/autogen/client/models/get_signed_url_for_dataset_write_request_dto.py +2 -2
  93. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_request_dto.py +2 -2
  94. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_read_response_dto.py +2 -2
  95. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_request_dto.py +2 -2
  96. truefoundry/ml/autogen/client/models/get_signed_urls_for_artifact_version_write_response_dto.py +2 -2
  97. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_request_dto.py +2 -2
  98. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_read_response_dto.py +2 -2
  99. truefoundry/ml/autogen/client/models/get_signed_urls_for_dataset_write_response_dto.py +2 -2
  100. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +2 -2
  101. truefoundry/ml/autogen/client/models/gluon_framework.py +3 -3
  102. truefoundry/ml/autogen/client/models/h2_o_framework.py +3 -3
  103. truefoundry/ml/autogen/client/models/http_validation_error.py +2 -2
  104. truefoundry/ml/autogen/client/models/image_content_part.py +7 -5
  105. truefoundry/ml/autogen/client/models/image_url.py +3 -3
  106. truefoundry/ml/autogen/client/models/infer_method_name.py +2 -2
  107. truefoundry/ml/autogen/client/models/keras_framework.py +3 -3
  108. truefoundry/ml/autogen/client/models/latest_run_log_dto.py +2 -2
  109. truefoundry/ml/autogen/client/models/library_name.py +2 -2
  110. truefoundry/ml/autogen/client/models/light_gbm_framework.py +3 -3
  111. truefoundry/ml/autogen/client/models/list_artifact_versions_request_dto.py +2 -2
  112. truefoundry/ml/autogen/client/models/list_artifact_versions_response_dto.py +2 -2
  113. truefoundry/ml/autogen/client/models/list_artifacts_request_dto.py +2 -2
  114. truefoundry/ml/autogen/client/models/list_artifacts_response_dto.py +2 -2
  115. truefoundry/ml/autogen/client/models/list_colums_response_dto.py +2 -2
  116. truefoundry/ml/autogen/client/models/list_datasets_request_dto.py +2 -2
  117. truefoundry/ml/autogen/client/models/list_datasets_response_dto.py +2 -2
  118. truefoundry/ml/autogen/client/models/list_experiments_response_dto.py +2 -2
  119. truefoundry/ml/autogen/client/models/list_files_for_artifact_version_request_dto.py +2 -2
  120. truefoundry/ml/autogen/client/models/list_files_for_artifact_versions_response_dto.py +2 -2
  121. truefoundry/ml/autogen/client/models/list_files_for_dataset_request_dto.py +2 -2
  122. truefoundry/ml/autogen/client/models/list_files_for_dataset_response_dto.py +2 -2
  123. truefoundry/ml/autogen/client/models/list_latest_run_logs_response_dto.py +2 -2
  124. truefoundry/ml/autogen/client/models/list_metric_history_request_dto.py +2 -2
  125. truefoundry/ml/autogen/client/models/list_metric_history_response_dto.py +2 -2
  126. truefoundry/ml/autogen/client/models/list_model_version_response_dto.py +2 -2
  127. truefoundry/ml/autogen/client/models/list_model_versions_request_dto.py +2 -2
  128. truefoundry/ml/autogen/client/models/list_models_request_dto.py +2 -2
  129. truefoundry/ml/autogen/client/models/list_models_response_dto.py +2 -2
  130. truefoundry/ml/autogen/client/models/list_run_artifacts_response_dto.py +2 -2
  131. truefoundry/ml/autogen/client/models/list_run_logs_response_dto.py +2 -2
  132. truefoundry/ml/autogen/client/models/local_artifact_source.py +93 -0
  133. truefoundry/ml/autogen/client/models/local_model_source.py +80 -0
  134. truefoundry/ml/autogen/client/models/log_batch_request_dto.py +2 -2
  135. truefoundry/ml/autogen/client/models/log_metric_request_dto.py +2 -2
  136. truefoundry/ml/autogen/client/models/log_param_request_dto.py +2 -2
  137. truefoundry/ml/autogen/client/models/manifest.py +100 -23
  138. truefoundry/ml/autogen/client/models/manifest1.py +219 -0
  139. truefoundry/ml/autogen/client/models/manifest2.py +198 -0
  140. truefoundry/ml/autogen/client/models/method.py +3 -3
  141. truefoundry/ml/autogen/client/models/metric_collection_dto.py +2 -2
  142. truefoundry/ml/autogen/client/models/metric_dto.py +2 -2
  143. truefoundry/ml/autogen/client/models/mime_type.py +2 -2
  144. truefoundry/ml/autogen/client/models/model_configuration.py +7 -7
  145. truefoundry/ml/autogen/client/models/model_dto.py +2 -2
  146. truefoundry/ml/autogen/client/models/model_response_dto.py +2 -2
  147. truefoundry/ml/autogen/client/models/model_server.py +2 -2
  148. truefoundry/ml/autogen/client/models/model_version_dto.py +2 -2
  149. truefoundry/ml/autogen/client/models/model_version_environment.py +5 -5
  150. truefoundry/ml/autogen/client/models/model_version_manifest.py +35 -22
  151. truefoundry/ml/autogen/client/models/model_version_response_dto.py +2 -2
  152. truefoundry/ml/autogen/client/models/multi_part_upload_dto.py +2 -2
  153. truefoundry/ml/autogen/client/models/multi_part_upload_response_dto.py +2 -2
  154. truefoundry/ml/autogen/client/models/multi_part_upload_storage_provider.py +2 -2
  155. truefoundry/ml/autogen/client/models/notify_artifact_version_failure_dto.py +2 -2
  156. truefoundry/ml/autogen/client/models/onnx_framework.py +3 -3
  157. truefoundry/ml/autogen/client/models/openapi_spec.py +3 -3
  158. truefoundry/ml/autogen/client/models/paddle_framework.py +3 -3
  159. truefoundry/ml/autogen/client/models/param_dto.py +2 -2
  160. truefoundry/ml/autogen/client/models/parameters.py +3 -3
  161. truefoundry/ml/autogen/client/models/py_torch_framework.py +3 -3
  162. truefoundry/ml/autogen/client/models/resolve_agent_app_response_dto.py +2 -2
  163. truefoundry/ml/autogen/client/models/restore_run_request_dto.py +2 -2
  164. truefoundry/ml/autogen/client/models/run_data_dto.py +2 -2
  165. truefoundry/ml/autogen/client/models/run_dto.py +2 -2
  166. truefoundry/ml/autogen/client/models/run_info_dto.py +2 -2
  167. truefoundry/ml/autogen/client/models/run_log_dto.py +2 -2
  168. truefoundry/ml/autogen/client/models/run_log_input_dto.py +2 -2
  169. truefoundry/ml/autogen/client/models/run_response_dto.py +2 -2
  170. truefoundry/ml/autogen/client/models/run_tag_dto.py +2 -2
  171. truefoundry/ml/autogen/client/models/search_runs_request_dto.py +2 -2
  172. truefoundry/ml/autogen/client/models/search_runs_response_dto.py +2 -2
  173. truefoundry/ml/autogen/client/models/set_experiment_tag_request_dto.py +2 -2
  174. truefoundry/ml/autogen/client/models/set_tag_request_dto.py +2 -2
  175. truefoundry/ml/autogen/client/models/signed_url_dto.py +3 -4
  176. truefoundry/ml/autogen/client/models/sklearn_framework.py +4 -4
  177. truefoundry/ml/autogen/client/models/sklearn_model_schema.py +7 -5
  178. truefoundry/ml/autogen/client/models/sklearn_serialization_format.py +3 -3
  179. truefoundry/ml/autogen/client/models/source.py +32 -7
  180. truefoundry/ml/autogen/client/models/source1.py +3 -3
  181. truefoundry/ml/autogen/client/models/{internal_metadata.py → source2.py} +52 -55
  182. truefoundry/ml/autogen/client/models/spa_cy_framework.py +3 -3
  183. truefoundry/ml/autogen/client/models/stats_models_framework.py +3 -3
  184. truefoundry/ml/autogen/client/models/stop.py +2 -2
  185. truefoundry/ml/autogen/client/models/store_run_logs_request_dto.py +2 -2
  186. truefoundry/ml/autogen/client/models/subject.py +2 -2
  187. truefoundry/ml/autogen/client/models/subject_type.py +2 -2
  188. truefoundry/ml/autogen/client/models/system_message.py +7 -4
  189. truefoundry/ml/autogen/client/models/tensor_flow_framework.py +3 -3
  190. truefoundry/ml/autogen/client/models/text.py +3 -3
  191. truefoundry/ml/autogen/client/models/text_content_part.py +6 -4
  192. truefoundry/ml/autogen/client/models/transformers_framework.py +5 -5
  193. truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +2 -2
  194. truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +2 -2
  195. truefoundry/ml/autogen/client/models/true_foundry_managed_source.py +3 -3
  196. truefoundry/ml/autogen/client/models/update_artifact_version_request_dto.py +5 -7
  197. truefoundry/ml/autogen/client/models/update_dataset_request_dto.py +13 -3
  198. truefoundry/ml/autogen/client/models/update_experiment_request_dto.py +2 -2
  199. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +2 -2
  200. truefoundry/ml/autogen/client/models/update_run_request_dto.py +2 -2
  201. truefoundry/ml/autogen/client/models/update_run_response_dto.py +2 -2
  202. truefoundry/ml/autogen/client/models/url.py +3 -3
  203. truefoundry/ml/autogen/client/models/user_message.py +8 -5
  204. truefoundry/ml/autogen/client/models/validate_external_storage_root_request_dto.py +2 -2
  205. truefoundry/ml/autogen/client/models/validate_external_storage_root_response_dto.py +2 -2
  206. truefoundry/ml/autogen/client/models/validation_error.py +2 -2
  207. truefoundry/ml/autogen/client/models/validation_error_loc_inner.py +2 -2
  208. truefoundry/ml/autogen/client/models/xg_boost_framework.py +4 -4
  209. truefoundry/ml/autogen/client/models/xg_boost_model_schema.py +7 -5
  210. truefoundry/ml/autogen/client/models/xg_boost_serialization_format.py +3 -3
  211. truefoundry/ml/autogen/client/rest.py +2 -2
  212. truefoundry/ml/autogen/client_README.md +17 -19
  213. truefoundry/ml/autogen/entities/artifacts.py +266 -141
  214. truefoundry/ml/clients/servicefoundry_client.py +9 -8
  215. truefoundry/ml/log_types/artifacts/artifact.py +15 -78
  216. truefoundry/ml/log_types/artifacts/model.py +4 -5
  217. truefoundry/ml/log_types/artifacts/utils.py +18 -2
  218. truefoundry/ml/mlfoundry_api.py +0 -40
  219. truefoundry/ml/session.py +6 -3
  220. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10.dist-info}/METADATA +3 -6
  221. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10.dist-info}/RECORD +223 -217
  222. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10.dist-info}/WHEEL +0 -0
  223. {truefoundry-0.5.9.dist-info → truefoundry-0.5.10.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.
@@ -19,7 +19,7 @@ from aenum import Enum
19
19
 
20
20
  class SklearnSerializationFormat(str, Enum):
21
21
  """
22
- +label=Serialization format +usage=Serialization format used for sklearn models
22
+ +label=Scikit Learn Serialization Format +usage=Serialization format used to save the sklearn model
23
23
  """
24
24
 
25
25
  """
@@ -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.
@@ -21,6 +21,9 @@ from typing import TYPE_CHECKING, Any, List, Optional, Union
21
21
  from truefoundry.ml.autogen.client.models.external_blob_storage_source import (
22
22
  ExternalBlobStorageSource,
23
23
  )
24
+ from truefoundry.ml.autogen.client.models.local_artifact_source import (
25
+ LocalArtifactSource,
26
+ )
24
27
  from truefoundry.ml.autogen.client.models.true_foundry_managed_source import (
25
28
  TrueFoundryManagedSource,
26
29
  )
@@ -31,20 +34,28 @@ from truefoundry.pydantic_v1 import (
31
34
  validator,
32
35
  )
33
36
 
34
- SOURCE_ANY_OF_SCHEMAS = ["ExternalBlobStorageSource", "TrueFoundryManagedSource"]
37
+ SOURCE_ANY_OF_SCHEMAS = [
38
+ "ExternalBlobStorageSource",
39
+ "LocalArtifactSource",
40
+ "TrueFoundryManagedSource",
41
+ ]
35
42
 
36
43
 
37
44
  class Source(BaseModel):
38
45
  """
39
- +label=Artifact Source +usage=Source for the Artifact version +uiType=Group
46
+ +label=Artifact Source +uiType=Group
40
47
  """
41
48
 
42
49
  # data type: TrueFoundryManagedSource
43
50
  anyof_schema_1_validator: Optional[TrueFoundryManagedSource] = None
44
51
  # data type: ExternalBlobStorageSource
45
52
  anyof_schema_2_validator: Optional[ExternalBlobStorageSource] = None
53
+ # data type: LocalArtifactSource
54
+ anyof_schema_3_validator: Optional[LocalArtifactSource] = None
46
55
  if TYPE_CHECKING:
47
- actual_instance: Union[ExternalBlobStorageSource, TrueFoundryManagedSource]
56
+ actual_instance: Union[
57
+ ExternalBlobStorageSource, LocalArtifactSource, TrueFoundryManagedSource
58
+ ]
48
59
  else:
49
60
  actual_instance: Any
50
61
  any_of_schemas: List[str] = Field(SOURCE_ANY_OF_SCHEMAS, const=True)
@@ -86,10 +97,18 @@ class Source(BaseModel):
86
97
  else:
87
98
  return v
88
99
 
100
+ # validate data type: LocalArtifactSource
101
+ if not isinstance(v, LocalArtifactSource):
102
+ error_messages.append(
103
+ f"Error! Input type `{type(v)}` is not `LocalArtifactSource`"
104
+ )
105
+ else:
106
+ return v
107
+
89
108
  if error_messages:
90
109
  # no match
91
110
  raise ValueError(
92
- "No match found when setting the actual_instance in Source with anyOf schemas: ExternalBlobStorageSource, TrueFoundryManagedSource. Details: "
111
+ "No match found when setting the actual_instance in Source with anyOf schemas: ExternalBlobStorageSource, LocalArtifactSource, TrueFoundryManagedSource. Details: "
93
112
  + ", ".join(error_messages)
94
113
  )
95
114
  else:
@@ -116,11 +135,17 @@ class Source(BaseModel):
116
135
  return instance
117
136
  except (ValidationError, ValueError) as e:
118
137
  error_messages.append(str(e))
138
+ # anyof_schema_3_validator: Optional[LocalArtifactSource] = None
139
+ try:
140
+ instance.actual_instance = LocalArtifactSource.from_json(json_str)
141
+ return instance
142
+ except (ValidationError, ValueError) as e:
143
+ error_messages.append(str(e))
119
144
 
120
145
  if error_messages:
121
146
  # no match
122
147
  raise ValueError(
123
- "No match found when deserializing the JSON string into Source with anyOf schemas: ExternalBlobStorageSource, TrueFoundryManagedSource. Details: "
148
+ "No match found when deserializing the JSON string into Source with anyOf schemas: ExternalBlobStorageSource, LocalArtifactSource, TrueFoundryManagedSource. Details: "
124
149
  + ", ".join(error_messages)
125
150
  )
126
151
  else:
@@ -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.
@@ -36,7 +36,7 @@ SOURCE1_ANY_OF_SCHEMAS = ["ExternalBlobStorageSource", "TrueFoundryManagedSource
36
36
 
37
37
  class Source1(BaseModel):
38
38
  """
39
- +label=Model Source +usage=Source for the model version +uiType=Group
39
+ +label=Data Directory Source +uiType=Group
40
40
  """
41
41
 
42
42
  # data type: TrueFoundryManagedSource
@@ -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.
@@ -16,11 +16,15 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
19
+ from typing import TYPE_CHECKING, Any, List, Optional, Union
20
20
 
21
- from truefoundry.ml.autogen.client.models.agent import Agent
22
- from truefoundry.ml.autogen.client.models.agent_open_api_tool import AgentOpenAPITool
23
- from truefoundry.ml.autogen.client.models.chat_prompt import ChatPrompt
21
+ from truefoundry.ml.autogen.client.models.external_blob_storage_source import (
22
+ ExternalBlobStorageSource,
23
+ )
24
+ from truefoundry.ml.autogen.client.models.local_model_source import LocalModelSource
25
+ from truefoundry.ml.autogen.client.models.true_foundry_managed_source import (
26
+ TrueFoundryManagedSource,
27
+ )
24
28
  from truefoundry.pydantic_v1 import (
25
29
  BaseModel,
26
30
  Field,
@@ -28,27 +32,31 @@ from truefoundry.pydantic_v1 import (
28
32
  validator,
29
33
  )
30
34
 
31
- INTERNALMETADATA_ANY_OF_SCHEMAS = ["Agent", "AgentOpenAPITool", "ChatPrompt", "object"]
35
+ SOURCE2_ANY_OF_SCHEMAS = [
36
+ "ExternalBlobStorageSource",
37
+ "LocalModelSource",
38
+ "TrueFoundryManagedSource",
39
+ ]
32
40
 
33
41
 
34
- class InternalMetadata(BaseModel):
42
+ class Source2(BaseModel):
35
43
  """
36
- InternalMetadata
44
+ +label=Model Source +uiType=Group
37
45
  """
38
46
 
39
- # data type: ChatPrompt
40
- anyof_schema_1_validator: Optional[ChatPrompt] = None
41
- # data type: AgentOpenAPITool
42
- anyof_schema_2_validator: Optional[AgentOpenAPITool] = None
43
- # data type: Agent
44
- anyof_schema_3_validator: Optional[Agent] = None
45
- # data type: object
46
- anyof_schema_4_validator: Optional[Dict[str, Any]] = None
47
+ # data type: TrueFoundryManagedSource
48
+ anyof_schema_1_validator: Optional[TrueFoundryManagedSource] = None
49
+ # data type: ExternalBlobStorageSource
50
+ anyof_schema_2_validator: Optional[ExternalBlobStorageSource] = None
51
+ # data type: LocalModelSource
52
+ anyof_schema_3_validator: Optional[LocalModelSource] = None
47
53
  if TYPE_CHECKING:
48
- actual_instance: Union[Agent, AgentOpenAPITool, ChatPrompt, object]
54
+ actual_instance: Union[
55
+ ExternalBlobStorageSource, LocalModelSource, TrueFoundryManagedSource
56
+ ]
49
57
  else:
50
58
  actual_instance: Any
51
- any_of_schemas: List[str] = Field(INTERNALMETADATA_ANY_OF_SCHEMAS, const=True)
59
+ any_of_schemas: List[str] = Field(SOURCE2_ANY_OF_SCHEMAS, const=True)
52
60
 
53
61
  class Config:
54
62
  validate_assignment = True
@@ -69,76 +77,65 @@ class InternalMetadata(BaseModel):
69
77
 
70
78
  @validator("actual_instance")
71
79
  def actual_instance_must_validate_anyof(cls, v):
72
- instance = InternalMetadata.construct()
80
+ instance = Source2.construct()
73
81
  error_messages = []
74
- # validate data type: ChatPrompt
75
- if not isinstance(v, ChatPrompt):
76
- error_messages.append(f"Error! Input type `{type(v)}` is not `ChatPrompt`")
82
+ # validate data type: TrueFoundryManagedSource
83
+ if not isinstance(v, TrueFoundryManagedSource):
84
+ error_messages.append(
85
+ f"Error! Input type `{type(v)}` is not `TrueFoundryManagedSource`"
86
+ )
77
87
  else:
78
88
  return v
79
89
 
80
- # validate data type: AgentOpenAPITool
81
- if not isinstance(v, AgentOpenAPITool):
90
+ # validate data type: ExternalBlobStorageSource
91
+ if not isinstance(v, ExternalBlobStorageSource):
82
92
  error_messages.append(
83
- f"Error! Input type `{type(v)}` is not `AgentOpenAPITool`"
93
+ f"Error! Input type `{type(v)}` is not `ExternalBlobStorageSource`"
84
94
  )
85
95
  else:
86
96
  return v
87
97
 
88
- # validate data type: Agent
89
- if not isinstance(v, Agent):
90
- error_messages.append(f"Error! Input type `{type(v)}` is not `Agent`")
98
+ # validate data type: LocalModelSource
99
+ if not isinstance(v, LocalModelSource):
100
+ error_messages.append(
101
+ f"Error! Input type `{type(v)}` is not `LocalModelSource`"
102
+ )
91
103
  else:
92
104
  return v
93
105
 
94
- # validate data type: object
95
- try:
96
- instance.anyof_schema_4_validator = v
97
- return v
98
- except (ValidationError, ValueError) as e:
99
- error_messages.append(str(e))
100
106
  if error_messages:
101
107
  # no match
102
108
  raise ValueError(
103
- "No match found when setting the actual_instance in InternalMetadata with anyOf schemas: Agent, AgentOpenAPITool, ChatPrompt, object. Details: "
109
+ "No match found when setting the actual_instance in Source2 with anyOf schemas: ExternalBlobStorageSource, LocalModelSource, TrueFoundryManagedSource. Details: "
104
110
  + ", ".join(error_messages)
105
111
  )
106
112
  else:
107
113
  return v
108
114
 
109
115
  @classmethod
110
- def from_dict(cls, obj: dict) -> InternalMetadata:
116
+ def from_dict(cls, obj: dict) -> Source2:
111
117
  return cls.from_json(json.dumps(obj))
112
118
 
113
119
  @classmethod
114
- def from_json(cls, json_str: str) -> InternalMetadata:
120
+ def from_json(cls, json_str: str) -> Source2:
115
121
  """Returns the object represented by the json string"""
116
- instance = InternalMetadata.construct()
122
+ instance = Source2.construct()
117
123
  error_messages = []
118
- # anyof_schema_1_validator: Optional[ChatPrompt] = None
119
- try:
120
- instance.actual_instance = ChatPrompt.from_json(json_str)
121
- return instance
122
- except (ValidationError, ValueError) as e:
123
- error_messages.append(str(e))
124
- # anyof_schema_2_validator: Optional[AgentOpenAPITool] = None
124
+ # anyof_schema_1_validator: Optional[TrueFoundryManagedSource] = None
125
125
  try:
126
- instance.actual_instance = AgentOpenAPITool.from_json(json_str)
126
+ instance.actual_instance = TrueFoundryManagedSource.from_json(json_str)
127
127
  return instance
128
128
  except (ValidationError, ValueError) as e:
129
129
  error_messages.append(str(e))
130
- # anyof_schema_3_validator: Optional[Agent] = None
130
+ # anyof_schema_2_validator: Optional[ExternalBlobStorageSource] = None
131
131
  try:
132
- instance.actual_instance = Agent.from_json(json_str)
132
+ instance.actual_instance = ExternalBlobStorageSource.from_json(json_str)
133
133
  return instance
134
134
  except (ValidationError, ValueError) as e:
135
135
  error_messages.append(str(e))
136
- # deserialize data into object
136
+ # anyof_schema_3_validator: Optional[LocalModelSource] = None
137
137
  try:
138
- # validation
139
- instance.anyof_schema_4_validator = json.loads(json_str)
140
- # assign value to actual_instance
141
- instance.actual_instance = instance.anyof_schema_4_validator
138
+ instance.actual_instance = LocalModelSource.from_json(json_str)
142
139
  return instance
143
140
  except (ValidationError, ValueError) as e:
144
141
  error_messages.append(str(e))
@@ -146,7 +143,7 @@ class InternalMetadata(BaseModel):
146
143
  if error_messages:
147
144
  # no match
148
145
  raise ValueError(
149
- "No match found when deserializing the JSON string into InternalMetadata with anyOf schemas: Agent, AgentOpenAPITool, ChatPrompt, object. Details: "
146
+ "No match found when deserializing the JSON string into Source2 with anyOf schemas: ExternalBlobStorageSource, LocalModelSource, TrueFoundryManagedSource. Details: "
150
147
  + ", ".join(error_messages)
151
148
  )
152
149
  else:
@@ -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.
@@ -22,7 +22,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
22
22
 
23
23
  class SpaCyFramework(BaseModel):
24
24
  """
25
- +docs=spaCy framework for the model version +label=SpaCy # noqa: E501
25
+ +label=SpaCy +icon=spacy # noqa: E501
26
26
  """
27
27
 
28
28
  type: StrictStr = Field(
@@ -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.
@@ -22,7 +22,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
22
22
 
23
23
  class StatsModelsFramework(BaseModel):
24
24
  """
25
- +docs=StatsModels framework for the model version +label=StatsModels # noqa: E501
25
+ +label=StatsModels +icon=statsmodel # noqa: E501
26
26
  """
27
27
 
28
28
  type: StrictStr = Field(
@@ -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.
@@ -24,10 +24,13 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
24
24
 
25
25
  class SystemMessage(BaseModel):
26
26
  """
27
- +usage=System message +docs=Defines the structure of a system message, including role and content +label=System Message # noqa: E501
27
+ +label=System Message +usage=System message for the chat # noqa: E501
28
28
  """
29
29
 
30
- role: StrictStr = Field(...)
30
+ role: StrictStr = Field(
31
+ default=...,
32
+ description="+value=system +label=Role +usage=Role of the message +uiType=Ignore",
33
+ )
31
34
  content: Content1 = Field(...)
32
35
  name: Optional[StrictStr] = Field(
33
36
  default=None, description="+label=Name +usage=Name of the system"
@@ -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.
@@ -22,7 +22,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
22
22
 
23
23
  class TensorFlowFramework(BaseModel):
24
24
  """
25
- +docs=TensorFlow framework for the model version +label=TensorFlow # noqa: E501
25
+ +label=Tensorflow +icon=tensorflow # noqa: E501
26
26
  """
27
27
 
28
28
  type: StrictStr = Field(
@@ -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.
@@ -34,7 +34,7 @@ TEXT_ANY_OF_SCHEMAS = ["BlobStorageReference", "str"]
34
34
 
35
35
  class Text(BaseModel):
36
36
  """
37
- Text
37
+ +label=Text +usage=Text content for the message
38
38
  """
39
39
 
40
40
  # data type: str
@@ -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.
@@ -23,10 +23,12 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
23
23
 
24
24
  class TextContentPart(BaseModel):
25
25
  """
26
- +usage=Text content +label=Text content # noqa: E501
26
+ +label=Text Content +usage=Text content for the message # noqa: E501
27
27
  """
28
28
 
29
- type: StrictStr = Field(...)
29
+ type: StrictStr = Field(
30
+ default=..., description="+value=text +usage=Type of the content part"
31
+ )
30
32
  text: Text = Field(...)
31
33
  __properties = ["type", "text"]
32
34
 
@@ -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.
@@ -24,7 +24,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
24
24
 
25
25
  class TransformersFramework(BaseModel):
26
26
  """
27
- +docs=Transformers framework for the model version +label=Transformers +value=transformers # noqa: E501
27
+ +label=Transformers +icon=transformers # noqa: E501
28
28
  """
29
29
 
30
30
  type: StrictStr = Field(
@@ -37,11 +37,11 @@ class TransformersFramework(BaseModel):
37
37
  )
38
38
  pipeline_tag: Optional[StrictStr] = Field(
39
39
  default=None,
40
- description="+label=Pipeline Tag +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 +docs=Pipeline tag for the framework",
40
+ description='+label=Pipeline Tag +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 +uiProps={"descriptionInline":true}',
41
41
  )
42
42
  base_model: Optional[StrictStr] = Field(
43
43
  default=None,
44
- description="+label=Base Model +usage=Base model Id. If this is a finetuned model, this points to the base model used for finetuning +docs=Base model Id. If this is a finetuned model, this points to the base model used for finetuning",
44
+ description='+label=Base Model +usage=Base model Id from HuggingFace Hub. If this is a finetuned model, this points to the base model id used for finetuning. +uiProps={"descriptionInline":true}',
45
45
  )
46
46
  __properties = ["type", "library_name", "pipeline_tag", "base_model"]
47
47
 
@@ -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.
@@ -23,7 +23,7 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
23
23
 
24
24
  class TrueFoundryManagedSource(BaseModel):
25
25
  """
26
- +usage=Source for the entity +label=Upload # noqa: E501
26
+ +label=TrueFoundry Managed Source # noqa: E501
27
27
  """
28
28
 
29
29
  type: StrictStr = Field(