truefoundry 0.4.0rc2__py3-none-any.whl → 0.4.0rc3__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 (81) hide show
  1. truefoundry/__init__.py +2 -0
  2. truefoundry/autodeploy/agents/developer.py +1 -1
  3. truefoundry/autodeploy/agents/project_identifier.py +2 -2
  4. truefoundry/autodeploy/agents/tester.py +1 -1
  5. truefoundry/autodeploy/cli.py +1 -1
  6. truefoundry/autodeploy/tools/list_files.py +1 -1
  7. truefoundry/{deploy/lib/auth → common}/auth_service_client.py +50 -40
  8. truefoundry/common/constants.py +12 -0
  9. truefoundry/{deploy/lib/auth → common}/credential_file_manager.py +7 -7
  10. truefoundry/{deploy/lib/auth → common}/credential_provider.py +9 -12
  11. truefoundry/{ml/services → common}/entities.py +57 -41
  12. truefoundry/common/exceptions.py +12 -0
  13. truefoundry/common/request_utils.py +36 -8
  14. truefoundry/common/servicefoundry_client.py +91 -0
  15. truefoundry/common/utils.py +56 -0
  16. truefoundry/deploy/auto_gen/models.py +4 -6
  17. truefoundry/deploy/cli/cli.py +2 -0
  18. truefoundry/deploy/cli/commands/apply_command.py +1 -1
  19. truefoundry/deploy/cli/commands/build_command.py +1 -1
  20. truefoundry/deploy/cli/commands/deploy_command.py +1 -1
  21. truefoundry/deploy/cli/commands/login_command.py +2 -2
  22. truefoundry/deploy/cli/commands/patch_application_command.py +1 -1
  23. truefoundry/deploy/cli/commands/patch_command.py +1 -1
  24. truefoundry/deploy/cli/commands/terminate_comand.py +1 -1
  25. truefoundry/deploy/cli/util.py +1 -1
  26. truefoundry/deploy/function_service/remote/remote.py +1 -1
  27. truefoundry/deploy/lib/auth/servicefoundry_session.py +2 -2
  28. truefoundry/deploy/lib/clients/servicefoundry_client.py +120 -150
  29. truefoundry/deploy/lib/const.py +1 -35
  30. truefoundry/deploy/lib/exceptions.py +0 -11
  31. truefoundry/deploy/lib/model/entity.py +1 -112
  32. truefoundry/deploy/lib/session.py +13 -26
  33. truefoundry/deploy/lib/util.py +0 -37
  34. truefoundry/deploy/v2/lib/deploy.py +3 -3
  35. truefoundry/ml/__init__.py +0 -2
  36. truefoundry/ml/artifact/truefoundry_artifact_repo.py +63 -22
  37. truefoundry/ml/autogen/client/__init__.py +0 -3
  38. truefoundry/ml/autogen/client/api/experiments_api.py +0 -165
  39. truefoundry/ml/autogen/client/models/__init__.py +0 -3
  40. truefoundry/ml/autogen/client/models/artifact_dto.py +6 -6
  41. truefoundry/ml/autogen/client/models/artifact_version_dto.py +8 -8
  42. truefoundry/ml/autogen/client/models/create_artifact_response_dto.py +2 -3
  43. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +2 -3
  44. truefoundry/ml/autogen/client/models/create_python_deployment_config_request_dto.py +2 -2
  45. truefoundry/ml/autogen/client/models/create_python_deployment_config_response_dto.py +2 -3
  46. truefoundry/ml/autogen/client/models/create_run_request_dto.py +5 -5
  47. truefoundry/ml/autogen/client/models/create_run_response_dto.py +2 -3
  48. truefoundry/ml/autogen/client/models/dataset_dto.py +10 -10
  49. truefoundry/ml/autogen/client/models/experiment_dto.py +18 -18
  50. truefoundry/ml/autogen/client/models/get_latest_run_log_response_dto.py +2 -3
  51. truefoundry/ml/autogen/client/models/get_tenant_id_response_dto.py +4 -5
  52. truefoundry/ml/autogen/client/models/model_dto.py +6 -6
  53. truefoundry/ml/autogen/client/models/model_version_dto.py +15 -8
  54. truefoundry/ml/autogen/client/models/run_info_dto.py +10 -10
  55. truefoundry/ml/autogen/client/models/update_run_response_dto.py +2 -3
  56. truefoundry/ml/autogen/client_README.md +0 -2
  57. truefoundry/ml/clients/entities.py +8 -0
  58. truefoundry/ml/{services/servicefoundry_service.py → clients/servicefoundry_client.py} +20 -10
  59. truefoundry/ml/{services → clients}/utils.py +2 -2
  60. truefoundry/ml/env_vars.py +1 -5
  61. truefoundry/ml/internal_namespace.py +8 -8
  62. truefoundry/ml/log_types/artifacts/artifact.py +7 -3
  63. truefoundry/ml/log_types/artifacts/dataset.py +1 -1
  64. truefoundry/ml/log_types/artifacts/model.py +7 -8
  65. truefoundry/ml/log_types/image/image.py +7 -8
  66. truefoundry/ml/log_types/image/image_normalizer.py +7 -6
  67. truefoundry/ml/mlfoundry_api.py +5 -17
  68. truefoundry/ml/mlfoundry_run.py +0 -5
  69. truefoundry/ml/run_utils.py +1 -10
  70. truefoundry/ml/session.py +14 -117
  71. truefoundry/pydantic_v1.py +1 -1
  72. truefoundry/workflow/__init__.py +16 -1
  73. {truefoundry-0.4.0rc2.dist-info → truefoundry-0.4.0rc3.dist-info}/METADATA +1 -1
  74. {truefoundry-0.4.0rc2.dist-info → truefoundry-0.4.0rc3.dist-info}/RECORD +77 -76
  75. truefoundry/deploy/lib/clients/utils.py +0 -41
  76. truefoundry/ml/autogen/client/models/backfill_default_storage_integration_id_request_dto.py +0 -67
  77. truefoundry/ml/login.py +0 -241
  78. truefoundry/ml/services/auth_service.py +0 -109
  79. /truefoundry/ml/{services → clients}/__init__.py +0 -0
  80. {truefoundry-0.4.0rc2.dist-info → truefoundry-0.4.0rc3.dist-info}/WHEEL +0 -0
  81. {truefoundry-0.4.0rc2.dist-info → truefoundry-0.4.0rc3.dist-info}/entry_points.txt +0 -0
