truefoundry 0.4.4rc9__py3-none-any.whl → 0.4.4rc11__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 (37) hide show
  1. truefoundry/common/tfy_signed_url_client.py +11 -6
  2. truefoundry/common/utils.py +3 -2
  3. truefoundry/ml/autogen/client/__init__.py +24 -3
  4. truefoundry/ml/autogen/client/api/experiments_api.py +0 -137
  5. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +2 -0
  6. truefoundry/ml/autogen/client/models/__init__.py +24 -3
  7. truefoundry/ml/autogen/client/models/artifact_dto.py +9 -0
  8. truefoundry/ml/autogen/client/models/artifact_version_dto.py +26 -0
  9. truefoundry/ml/autogen/client/models/artifact_version_serialization_format.py +34 -0
  10. truefoundry/ml/autogen/client/models/create_artifact_version_response_dto.py +8 -2
  11. truefoundry/ml/autogen/client/models/create_run_request_dto.py +1 -10
  12. truefoundry/ml/autogen/client/models/dataset_dto.py +9 -0
  13. truefoundry/ml/autogen/client/models/experiment_dto.py +14 -3
  14. truefoundry/ml/autogen/client/models/external_model_source.py +79 -0
  15. truefoundry/ml/autogen/client/models/finalize_artifact_version_request_dto.py +11 -0
  16. truefoundry/ml/autogen/client/models/framework.py +154 -0
  17. truefoundry/ml/autogen/client/models/library_name.py +35 -0
  18. truefoundry/ml/autogen/client/models/model_dto.py +9 -0
  19. truefoundry/ml/autogen/client/models/model_version_dto.py +26 -0
  20. truefoundry/ml/autogen/client/models/model_version_manifest.py +119 -0
  21. truefoundry/ml/autogen/client/models/run_info_dto.py +10 -1
  22. truefoundry/ml/autogen/client/models/source.py +177 -0
  23. truefoundry/ml/autogen/client/models/subject.py +79 -0
  24. truefoundry/ml/autogen/client/models/subject_type.py +34 -0
  25. truefoundry/ml/autogen/client/models/tensorflow_framework.py +74 -0
  26. truefoundry/ml/autogen/client/models/transformers_framework.py +90 -0
  27. truefoundry/ml/autogen/client/models/truefoundry_model_source.py +79 -0
  28. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +11 -0
  29. truefoundry/ml/autogen/client/models/upload_model_source.py +74 -0
  30. truefoundry/ml/autogen/client_README.md +12 -2
  31. truefoundry/ml/autogen/entities/artifacts.py +236 -4
  32. truefoundry/ml/mlfoundry_api.py +0 -1
  33. {truefoundry-0.4.4rc9.dist-info → truefoundry-0.4.4rc11.dist-info}/METADATA +1 -1
  34. {truefoundry-0.4.4rc9.dist-info → truefoundry-0.4.4rc11.dist-info}/RECORD +36 -25
  35. truefoundry/ml/autogen/client/models/list_seed_experiments_response_dto.py +0 -81
  36. {truefoundry-0.4.4rc9.dist-info → truefoundry-0.4.4rc11.dist-info}/WHEEL +0 -0
  37. {truefoundry-0.4.4rc9.dist-info → truefoundry-0.4.4rc11.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,74 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ FastAPI
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.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 UploadModelSource(BaseModel):
24
+ """
25
+ UploadModelSource
26
+ """
27
+
28
+ type: StrictStr = Field(
29
+ default=..., description="+label=Type +usage=Type of the source"
30
+ )
31
+ __properties = ["type"]
32
+
33
+ @validator("type")
34
+ def type_validate_enum(cls, value):
35
+ """Validates the enum"""
36
+ if value not in ("upload"):
37
+ raise ValueError("must be one of enum values ('upload')")
38
+ return value
39
+
40
+ class Config:
41
+ """Pydantic configuration"""
42
+
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> UploadModelSource:
56
+ """Create an instance of UploadModelSource from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
62
+ return _dict
63
+
64
+ @classmethod
65
+ def from_dict(cls, obj: dict) -> UploadModelSource:
66
+ """Create an instance of UploadModelSource from a dict"""
67
+ if obj is None:
68
+ return None
69
+
70
+ if not isinstance(obj, dict):
71
+ return UploadModelSource.parse_obj(obj)
72
+
73
+ _obj = UploadModelSource.parse_obj({"type": obj.get("type")})
74
+ return _obj
@@ -78,7 +78,6 @@ Class | Method | HTTP request | Description
78
78
  *ExperimentsApi* | [**list_experiments_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#list_experiments_get) | **GET** /api/2.0/mlflow/experiments/list | List Experiments
79
79
  *ExperimentsApi* | [**put_privacy_type_put**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#put_privacy_type_put) | **PUT** /api/2.0/mlflow/experiments/privacy-type | Put Privacy Type
80
80
  *ExperimentsApi* | [**restore_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#restore_experiment_post) | **POST** /api/2.0/mlflow/experiments/restore | Restore Experiment
81
- *ExperimentsApi* | [**seed_list_experiment_get**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#seed_list_experiment_get) | **GET** /api/2.0/mlflow/experiments/seed/list | Seed List Experiment
82
81
  *ExperimentsApi* | [**set_experiment_tag_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#set_experiment_tag_post) | **POST** /api/2.0/mlflow/experiments/set-experiment-tag | Set Experiment Tag
83
82
  *ExperimentsApi* | [**update_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#update_experiment_post) | **POST** /api/2.0/mlflow/experiments/update | Update Experiment
84
83
  *HealthApi* | [**health_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#health_get) | **GET** /health | Health
@@ -166,6 +165,7 @@ Class | Method | HTTP request | Description
166
165
  - [ArtifactType](truefoundry/ml/autogen/client/docs/ArtifactType.md)
167
166
  - [ArtifactVersionDto](truefoundry/ml/autogen/client/docs/ArtifactVersionDto.md)
168
167
  - [ArtifactVersionResponseDto](truefoundry/ml/autogen/client/docs/ArtifactVersionResponseDto.md)
168
+ - [ArtifactVersionSerializationFormat](truefoundry/ml/autogen/client/docs/ArtifactVersionSerializationFormat.md)
169
169
  - [ArtifactVersionStatus](truefoundry/ml/autogen/client/docs/ArtifactVersionStatus.md)
170
170
  - [AssistantMessage](truefoundry/ml/autogen/client/docs/AssistantMessage.md)
171
171
  - [AuthorizeUserForModelRequestDto](truefoundry/ml/autogen/client/docs/AuthorizeUserForModelRequestDto.md)
@@ -206,10 +206,12 @@ Class | Method | HTTP request | Description
206
206
  - [ExperimentIdRequestDto](truefoundry/ml/autogen/client/docs/ExperimentIdRequestDto.md)
207
207
  - [ExperimentResponseDto](truefoundry/ml/autogen/client/docs/ExperimentResponseDto.md)
208
208
  - [ExperimentTagDto](truefoundry/ml/autogen/client/docs/ExperimentTagDto.md)
209
+ - [ExternalModelSource](truefoundry/ml/autogen/client/docs/ExternalModelSource.md)
209
210
  - [FeatureDto](truefoundry/ml/autogen/client/docs/FeatureDto.md)
210
211
  - [FeatureValueType](truefoundry/ml/autogen/client/docs/FeatureValueType.md)
211
212
  - [FileInfoDto](truefoundry/ml/autogen/client/docs/FileInfoDto.md)
212
213
  - [FinalizeArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/FinalizeArtifactVersionRequestDto.md)
214
+ - [Framework](truefoundry/ml/autogen/client/docs/Framework.md)
213
215
  - [GetExperimentResponseDto](truefoundry/ml/autogen/client/docs/GetExperimentResponseDto.md)
214
216
  - [GetLatestRunLogResponseDto](truefoundry/ml/autogen/client/docs/GetLatestRunLogResponseDto.md)
215
217
  - [GetMetricHistoryResponse](truefoundry/ml/autogen/client/docs/GetMetricHistoryResponse.md)
@@ -227,6 +229,7 @@ Class | Method | HTTP request | Description
227
229
  - [ImageUrl](truefoundry/ml/autogen/client/docs/ImageUrl.md)
228
230
  - [InternalMetadata](truefoundry/ml/autogen/client/docs/InternalMetadata.md)
229
231
  - [LatestRunLogDto](truefoundry/ml/autogen/client/docs/LatestRunLogDto.md)
232
+ - [LibraryName](truefoundry/ml/autogen/client/docs/LibraryName.md)
230
233
  - [ListArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsRequestDto.md)
231
234
  - [ListArtifactVersionsResponseDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsResponseDto.md)
232
235
  - [ListArtifactsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactsRequestDto.md)
@@ -248,7 +251,6 @@ Class | Method | HTTP request | Description
248
251
  - [ListModelsResponseDto](truefoundry/ml/autogen/client/docs/ListModelsResponseDto.md)
249
252
  - [ListRunArtifactsResponseDto](truefoundry/ml/autogen/client/docs/ListRunArtifactsResponseDto.md)
250
253
  - [ListRunLogsResponseDto](truefoundry/ml/autogen/client/docs/ListRunLogsResponseDto.md)
251
- - [ListSeedExperimentsResponseDto](truefoundry/ml/autogen/client/docs/ListSeedExperimentsResponseDto.md)
252
254
  - [LogBatchRequestDto](truefoundry/ml/autogen/client/docs/LogBatchRequestDto.md)
253
255
  - [LogMetricRequestDto](truefoundry/ml/autogen/client/docs/LogMetricRequestDto.md)
254
256
  - [LogParamRequestDto](truefoundry/ml/autogen/client/docs/LogParamRequestDto.md)
@@ -261,6 +263,7 @@ Class | Method | HTTP request | Description
261
263
  - [ModelResponseDto](truefoundry/ml/autogen/client/docs/ModelResponseDto.md)
262
264
  - [ModelSchemaDto](truefoundry/ml/autogen/client/docs/ModelSchemaDto.md)
263
265
  - [ModelVersionDto](truefoundry/ml/autogen/client/docs/ModelVersionDto.md)
266
+ - [ModelVersionManifest](truefoundry/ml/autogen/client/docs/ModelVersionManifest.md)
264
267
  - [ModelVersionResponseDto](truefoundry/ml/autogen/client/docs/ModelVersionResponseDto.md)
265
268
  - [MultiPartUploadDto](truefoundry/ml/autogen/client/docs/MultiPartUploadDto.md)
266
269
  - [MultiPartUploadResponseDto](truefoundry/ml/autogen/client/docs/MultiPartUploadResponseDto.md)
@@ -284,17 +287,24 @@ Class | Method | HTTP request | Description
284
287
  - [SetExperimentTagRequestDto](truefoundry/ml/autogen/client/docs/SetExperimentTagRequestDto.md)
285
288
  - [SetTagRequestDto](truefoundry/ml/autogen/client/docs/SetTagRequestDto.md)
286
289
  - [SignedURLDto](truefoundry/ml/autogen/client/docs/SignedURLDto.md)
290
+ - [Source](truefoundry/ml/autogen/client/docs/Source.md)
287
291
  - [Stop](truefoundry/ml/autogen/client/docs/Stop.md)
288
292
  - [StoreRunLogsRequestDto](truefoundry/ml/autogen/client/docs/StoreRunLogsRequestDto.md)
293
+ - [Subject](truefoundry/ml/autogen/client/docs/Subject.md)
294
+ - [SubjectType](truefoundry/ml/autogen/client/docs/SubjectType.md)
289
295
  - [SystemMessage](truefoundry/ml/autogen/client/docs/SystemMessage.md)
296
+ - [TensorflowFramework](truefoundry/ml/autogen/client/docs/TensorflowFramework.md)
290
297
  - [Text](truefoundry/ml/autogen/client/docs/Text.md)
291
298
  - [TextContentPart](truefoundry/ml/autogen/client/docs/TextContentPart.md)
299
+ - [TransformersFramework](truefoundry/ml/autogen/client/docs/TransformersFramework.md)
300
+ - [TruefoundryModelSource](truefoundry/ml/autogen/client/docs/TruefoundryModelSource.md)
292
301
  - [UpdateArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateArtifactVersionRequestDto.md)
293
302
  - [UpdateDatasetRequestDto](truefoundry/ml/autogen/client/docs/UpdateDatasetRequestDto.md)
294
303
  - [UpdateExperimentRequestDto](truefoundry/ml/autogen/client/docs/UpdateExperimentRequestDto.md)
295
304
  - [UpdateModelVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateModelVersionRequestDto.md)
296
305
  - [UpdateRunRequestDto](truefoundry/ml/autogen/client/docs/UpdateRunRequestDto.md)
297
306
  - [UpdateRunResponseDto](truefoundry/ml/autogen/client/docs/UpdateRunResponseDto.md)
307
+ - [UploadModelSource](truefoundry/ml/autogen/client/docs/UploadModelSource.md)
298
308
  - [Url](truefoundry/ml/autogen/client/docs/Url.md)
299
309
  - [UserMessage](truefoundry/ml/autogen/client/docs/UserMessage.md)
300
310
  - [ValidationError](truefoundry/ml/autogen/client/docs/ValidationError.md)
@@ -1,13 +1,13 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: artifacts.json
3
- # timestamp: 2024-09-12T13:40:36+00:00
3
+ # timestamp: 2024-10-25T06:52:16+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
7
7
  from enum import Enum
8
8
  from typing import Any, Dict, List, Literal, Optional, Union
9
9
 
10
- from truefoundry.pydantic_v1 import BaseModel, Field, constr
10
+ from truefoundry.pydantic_v1 import BaseModel, Field, conint, constr
11
11
 
12
12
 
13
13
  class Agent(BaseModel):
@@ -49,6 +49,17 @@ class AgentWithFQN(Agent):
49
49
  fqn: str
50
50
 
51
51
 
52
+ class BaseArtifactVersion(BaseModel):
53
+ description: Optional[constr(max_length=512)] = Field(
54
+ None,
55
+ description="+label=Description\n+docs=Description of the artifact version",
56
+ )
57
+ metadata: Dict[str, Any] = Field(
58
+ ...,
59
+ description="+label=Metadata\n+docs=Metadata for the model version\n+usage=Metadata for the model version\n+uiType=JsonInput",
60
+ )
61
+
62
+
52
63
  class MimeType(str, Enum):
53
64
  """
54
65
  +label=MIME Type
@@ -78,6 +89,51 @@ class BlobStorageReference(BaseModel):
78
89
  )