@@ -20,9 +20,6 @@ from truefoundry.ml.autogen.client.exceptions import ( # noqa: F401
20
20
  ApiTypeError,
21
21
  ApiValueError,
22
22
  )
23
- from truefoundry.ml.autogen.client.models.backfill_default_storage_integration_id_request_dto import (
24
- BackfillDefaultStorageIntegrationIdRequestDto,
25
- )
26
23
  from truefoundry.ml.autogen.client.models.create_experiment_request_dto import (
27
24
  CreateExperimentRequestDto,
28
25
  )
@@ -72,168 +69,6 @@ class ExperimentsApi:
72
69
  api_client = ApiClient.get_default()
73
70
  self.api_client = api_client
74
71
 
75
- @validate_arguments
76
- def backfill_storage_integration_post(
77
- self,
78
- backfill_default_storage_integration_id_request_dto: BackfillDefaultStorageIntegrationIdRequestDto,
79
- **kwargs,
80
- ) -> object: # noqa: E501
81
- """Backfill Storage Integration # noqa: E501
82
-
83
- Backfill all existing experiments to have a storage_integration_id # noqa: E501
84
- This method makes a synchronous HTTP request by default. To make an
85
- asynchronous HTTP request, please pass async_req=True
86
-
87
- >>> thread = api.backfill_storage_integration_post(backfill_default_storage_integration_id_request_dto, async_req=True)
88
- >>> result = thread.get()
89
-
90
- :param backfill_default_storage_integration_id_request_dto: (required)
91
- :type backfill_default_storage_integration_id_request_dto: BackfillDefaultStorageIntegrationIdRequestDto
92
- :param async_req: Whether to execute the request asynchronously.
93
- :type async_req: bool, optional
94
- :param _request_timeout: timeout setting for this request.
95
- If one number provided, it will be total request
96
- timeout. It can also be a pair (tuple) of
97
- (connection, read) timeouts.
98
- :return: Returns the result object.
99
- If the method is called asynchronously,
100
- returns the request thread.
101
- :rtype: object
102
- """
103
- kwargs["_return_http_data_only"] = True
104
- if "_preload_content" in kwargs:
105
- message = "Error! Please call the backfill_storage_integration_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
106
- raise ValueError(message)
107
- return self.backfill_storage_integration_post_with_http_info(
108
- backfill_default_storage_integration_id_request_dto, **kwargs
109
- ) # noqa: E501
110
-
111
- @validate_arguments
112
- def backfill_storage_integration_post_with_http_info(
113
- self,
114
- backfill_default_storage_integration_id_request_dto: BackfillDefaultStorageIntegrationIdRequestDto,
115
- **kwargs,
116
- ) -> ApiResponse: # noqa: E501
117
- """Backfill Storage Integration # noqa: E501
118
-
119
- Backfill all existing experiments to have a storage_integration_id # noqa: E501
120
- This method makes a synchronous HTTP request by default. To make an
121
- asynchronous HTTP request, please pass async_req=True
122
-
123
- >>> thread = api.backfill_storage_integration_post_with_http_info(backfill_default_storage_integration_id_request_dto, async_req=True)
124
- >>> result = thread.get()
125
-
126
- :param backfill_default_storage_integration_id_request_dto: (required)
127
- :type backfill_default_storage_integration_id_request_dto: BackfillDefaultStorageIntegrationIdRequestDto
128
- :param async_req: Whether to execute the request asynchronously.
129
- :type async_req: bool, optional
130
- :param _preload_content: if False, the ApiResponse.data will
131
- be set to none and raw_data will store the
132
- HTTP response body without reading/decoding.
133
- Default is True.
134
- :type _preload_content: bool, optional
135
- :param _return_http_data_only: response data instead of ApiResponse
136
- object with status code, headers, etc
137
- :type _return_http_data_only: bool, optional
138
- :param _request_timeout: timeout setting for this request. If one
139
- number provided, it will be total request
140
- timeout. It can also be a pair (tuple) of
141
- (connection, read) timeouts.
142
- :param _request_auth: set to override the auth_settings for an a single
143
- request; this effectively ignores the authentication
144
- in the spec for a single request.
145
- :type _request_auth: dict, optional
146
- :type _content_type: string, optional: force content-type for the request
147
- :return: Returns the result object.
148
- If the method is called asynchronously,
149
- returns the request thread.
150
- :rtype: tuple(object, status_code(int), headers(HTTPHeaderDict))
151
- """
152
-
153
- _params = locals()
154
-
155
- _all_params = ["backfill_default_storage_integration_id_request_dto"]
156
- _all_params.extend(
157
- [
158
- "async_req",
159
- "_return_http_data_only",
160
- "_preload_content",
161
- "_request_timeout",
162
- "_request_auth",
163
- "_content_type",
164
- "_headers",
165
- ]
166
- )
167
-
168
- # validate the arguments
169
- for _key, _val in _params["kwargs"].items():
170
- if _key not in _all_params:
171
- raise ApiTypeError(
172
- "Got an unexpected keyword argument '%s'"
173
- " to method backfill_storage_integration_post" % _key
174
- )
175
- _params[_key] = _val
176
- del _params["kwargs"]
177
-
178
- _collection_formats = {}
179
-
180
- # process the path parameters
181
- _path_params = {}
182
-
183
- # process the query parameters
184
- _query_params = []
185
- # process the header parameters
186
- _header_params = dict(_params.get("_headers", {}))
187
- # process the form parameters
188
- _form_params = []
189
- _files = {}
190
- # process the body parameter
191
- _body_params = None
192
- if _params["backfill_default_storage_integration_id_request_dto"] is not None:
193
- _body_params = _params[
194
- "backfill_default_storage_integration_id_request_dto"
195
- ]
196
-
197
- # set the HTTP header `Accept`
198
- _header_params["Accept"] = self.api_client.select_header_accept(
199
- ["application/json"]
200
- ) # noqa: E501
201
-
202
- # set the HTTP header `Content-Type`
203
- _content_types_list = _params.get(
204
- "_content_type",
205
- self.api_client.select_header_content_type(["application/json"]),
206
- )
207
- if _content_types_list:
208
- _header_params["Content-Type"] = _content_types_list
209
-
210
- # authentication setting
211
- _auth_settings = ["HTTPBearer", "APIKeyCookie"] # noqa: E501
212
-
213
- _response_types_map = {
214
- "200": "object",
215
- "422": "HTTPValidationError",
216
- }
217
-
218
- return self.api_client.call_api(
219
- "/api/2.0/mlflow/experiments/storage-integration/backfill",
220
- "POST",
221
- _path_params,
222
- _query_params,
223
- _header_params,
224
- body=_body_params,
225
- post_params=_form_params,
226
- files=_files,
227
- response_types_map=_response_types_map,
228
- auth_settings=_auth_settings,
229
- async_req=_params.get("async_req"),
230
- _return_http_data_only=_params.get("_return_http_data_only"), # noqa: E501
231
- _preload_content=_params.get("_preload_content", True),
232
- _request_timeout=_params.get("_request_timeout"),
233
- collection_formats=_collection_formats,
234
- _request_auth=_params.get("_request_auth"),
235
- )
236
-
237
72
  @validate_arguments