79
90
 
80
91
 
92
+ class ExternalModelSource(BaseModel):
93
+ """
94
+ +label=External
95
+ """
96
+
97
+ type: Literal["external"] = Field(
98
+ ...,
99
+ description="+label=Type\n+usage=Type of the source\n+value=external\n+type=External",
100
+ )
101
+ uri: str = Field(..., description="+label=URI\n+usage=URI of the model source")
102
+
103
+
104
+ class FastAIFramework(BaseModel):
105
+ """
106
+ +docs=FastAI framework for the model version
107
+ +label=FastAI
108
+ """
109
+
110
+ type: Literal["fastai"] = Field(
111
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=fastai"
112
+ )
113
+
114
+
115
+ class GluonFramework(BaseModel):
116
+ """
117
+ +docs=Gluon framework for the model version
118
+ +label=Gluon
119
+ """
120
+
121
+ type: Literal["gluon"] = Field(
122
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=gluon"
123
+ )
124
+
125
+
126
+ class H2OFramework(BaseModel):
127
+ """
128
+ +docs=H2O framework for the model version
129
+ +label=H2O
130
+ """
131
+
132
+ type: Literal["h2o"] = Field(
133
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=h2o"
134
+ )
135
+
136
+
81
137
  class ImageUrl(BaseModel):