238
73
  def create_experiment_post(
239
74
  self, create_experiment_request_dto: CreateExperimentRequestDto, **kwargs
@@ -45,9 +45,6 @@ from truefoundry.ml.autogen.client.models.authorize_user_for_model_request_dto i
45
45
  from truefoundry.ml.autogen.client.models.authorize_user_for_model_version_request_dto import (
46
46
  AuthorizeUserForModelVersionRequestDto,
47
47
  )
48
- from truefoundry.ml.autogen.client.models.backfill_default_storage_integration_id_request_dto import (
49
- BackfillDefaultStorageIntegrationIdRequestDto,
50
- )
51
48
  from truefoundry.ml.autogen.client.models.blob_storage_reference import (
52
49
  BlobStorageReference,
53
50
  )
@@ -21,7 +21,7 @@ from typing import Optional
21
21
 
22
22
  from truefoundry.ml.autogen.client.models.artifact_type import ArtifactType
23
23
  from truefoundry.ml.autogen.client.models.artifact_version_dto import ArtifactVersionDto
24
- from truefoundry.pydantic_v1 import BaseModel, StrictInt, StrictStr, conlist
24
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictInt, StrictStr, conlist
25
25
 
26
26
 
27
27
  class ArtifactDto(BaseModel):
@@ -29,11 +29,11 @@ class ArtifactDto(BaseModel):
29
29
  ArtifactDto
30
30
  """
31
31
 
32
- id: Optional[StrictStr] = None
33
- experiment_id: Optional[StrictStr] = None
34
- type: Optional[ArtifactType] = None
35
- name: Optional[StrictStr] = None
36
- fqn: Optional[StrictStr] = None
32
+ id: StrictStr = Field(...)
33
+ experiment_id: StrictStr = Field(...)
34
+ type: ArtifactType = Field(...)
35
+ name: StrictStr = Field(...)
36
+ fqn: StrictStr = Field(...)
37
37
  description: Optional[StrictStr] = None
38
38
  created_by: Optional[StrictStr] = None
39
39
  created_at: Optional[datetime] = None
@@ -23,7 +23,7 @@ from truefoundry.ml.autogen.client.models.artifact_version_status import (
23
23
  ArtifactVersionStatus,
24
24
  )
25
25
  from truefoundry.ml.autogen.client.models.internal_metadata import InternalMetadata
26
- from truefoundry.pydantic_v1 import BaseModel, StrictInt, StrictStr
26
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictInt, StrictStr
27
27
 
28
28
 
29
29
  class ArtifactVersionDto(BaseModel):
@@ -31,10 +31,11 @@ class ArtifactVersionDto(BaseModel):
31
31
  ArtifactVersionDto
32
32
  """
33
33
 
34
- id: Optional[StrictStr] = None
35
- artifact_id: Optional[StrictStr] = None
36
- version: Optional[StrictInt] = None
37
- fqn: Optional[StrictStr] = None
34
+ id: StrictStr = Field(...)
35
+ artifact_id: StrictStr = Field(...)
36
+ version: StrictInt = Field(...)
37
+ fqn: StrictStr = Field(...)
38
+ experiment_id: StrictStr = Field(...)
38
39
  artifact_storage_root: Optional[StrictStr] = None
39
40
  artifact_metadata: Optional[Dict[str, Any]] = None
40
41
  description: Optional[StrictStr] = None
@@ -46,7 +47,6 @@ class ArtifactVersionDto(BaseModel):
46
47
  artifact_fqn: Optional[StrictStr] = None
47
48
  data_path: Optional[StrictStr] = None
48
49
  usage_code_snippet: Optional[StrictStr] = None
49
- experiment_id: Optional[StrictStr] = None
50
50
  run_id: Optional[StrictStr] = None
51
51
  artifact_name: Optional[StrictStr] = None
52
52
  internal_metadata: Optional[InternalMetadata] = None
@@ -56,6 +56,7 @@ class ArtifactVersionDto(BaseModel):
56
56
  "artifact_id",
57
57
  "version",
58
58
  "fqn",
59
+ "experiment_id",
59
60
  "artifact_storage_root",
60
61
  "artifact_metadata",
61
62
  "description",
@@ -67,7 +68,6 @@ class ArtifactVersionDto(BaseModel):
67
68
  "artifact_fqn",
68
69
  "data_path",
69
70
  "usage_code_snippet",
70
- "experiment_id",
71
71
  "run_id",
72
72
  "artifact_name",
73
73
  "internal_metadata",
@@ -116,6 +116,7 @@ class ArtifactVersionDto(BaseModel):
116
116
  "artifact_id": obj.get("artifact_id"),
117
117
  "version": obj.get("version"),
118
118
  "fqn": obj.get("fqn"),
119
+ "experiment_id": obj.get("experiment_id"),
119
120
  "artifact_storage_root": obj.get("artifact_storage_root"),
120
121
  "artifact_metadata": obj.get("artifact_metadata"),
121
122
  "description": obj.get("description"),
@@ -127,7 +128,6 @@ class ArtifactVersionDto(BaseModel):
127
128
  "artifact_fqn": obj.get("artifact_fqn"),
128
129
  "data_path": obj.get("data_path"),
129
130
  "usage_code_snippet": obj.get("usage_code_snippet"),
130
- "experiment_id": obj.get("experiment_id"),
131
131
  "run_id": obj.get("run_id"),
132
132
  "artifact_name": obj.get("artifact_name"),
133
133
  "internal_metadata": InternalMetadata.from_dict(
@@ -16,9 +16,8 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
22
21
 
23
22
 
24
23
  class CreateArtifactResponseDto(BaseModel):
@@ -26,7 +25,7 @@ class CreateArtifactResponseDto(BaseModel):
26
25
  CreateArtifactResponseDto
27
26
  """
28
27
 
29
- id: Optional[StrictStr] = None
28
+ id: StrictStr = Field(...)
30
29
  __properties = ["id"]
31
30
 
32
31
  class Config:
@@ -16,9 +16,8 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
22
21
 
23
22
 
24
23
  class CreateArtifactVersionResponseDto(BaseModel):
@@ -26,7 +25,7 @@ class CreateArtifactVersionResponseDto(BaseModel):
26
25
  CreateArtifactVersionResponseDto
27
26
  """
28
27
 
29
- id: Optional[StrictStr] = None
28
+ id: StrictStr = Field(...)
30
29
  __properties = ["id"]
31
30
 
32
31
  class Config:
@@ -18,7 +18,7 @@ import pprint
18
18
  import re # noqa: F401
19
19
  from typing import Any, Dict, Optional
20
20
 
21
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
21
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
22
22
 
23
23
 
24
24
  class CreatePythonDeploymentConfigRequestDto(BaseModel):
@@ -26,7 +26,7 @@ class CreatePythonDeploymentConfigRequestDto(BaseModel):
26
26
  CreatePythonDeploymentConfigRequestDto
27
27
  """
28
28
 
29
- workspace_fqn: Optional[StrictStr] = None
29
+ workspace_fqn: StrictStr = Field(...)
30
30
  deployment_config: Optional[Dict[str, Any]] = None
31
31
  __properties = ["workspace_fqn", "deployment_config"]
32
32
 
@@ -16,9 +16,8 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
22
21
 
23
22
 
24
23
  class CreatePythonDeploymentConfigResponseDto(BaseModel):
@@ -26,7 +25,7 @@ class CreatePythonDeploymentConfigResponseDto(BaseModel):
26
25
  CreatePythonDeploymentConfigResponseDto
27
26
  """
28
27
 
29
- deploy_file_content: Optional[StrictStr] = None
28
+ deploy_file_content: StrictStr = Field(...)
30
29
  __properties = ["deploy_file_content"]
31
30
 
32
31
  class Config:
@@ -19,7 +19,7 @@ import re # noqa: F401
19
19
  from typing import Optional
20
20
 
21
21
  from truefoundry.ml.autogen.client.models.run_tag_dto import RunTagDto
22
- from truefoundry.pydantic_v1 import BaseModel, StrictInt, StrictStr, conlist
22
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictInt, StrictStr, conlist
23
23
 
24
24
 
25
25
  class CreateRunRequestDto(BaseModel):
@@ -27,18 +27,18 @@ class CreateRunRequestDto(BaseModel):
27
27
  CreateRunRequestDto
28
28
  """
29
29
 
30
- experiment_id: Optional[StrictStr] = None
30
+ experiment_id: StrictStr = Field(...)
31
+ name: StrictStr = Field(...)
31
32
  user_id: Optional[StrictStr] = None
32
33
  start_time: Optional[StrictInt] = None
33
34
  tags: Optional[conlist(RunTagDto)] = None
34
- name: Optional[StrictStr] = None
35
35
  description: Optional[StrictStr] = None
36
36
  __properties = [
37
37
  "experiment_id",
38
+ "name",
38
39
  "user_id",
39
40
  "start_time",
40
41
  "tags",
41
- "name",
42
42
  "description",
43
43
  ]
44
44
 
@@ -85,12 +85,12 @@ class CreateRunRequestDto(BaseModel):
85
85
  _obj = CreateRunRequestDto.parse_obj(
86
86
  {
87
87
  "experiment_id": obj.get("experiment_id"),
88
+ "name": obj.get("name"),
88
89
  "user_id": obj.get("user_id"),
89
90
  "start_time": obj.get("start_time"),
90
91
  "tags": [RunTagDto.from_dict(_item) for _item in obj.get("tags")]
91
92
  if obj.get("tags") is not None
92
93
  else None,
93
- "name": obj.get("name"),
94
94
  "description": obj.get("description"),
95
95
  }
96
96
  )
@@ -16,10 +16,9 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
20
  from truefoundry.ml.autogen.client.models.run_dto import RunDto
22
- from truefoundry.pydantic_v1 import BaseModel
21
+ from truefoundry.pydantic_v1 import BaseModel, Field
23
22
 
24
23
 
25
24
  class CreateRunResponseDto(BaseModel):
@@ -27,7 +26,7 @@ class CreateRunResponseDto(BaseModel):
27
26
  CreateRunResponseDto
28
27
  """
29
28
 
30
- run: Optional[RunDto] = None
29
+ run: RunDto = Field(...)
31
30
  __properties = ["run"]
32
31
 
33
32
  class Config:
@@ -20,7 +20,7 @@ from datetime import datetime
20
20
  from typing import Any, Dict, Optional
21
21
 
22
22
  from truefoundry.ml.autogen.client.models.experiment_dto import ExperimentDto
23
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
23
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
24
24
 
25
25
 
26
26
  class DatasetDto(BaseModel):
@@ -28,11 +28,10 @@ class DatasetDto(BaseModel):
28
28
  DatasetDto
29
29
  """
30
30
 
31
- id: Optional[StrictStr] = None
32
- experiment_id: Optional[StrictStr] = None
33
- experiment: Optional[ExperimentDto] = None
34
- name: Optional[StrictStr] = None
35
- fqn: Optional[StrictStr] = None
31
+ id: StrictStr = Field(...)
32
+ experiment_id: StrictStr = Field(...)
33
+ name: StrictStr = Field(...)
34
+ fqn: StrictStr = Field(...)
36
35
  description: Optional[StrictStr] = None
37
36
  created_by: Optional[StrictStr] = None
38
37
  created_at: Optional[datetime] = None
@@ -40,10 +39,10 @@ class DatasetDto(BaseModel):
40
39
  storage_root: Optional[StrictStr] = None
41
40
  dataset_metadata: Optional[Dict[str, Any]] = None
42
41
  usage_code_snippet: Optional[StrictStr] = None
42
+ experiment: Optional[ExperimentDto] = None
43
43
  __properties = [
44
44
  "id",
45
45
  "experiment_id",
46
- "experiment",
47
46
  "name",
48
47
  "fqn",
49
48
  "description",
@@ -53,6 +52,7 @@ class DatasetDto(BaseModel):
53
52
  "storage_root",
54
53
  "dataset_metadata",
55
54
  "usage_code_snippet",
55
+ "experiment",
56
56
  ]
57
57
 
58
58
  class Config:
@@ -95,9 +95,6 @@ class DatasetDto(BaseModel):
95
95
  {
96
96
  "id": obj.get("id"),
97
97
  "experiment_id": obj.get("experiment_id"),
98
- "experiment": ExperimentDto.from_dict(obj.get("experiment"))
99
- if obj.get("experiment") is not None
100
- else None,
101
98
  "name": obj.get("name"),
102
99
  "fqn": obj.get("fqn"),
103
100
  "description": obj.get("description"),
@@ -107,6 +104,9 @@ class DatasetDto(BaseModel):
107
104
  "storage_root": obj.get("storage_root"),
108
105
  "dataset_metadata": obj.get("dataset_metadata"),
109
106
  "usage_code_snippet": obj.get("usage_code_snippet"),
107
+ "experiment": ExperimentDto.from_dict(obj.get("experiment"))
108
+ if obj.get("experiment") is not None
109
+ else None,
110
110
  }
111
111
  )
112
112
  return _obj
@@ -19,7 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, Dict, Optional
20
20
 
21
21
  from truefoundry.ml.autogen.client.models.experiment_tag_dto import ExperimentTagDto
22
- from truefoundry.pydantic_v1 import BaseModel, StrictInt, StrictStr, conlist
22
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictInt, StrictStr, conlist
23
23
 
24
24
 
25
25
  class ExperimentDto(BaseModel):
@@ -27,39 +27,39 @@ class ExperimentDto(BaseModel):
27
27
  ExperimentDto
28
28
  """
29
29
 
30
- experiment_id: Optional[StrictStr] = None
31
- name: Optional[StrictStr] = None
30
+ experiment_id: StrictStr = Field(...)
31
+ name: StrictStr = Field(...)
32
+ storage_integration_id: Optional[StrictStr] = None
32
33
  artifact_location: Optional[StrictStr] = None
33
34
  lifecycle_stage: Optional[StrictStr] = None
34
35
  tags: Optional[conlist(ExperimentTagDto)] = None
35
36
  creator_user_id: Optional[StrictStr] = None
36
- num_runs: Optional[StrictInt] = None
37
- num_user_collaborators: Optional[StrictInt] = None
38
37
  description: Optional[StrictStr] = None
39
38
  privacy_type: Optional[StrictStr] = None
40
39
  created_at: Optional[StrictInt] = None
41
40
  tenant_name: Optional[StrictStr] = None
42
- total_models_count: Optional[StrictInt] = None
43
- total_artifacts_count: Optional[StrictInt] = None
44
- storage_integration_id: Optional[StrictStr] = None
45
41
  manifest: Optional[Dict[str, Any]] = None
42
+ num_runs: Optional[StrictInt] = None
43
+ artifact_type_counts: Optional[Dict[str, StrictInt]] = None
44
+ datasets_count: Optional[StrictInt] = None
45
+ num_user_collaborators: Optional[StrictInt] = None
46
46
  __properties = [
47
47
  "experiment_id",
48
48
  "name",
49
+ "storage_integration_id",
49
50
  "artifact_location",
50
51
  "lifecycle_stage",
51
52
  "tags",
52
53
  "creator_user_id",
53
- "num_runs",
54
- "num_user_collaborators",
55
54
  "description",
56
55
  "privacy_type",
57
56
  "created_at",
58
57
  "tenant_name",
59
- "total_models_count",
60
- "total_artifacts_count",
61
- "storage_integration_id",
62
58
  "manifest",
59
+ "num_runs",
60
+ "artifact_type_counts",
61
+ "datasets_count",
62
+ "num_user_collaborators",
63
63
  ]
64
64
 
65
65
  class Config:
@@ -106,22 +106,22 @@ class ExperimentDto(BaseModel):
106
106
  {
107
107
  "experiment_id": obj.get("experiment_id"),
108
108
  "name": obj.get("name"),
109
+ "storage_integration_id": obj.get("storage_integration_id"),
109
110
  "artifact_location": obj.get("artifact_location"),
110
111
  "lifecycle_stage": obj.get("lifecycle_stage"),
111
112
  "tags": [ExperimentTagDto.from_dict(_item) for _item in obj.get("tags")]
112
113
  if obj.get("tags") is not None
113
114
  else None,
114
115
  "creator_user_id": obj.get("creator_user_id"),
115
- "num_runs": obj.get("num_runs"),
116
- "num_user_collaborators": obj.get("num_user_collaborators"),
117
116
  "description": obj.get("description"),
118
117
  "privacy_type": obj.get("privacy_type"),
119
118
  "created_at": obj.get("created_at"),
120
119
  "tenant_name": obj.get("tenant_name"),
121
- "total_models_count": obj.get("total_models_count"),
122
- "total_artifacts_count": obj.get("total_artifacts_count"),
123
- "storage_integration_id": obj.get("storage_integration_id"),
124
120
  "manifest": obj.get("manifest"),
121
+ "num_runs": obj.get("num_runs"),
122
+ "artifact_type_counts": obj.get("artifact_type_counts"),
123
+ "datasets_count": obj.get("datasets_count"),
124
+ "num_user_collaborators": obj.get("num_user_collaborators"),
125
125
  }
126
126
  )
127
127
  return _obj
@@ -16,10 +16,9 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
20
  from truefoundry.ml.autogen.client.models.run_log_dto import RunLogDto
22
- from truefoundry.pydantic_v1 import BaseModel
21
+ from truefoundry.pydantic_v1 import BaseModel, Field
23
22
 
24
23
 
25
24
  class GetLatestRunLogResponseDto(BaseModel):
@@ -27,7 +26,7 @@ class GetLatestRunLogResponseDto(BaseModel):
27
26
  GetLatestRunLogResponseDto
28
27
  """
29
28
 
30
- run_log: Optional[RunLogDto] = None
29
+ run_log: RunLogDto = Field(...)
31
30
  __properties = ["run_log"]
32
31
 
33
32
  class Config:
@@ -16,9 +16,8 @@ from __future__ import annotations
16
16
  import json
17
17
  import pprint
18
18
  import re # noqa: F401
19
- from typing import Optional
20
19
 
21
- from truefoundry.pydantic_v1 import BaseModel, StrictStr
20
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
22
21
 
23
22
 
24
23
  class GetTenantIdResponseDto(BaseModel):
@@ -26,9 +25,9 @@ class GetTenantIdResponseDto(BaseModel):
26
25
  GetTenantIdResponseDto
27
26
  """
28
27
 
29
- tenant_id: Optional[StrictStr] = None
30
- tenant_name: Optional[StrictStr] = None
31
- auth_server_url: Optional[StrictStr] = None
28
+ tenant_id: StrictStr = Field(...)
29
+ tenant_name: StrictStr = Field(...)
30
+ auth_server_url: StrictStr = Field(...)
32
31
  __properties = ["tenant_id", "tenant_name", "auth_server_url"]
33
32
 
34
33
  class Config:
@@ -22,7 +22,7 @@ from typing import Optional
22
22
  from truefoundry.ml.autogen.client.models.artifact_type import ArtifactType
23
23
  from truefoundry.ml.autogen.client.models.experiment_dto import ExperimentDto
24
24
  from truefoundry.ml.autogen.client.models.model_version_dto import ModelVersionDto
25
- from truefoundry.pydantic_v1 import BaseModel, StrictBool, StrictStr
25
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictBool, StrictStr
26
26
 
27
27
 
28
28
  class ModelDto(BaseModel):
@@ -30,11 +30,11 @@ class ModelDto(BaseModel):
30
30
  ModelDto
31
31
  """
32
32
 
33
- id: Optional[StrictStr] = None
34
- experiment_id: Optional[StrictStr] = None
35
- type: Optional[ArtifactType] = None
36
- name: Optional[StrictStr] = None
37
- fqn: Optional[StrictStr] = None
33
+ id: StrictStr = Field(...)
34
+ experiment_id: StrictStr = Field(...)
35
+ type: ArtifactType = Field(...)
36
+ name: StrictStr = Field(...)
37
+ fqn: StrictStr = Field(...)
38
38
  description: Optional[StrictStr] = None
39
39
  created_by: Optional[StrictStr] = None
40
40
  created_at: Optional[datetime] = None