82
138
  """
83
139
  +label=URL for the image
@@ -108,6 +164,28 @@ class ImageContentPart(BaseModel):
108
164
  )
109
165
 
110
166
 
167
+ class KerasFramework(BaseModel):
168
+ """
169
+ +docs=Keras framework for the model version
170
+ +label=Keras
171
+ """
172
+
173
+ type: Literal["keras"] = Field(
174
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=keras"
175
+ )
176
+
177
+
178
+ class LightGBMFramework(BaseModel):
179
+ """
180
+ +docs=LightGBM framework for the model version
181
+ +label=LightGBM
182
+ """
183
+
184
+ type: Literal["lightgbm"] = Field(
185
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=lightgbm"
186
+ )
187
+
188
+
111
189
  class Parameters(BaseModel):
112
190
  """
113
191
  +usage=Parameters for the provider
@@ -148,6 +226,61 @@ class ModelConfiguration(BaseModel):
148
226
  )
149
227
 
150
228
 
229
+ class PaddleFramework(BaseModel):
230
+ """
231
+ +docs=PaddlePaddle framework for the model version
232
+ +label=Paddle
233
+ """
234
+
235
+ type: Literal["paddle"] = Field(
236
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=paddle"
237
+ )
238
+
239
+
240
+ class PyTorchFramework(BaseModel):
241
+ """
242
+ +docs=PyTorch framework for the model version
243
+ +label=PyTorch
244
+ """
245
+
246
+ type: Literal["pytorch"] = Field(
247
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=pytorch"
248
+ )
249
+
250
+
251
+ class SklearnFramework(BaseModel):
252
+ """
253
+ +docs=Scikit-learn framework for the model version
254
+ +label=Sklearn
255
+ """
256
+
257
+ type: Literal["sklearn"] = Field(
258
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=sklearn"
259
+ )
260
+
261
+
262
+ class SpaCyFramework(BaseModel):
263
+ """
264
+ +docs=spaCy framework for the model version
265
+ +label=SpaCy
266
+ """
267
+
268
+ type: Literal["spacy"] = Field(
269
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=spacy"
270
+ )
271
+
272
+
273
+ class StatsModelsFramework(BaseModel):
274
+ """
275
+ +docs=StatsModels framework for the model version
276
+ +label=StatsModels
277
+ """
278
+
279
+ type: Literal["statsmodels"] = Field(
280
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=statsmodels"
281
+ )
282
+
283
+
151
284
  class SystemMessage(BaseModel):
152
285
  """
153
286
  +usage=System message
@@ -164,6 +297,17 @@ class SystemMessage(BaseModel):
164
297
  )
165
298
 
166
299
 
300
+ class TensorFlowFramework(BaseModel):
301
+ """
302
+ +docs=TensorFlow framework for the model version
303
+ +label=TensorFlow
304
+ """
305
+
306
+ type: Literal["tensorflow"] = Field(
307
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=tensorflow"
308
+ )
309
+
310
+
167
311
  class TextContentPart(BaseModel):
168
312
  """
169
313
  +usage=Text content
@@ -174,6 +318,53 @@ class TextContentPart(BaseModel):
174
318
  text: Union[constr(regex=r"^.[\s\S]*$"), BlobStorageReference]
175
319
 
176
320
 
321
+ class LibraryName(str, Enum):
322
+ """
323
+ +label=Library Name
324
+ +usage=Name of the library for the framework
325
+ """
326
+
327
+ transformers = "transformers"
328
+ sentence_transformers = "sentence-transformers"
329
+ diffusers = "diffusers"
330
+
331
+
332
+ class TransformersFramework(BaseModel):
333
+ """
334
+ +docs=Transformers framework for the model version
335
+ +label=Transformers
336
+ +value=transformers
337
+ """
338
+
339
+ type: Literal["transformers"] = Field(
340
+ ...,
341
+ description="+label=Type\n+usage=Type of the framework\n+value=transformers",
342
+ )
343
+ library_name: Optional[LibraryName] = Field(
344
+ "transformers",
345
+ description="+label=Library Name\n+usage=Name of the library for the framework",
346
+ )
347
+ pipeline_tag: Optional[str] = Field(
348
+ None,
349
+ description="+label=Pipeline Tag\n+usage=Pipeline tag\n+docs=Pipeline tag for the framework",
350
+ )
351
+
352
+
353
+ class TruefoundryModelSource(BaseModel):
354
+ """
355
+ +usage=Source for the Model
356
+ +label=Upload
357
+ """
358
+
359
+ type: Literal["truefoundry"] = Field(
360
+ ...,
361
+ description="+usage=Type of the source\n+type=Upload\n+value=truefoundry\n+label=Upload",
362
+ )
363
+ uri: str = Field(
364
+ ..., description='+label=URI\n+uiType=UploadInput\n+uiProps={"hideClear":true}'
365
+ )
366
+
367
+
177
368
  class UserMessage(BaseModel):
178
369
  """
179
370
  +usage=User message
@@ -194,6 +385,17 @@ class UserMessage(BaseModel):
194
385
  )
195
386
 
196
387
 
388
+ class XGBoostFramework(BaseModel):
389
+ """
390
+ +docs=XGBoost framework for the model version
391
+ +label=XGBoost
392
+ """
393
+
394
+ type: Literal["xgboost"] = Field(
395
+ ..., description="+label=Type\n+usage=Type of the framework\n+value=xgboost"
396
+ )
397
+
398
+
197
399
  class AgentOpenAPITool(BaseModel):
198
400
  type: Literal["openapi-tool"] = Field(..., description="+value=openapi-tool")
199
401
  name: constr(regex=r"^[a-zA-Z][a-zA-Z0-9\-]{1,30}[a-zA-Z0-9]$") = Field(
@@ -275,6 +477,36 @@ class ChatPrompt(BasePrompt):
275
477
  )
276
478
 
277
479
 
480
+ class ModelVersion(BaseArtifactVersion):
481
+ type: Literal["model-version"] = Field(
482
+ ..., description='+label=Type\n+usage=Model Version\n+value="model-version"'
483
+ )
484
+ source: Union[TruefoundryModelSource, ExternalModelSource] = Field(
485
+ ...,
486
+ description="+label=Model Source\n+usage=Source for the model version\n+uiType=Group",
487
+ )
488
+ framework: Optional[
489
+ Union[
490
+ TransformersFramework,
491
+ TensorFlowFramework,
492
+ SklearnFramework,
493
+ PyTorchFramework,
494
+ KerasFramework,
495
+ XGBoostFramework,
496
+ LightGBMFramework,
497
+ FastAIFramework,
498
+ H2OFramework,
499
+ SpaCyFramework,
500
+ StatsModelsFramework,
501
+ GluonFramework,
502
+ PaddleFramework,
503
+ ]
504
+ ] = Field(
505
+ None, description="+label=Framework\n+usage=Framework for the model version"
506
+ )
507
+ step: conint(ge=0) = Field(0, description="+label=Step")
508
+
509
+
278
510
  class AgentApp(BaseModel):
279
511
  type: Literal["agent-app"] = Field(..., description="+value=agent-app")
280
512
  tools: List[AgentOpenAPIToolWithFQN]
@@ -282,5 +514,5 @@ class AgentApp(BaseModel):
282
514
  root_agent: constr(min_length=1)
283
515
 
284
516
 
285
- class Artifacts(BaseModel):
286
- __root__: Union[ChatPrompt, AgentOpenAPITool, Agent, AgentApp]
517
+ class ArtifactsVersion(BaseModel):
518
+ __root__: Union[ChatPrompt, AgentOpenAPITool, Agent, AgentApp, ModelVersion]
@@ -335,7 +335,6 @@ class MlFoundry:
335
335
  tags.update(_get_internal_env_vars_values())
336
336
  _run = self._runs_api.create_run_post(
337
337
  CreateRunRequestDto(
338
- user_id="unknown", # This does not matter, because on server we use the id from token
339
338
  start_time=int(
340
339
  time.time() * 1000
341
340
  ), # TODO (chiragjn): computing start time should be on server side!
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.4.4rc9
3
+ Version: 0.4.4rc11
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com