truefoundry 0.4.5__py3-none-any.whl → 0.5.0rc1__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.
- truefoundry/ml/__init__.py +36 -0
- truefoundry/ml/autogen/client/__init__.py +29 -6
- truefoundry/ml/autogen/client/api/__init__.py +3 -3
- truefoundry/ml/autogen/client/api/deprecated_api.py +7 -7
- truefoundry/ml/autogen/client/api/generate_code_snippet_api.py +526 -0
- truefoundry/ml/autogen/client/models/__init__.py +26 -3
- truefoundry/ml/autogen/client/models/command.py +152 -0
- truefoundry/ml/autogen/client/models/create_workflow_task_config_request_dto.py +72 -0
- truefoundry/ml/autogen/client/models/external_model_source.py +3 -2
- truefoundry/ml/autogen/client/models/fast_ai_framework.py +75 -0
- truefoundry/ml/autogen/client/models/framework.py +250 -14
- truefoundry/ml/autogen/client/models/gluon_framework.py +74 -0
- truefoundry/ml/autogen/client/models/{upload_model_source.py → h2_o_framework.py} +11 -11
- truefoundry/ml/autogen/client/models/keras_framework.py +74 -0
- truefoundry/ml/autogen/client/models/light_gbm_framework.py +75 -0
- truefoundry/ml/autogen/client/models/model_version_manifest.py +1 -1
- truefoundry/ml/autogen/client/models/onnx_framework.py +74 -0
- truefoundry/ml/autogen/client/models/paddle_framework.py +75 -0
- truefoundry/ml/autogen/client/models/py_torch_framework.py +75 -0
- truefoundry/ml/autogen/client/models/sklearn_framework.py +75 -0
- truefoundry/ml/autogen/client/models/source.py +9 -32
- truefoundry/ml/autogen/client/models/spa_cy_framework.py +74 -0
- truefoundry/ml/autogen/client/models/stats_models_framework.py +75 -0
- truefoundry/ml/autogen/client/models/{tensorflow_framework.py → tensor_flow_framework.py} +10 -9
- truefoundry/ml/autogen/client/models/transformers_framework.py +3 -2
- truefoundry/ml/autogen/client/models/trigger_job_run_config_request_dto.py +90 -0
- truefoundry/ml/autogen/client/models/trigger_job_run_config_response_dto.py +71 -0
- truefoundry/ml/autogen/client/models/truefoundry_model_source.py +5 -3
- truefoundry/ml/autogen/client/models/xg_boost_framework.py +75 -0
- truefoundry/ml/autogen/client_README.md +22 -5
- truefoundry/ml/autogen/entities/artifacts.py +19 -2
- truefoundry/ml/log_types/artifacts/model.py +167 -177
- truefoundry/ml/mlfoundry_api.py +47 -18
- truefoundry/ml/mlfoundry_run.py +27 -12
- truefoundry/ml/model_framework.py +169 -0
- {truefoundry-0.4.5.dist-info → truefoundry-0.5.0rc1.dist-info}/METADATA +1 -1
- {truefoundry-0.4.5.dist-info → truefoundry-0.5.0rc1.dist-info}/RECORD +39 -23
- truefoundry/ml/autogen/client/api/python_deployment_config_api.py +0 -201
- {truefoundry-0.4.5.dist-info → truefoundry-0.5.0rc1.dist-info}/WHEEL +0 -0
- {truefoundry-0.4.5.dist-info → truefoundry-0.5.0rc1.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 SpaCyFramework(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
+docs=spaCy framework for the model version +label=SpaCy # noqa: E501
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
type: StrictStr = Field(
|
|
29
|
+
default=..., description="+label=Type +usage=Type of the framework +value=spacy"
|
|
30
|
+
)
|
|
31
|
+
__properties = ["type"]
|
|
32
|
+
|
|
33
|
+
@validator("type")
|
|
34
|
+
def type_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in ("spacy"):
|
|
37
|
+
raise ValueError("must be one of enum values ('spacy')")
|
|
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) -> SpaCyFramework:
|
|
56
|
+
"""Create an instance of SpaCyFramework 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) -> SpaCyFramework:
|
|
66
|
+
"""Create an instance of SpaCyFramework from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return SpaCyFramework.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = SpaCyFramework.parse_obj({"type": obj.get("type")})
|
|
74
|
+
return _obj
|
|
@@ -0,0 +1,75 @@
|
|
|
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 StatsModelsFramework(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
+docs=StatsModels framework for the model version +label=StatsModels # noqa: E501
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
type: StrictStr = Field(
|
|
29
|
+
default=...,
|
|
30
|
+
description="+label=Type +usage=Type of the framework +value=statsmodels",
|
|
31
|
+
)
|
|
32
|
+
__properties = ["type"]
|
|
33
|
+
|
|
34
|
+
@validator("type")
|
|
35
|
+
def type_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ("statsmodels"):
|
|
38
|
+
raise ValueError("must be one of enum values ('statsmodels')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> StatsModelsFramework:
|
|
57
|
+
"""Create an instance of StatsModelsFramework from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
62
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
63
|
+
return _dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls, obj: dict) -> StatsModelsFramework:
|
|
67
|
+
"""Create an instance of StatsModelsFramework from a dict"""
|
|
68
|
+
if obj is None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if not isinstance(obj, dict):
|
|
72
|
+
return StatsModelsFramework.parse_obj(obj)
|
|
73
|
+
|
|
74
|
+
_obj = StatsModelsFramework.parse_obj({"type": obj.get("type")})
|
|
75
|
+
return _obj
|
|
@@ -20,13 +20,14 @@ import re # noqa: F401
|
|
|
20
20
|
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class
|
|
23
|
+
class TensorFlowFramework(BaseModel):
|
|
24
24
|
"""
|
|
25
|
-
+docs=
|
|
25
|
+
+docs=TensorFlow framework for the model version +label=TensorFlow # noqa: E501
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
type: StrictStr = Field(
|
|
29
|
-
default=...,
|
|
29
|
+
default=...,
|
|
30
|
+
description="+label=Type +usage=Type of the framework +value=tensorflow",
|
|
30
31
|
)
|
|
31
32
|
__properties = ["type"]
|
|
32
33
|
|
|
@@ -52,8 +53,8 @@ class TensorflowFramework(BaseModel):
|
|
|
52
53
|
return json.dumps(self.to_dict())
|
|
53
54
|
|
|
54
55
|
@classmethod
|
|
55
|
-
def from_json(cls, json_str: str) ->
|
|
56
|
-
"""Create an instance of
|
|
56
|
+
def from_json(cls, json_str: str) -> TensorFlowFramework:
|
|
57
|
+
"""Create an instance of TensorFlowFramework from a JSON string"""
|
|
57
58
|
return cls.from_dict(json.loads(json_str))
|
|
58
59
|
|
|
59
60
|
def to_dict(self):
|
|
@@ -62,13 +63,13 @@ class TensorflowFramework(BaseModel):
|
|
|
62
63
|
return _dict
|
|
63
64
|
|
|
64
65
|
@classmethod
|
|
65
|
-
def from_dict(cls, obj: dict) ->
|
|
66
|
-
"""Create an instance of
|
|
66
|
+
def from_dict(cls, obj: dict) -> TensorFlowFramework:
|
|
67
|
+
"""Create an instance of TensorFlowFramework from a dict"""
|
|
67
68
|
if obj is None:
|
|
68
69
|
return None
|
|
69
70
|
|
|
70
71
|
if not isinstance(obj, dict):
|
|
71
|
-
return
|
|
72
|
+
return TensorFlowFramework.parse_obj(obj)
|
|
72
73
|
|
|
73
|
-
_obj =
|
|
74
|
+
_obj = TensorFlowFramework.parse_obj({"type": obj.get("type")})
|
|
74
75
|
return _obj
|
|
@@ -24,11 +24,12 @@ 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 +
|
|
27
|
+
+docs=Transformers framework for the model version +label=Transformers +value=transformers # noqa: E501
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
30
|
type: StrictStr = Field(
|
|
31
|
-
default=...,
|
|
31
|
+
default=...,
|
|
32
|
+
description="+label=Type +usage=Type of the framework +value=transformers",
|
|
32
33
|
)
|
|
33
34
|
library_name: Optional[LibraryName] = Field(
|
|
34
35
|
default=None,
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
from typing import Dict, Optional
|
|
20
|
+
|
|
21
|
+
from truefoundry.ml.autogen.client.models.command import Command
|
|
22
|
+
from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class TriggerJobRunConfigRequestDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
TriggerJobRunConfigRequestDto
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
control_plane_url: StrictStr = Field(...)
|
|
31
|
+
application_fqn: StrictStr = Field(...)
|
|
32
|
+
application_id: StrictStr = Field(...)
|
|
33
|
+
command: Optional[Command] = None
|
|
34
|
+
params: Optional[Dict[str, StrictStr]] = None
|
|
35
|
+
__properties = [
|
|
36
|
+
"control_plane_url",
|
|
37
|
+
"application_fqn",
|
|
38
|
+
"application_id",
|
|
39
|
+
"command",
|
|
40
|
+
"params",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
"""Pydantic configuration"""
|
|
45
|
+
|
|
46
|
+
allow_population_by_field_name = True
|
|
47
|
+
validate_assignment = True
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> TriggerJobRunConfigRequestDto:
|
|
59
|
+
"""Create an instance of TriggerJobRunConfigRequestDto from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
64
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
65
|
+
# override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of command
|
|
66
|
+
if self.command:
|
|
67
|
+
_dict["command"] = self.command.to_dict()
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> TriggerJobRunConfigRequestDto:
|
|
72
|
+
"""Create an instance of TriggerJobRunConfigRequestDto from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return TriggerJobRunConfigRequestDto.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
_obj = TriggerJobRunConfigRequestDto.parse_obj(
|
|
80
|
+
{
|
|
81
|
+
"control_plane_url": obj.get("control_plane_url"),
|
|
82
|
+
"application_fqn": obj.get("application_fqn"),
|
|
83
|
+
"application_id": obj.get("application_id"),
|
|
84
|
+
"command": Command.from_dict(obj.get("command"))
|
|
85
|
+
if obj.get("command") is not None
|
|
86
|
+
else None,
|
|
87
|
+
"params": obj.get("params"),
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
return _obj
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class TriggerJobRunConfigResponseDto(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
TriggerJobRunConfigResponseDto
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
python_code_snippet: StrictStr = Field(...)
|
|
29
|
+
curl_code_snippet: StrictStr = Field(...)
|
|
30
|
+
__properties = ["python_code_snippet", "curl_code_snippet"]
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
"""Pydantic configuration"""
|
|
34
|
+
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> TriggerJobRunConfigResponseDto:
|
|
48
|
+
"""Create an instance of TriggerJobRunConfigResponseDto from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
54
|
+
return _dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls, obj: dict) -> TriggerJobRunConfigResponseDto:
|
|
58
|
+
"""Create an instance of TriggerJobRunConfigResponseDto from a dict"""
|
|
59
|
+
if obj is None:
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
if not isinstance(obj, dict):
|
|
63
|
+
return TriggerJobRunConfigResponseDto.parse_obj(obj)
|
|
64
|
+
|
|
65
|
+
_obj = TriggerJobRunConfigResponseDto.parse_obj(
|
|
66
|
+
{
|
|
67
|
+
"python_code_snippet": obj.get("python_code_snippet"),
|
|
68
|
+
"curl_code_snippet": obj.get("curl_code_snippet"),
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
return _obj
|
|
@@ -22,14 +22,16 @@ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr, validator
|
|
|
22
22
|
|
|
23
23
|
class TruefoundryModelSource(BaseModel):
|
|
24
24
|
"""
|
|
25
|
-
+
|
|
25
|
+
+usage=Source for the Model +label=Upload # noqa: E501
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
type: StrictStr = Field(
|
|
29
|
-
default=...,
|
|
29
|
+
default=...,
|
|
30
|
+
description="+usage=Type of the source +type=Upload +value=truefoundry +label=Upload",
|
|
30
31
|
)
|
|
31
32
|
uri: StrictStr = Field(
|
|
32
|
-
default=...,
|
|
33
|
+
default=...,
|
|
34
|
+
description='+label=URI +uiType=UploadInput +uiProps={"hideClear":true}',
|
|
33
35
|
)
|
|
34
36
|
__properties = ["type", "uri"]
|
|
35
37
|
|
|
@@ -0,0 +1,75 @@
|
|
|
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 XGBoostFramework(BaseModel):
|
|
24
|
+
"""
|
|
25
|
+
+docs=XGBoost framework for the model version +label=XGBoost # noqa: E501
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
type: StrictStr = Field(
|
|
29
|
+
default=...,
|
|
30
|
+
description="+label=Type +usage=Type of the framework +value=xgboost",
|
|
31
|
+
)
|
|
32
|
+
__properties = ["type"]
|
|
33
|
+
|
|
34
|
+
@validator("type")
|
|
35
|
+
def type_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in ("xgboost"):
|
|
38
|
+
raise ValueError("must be one of enum values ('xgboost')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> XGBoostFramework:
|
|
57
|
+
"""Create an instance of XGBoostFramework from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self):
|
|
61
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
62
|
+
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
|
|
63
|
+
return _dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls, obj: dict) -> XGBoostFramework:
|
|
67
|
+
"""Create an instance of XGBoostFramework from a dict"""
|
|
68
|
+
if obj is None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
if not isinstance(obj, dict):
|
|
72
|
+
return XGBoostFramework.parse_obj(obj)
|
|
73
|
+
|
|
74
|
+
_obj = XGBoostFramework.parse_obj({"type": obj.get("type")})
|
|
75
|
+
return _obj
|
|
@@ -5,7 +5,7 @@ The `truefoundry.ml.autogen.client` package is automatically generated by the [O
|
|
|
5
5
|
|
|
6
6
|
- API version: 0.1.0
|
|
7
7
|
- Package version: 0.1.0
|
|
8
|
-
- Generator version: 7.9.0
|
|
8
|
+
- Generator version: 7.9.0
|
|
9
9
|
- Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
|
|
10
10
|
|
|
11
11
|
## Requirements.
|
|
@@ -66,7 +66,7 @@ All URIs are relative to *http://localhost*
|
|
|
66
66
|
Class | Method | HTTP request | Description
|
|
67
67
|
------------ | ------------- | ------------- | -------------
|
|
68
68
|
*AuthApi* | [**get_tenant_id_get**](truefoundry/ml/autogen/client/docs/AuthApi.md#get_tenant_id_get) | **GET** /api/2.0/mlflow/tenant-id | Get Tenant Id
|
|
69
|
-
*DeprecatedApi* | [**
|
|
69
|
+
*DeprecatedApi* | [**get_run_by_name_get_0**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_run_by_name_get_0) | **GET** /api/2.0mlflow/runs/get-by-name | Get Run By Name
|
|
70
70
|
*DeprecatedApi* | [**get_search_runs_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_search_runs_get) | **GET** /api/2.0/preview/mlflow/runs/search | Get Search Runs
|
|
71
71
|
*DeprecatedApi* | [**get_signed_urls_for_dataset_write_deprecated_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_signed_urls_for_dataset_write_deprecated_get) | **GET** /api/2.0/mlflow/mlfoundry-artifacts/datasets/get-signed-urls-for-write | Get Signed Urls For Dataset Write Deprecated
|
|
72
72
|
*ExperimentsApi* | [**create_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#create_experiment_post) | **POST** /api/2.0/mlflow/experiments/create | Create Experiment
|
|
@@ -80,6 +80,9 @@ Class | Method | HTTP request | Description
|
|
|
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
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
|
|
82
82
|
*ExperimentsApi* | [**update_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#update_experiment_post) | **POST** /api/2.0/mlflow/experiments/update | Update Experiment
|
|
83
|
+
*GenerateCodeSnippetApi* | [**generate_py_development_config_post**](truefoundry/ml/autogen/client/docs/GenerateCodeSnippetApi.md#generate_py_development_config_post) | **POST** /api/2.0/mlflow/generate-code-snippet/application | Generate Py Development Config
|
|
84
|
+
*GenerateCodeSnippetApi* | [**trigger_job_run_post**](truefoundry/ml/autogen/client/docs/GenerateCodeSnippetApi.md#trigger_job_run_post) | **POST** /api/2.0/mlflow/generate-code-snippet/trigger-job-run | Trigger Job Run
|
|
85
|
+
*GenerateCodeSnippetApi* | [**trigger_workflow_task_config_post**](truefoundry/ml/autogen/client/docs/GenerateCodeSnippetApi.md#trigger_workflow_task_config_post) | **POST** /api/2.0/mlflow/generate-code-snippet/workflow-task-config | Trigger Workflow Task Config
|
|
83
86
|
*HealthApi* | [**health_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#health_get) | **GET** /health | Health
|
|
84
87
|
*HealthApi* | [**serve_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#serve_get) | **GET** / | Serve
|
|
85
88
|
*MetricsApi* | [**get_metric_history_get**](truefoundry/ml/autogen/client/docs/MetricsApi.md#get_metric_history_get) | **GET** /api/2.0/mlflow/metrics/get-history | Get Metric History
|
|
@@ -129,7 +132,6 @@ Class | Method | HTTP request | Description
|
|
|
129
132
|
*MlfoundryArtifactsApi* | [**update_artifact_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_artifact_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifact-versions/update | Update Artifact Version
|
|
130
133
|
*MlfoundryArtifactsApi* | [**update_dataset_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_dataset_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/datasets/update | Update Dataset
|
|
131
134
|
*MlfoundryArtifactsApi* | [**update_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#update_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/update | Update Model Version
|
|
132
|
-
*PythonDeploymentConfigApi* | [**generate_py_development_config_post**](truefoundry/ml/autogen/client/docs/PythonDeploymentConfigApi.md#generate_py_development_config_post) | **POST** /api/2.0/mlflow/python-deployment-config/generate | Generate Py Development Config
|
|
133
135
|
*RunArtifactsApi* | [**list_run_artifacts_get**](truefoundry/ml/autogen/client/docs/RunArtifactsApi.md#list_run_artifacts_get) | **GET** /api/2.0/mlflow/artifacts/list | List Run Artifacts
|
|
134
136
|
*RunsApi* | [**create_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#create_run_post) | **POST** /api/2.0/mlflow/runs/create | Create Run
|
|
135
137
|
*RunsApi* | [**delete_run_post**](truefoundry/ml/autogen/client/docs/RunsApi.md#delete_run_post) | **POST** /api/2.0/mlflow/runs/delete | Delete Run
|
|
@@ -175,6 +177,7 @@ Class | Method | HTTP request | Description
|
|
|
175
177
|
- [ChatPrompt](truefoundry/ml/autogen/client/docs/ChatPrompt.md)
|
|
176
178
|
- [ChatPromptMessagesInner](truefoundry/ml/autogen/client/docs/ChatPromptMessagesInner.md)
|
|
177
179
|
- [ColumnsDto](truefoundry/ml/autogen/client/docs/ColumnsDto.md)
|
|
180
|
+
- [Command](truefoundry/ml/autogen/client/docs/Command.md)
|
|
178
181
|
- [Content](truefoundry/ml/autogen/client/docs/Content.md)
|
|
179
182
|
- [Content1](truefoundry/ml/autogen/client/docs/Content1.md)
|
|
180
183
|
- [Content2](truefoundry/ml/autogen/client/docs/Content2.md)
|
|
@@ -194,6 +197,7 @@ Class | Method | HTTP request | Description
|
|
|
194
197
|
- [CreatePythonDeploymentConfigResponseDto](truefoundry/ml/autogen/client/docs/CreatePythonDeploymentConfigResponseDto.md)
|
|
195
198
|
- [CreateRunRequestDto](truefoundry/ml/autogen/client/docs/CreateRunRequestDto.md)
|
|
196
199
|
- [CreateRunResponseDto](truefoundry/ml/autogen/client/docs/CreateRunResponseDto.md)
|
|
200
|
+
- [CreateWorkflowTaskConfigRequestDto](truefoundry/ml/autogen/client/docs/CreateWorkflowTaskConfigRequestDto.md)
|
|
197
201
|
- [DatasetDto](truefoundry/ml/autogen/client/docs/DatasetDto.md)
|
|
198
202
|
- [DatasetResponseDto](truefoundry/ml/autogen/client/docs/DatasetResponseDto.md)
|
|
199
203
|
- [DeleteArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/DeleteArtifactVersionsRequestDto.md)
|
|
@@ -207,6 +211,7 @@ Class | Method | HTTP request | Description
|
|
|
207
211
|
- [ExperimentResponseDto](truefoundry/ml/autogen/client/docs/ExperimentResponseDto.md)
|
|
208
212
|
- [ExperimentTagDto](truefoundry/ml/autogen/client/docs/ExperimentTagDto.md)
|
|
209
213
|
- [ExternalModelSource](truefoundry/ml/autogen/client/docs/ExternalModelSource.md)
|
|
214
|
+
- [FastAIFramework](truefoundry/ml/autogen/client/docs/FastAIFramework.md)
|
|
210
215
|
- [FeatureDto](truefoundry/ml/autogen/client/docs/FeatureDto.md)
|
|
211
216
|
- [FeatureValueType](truefoundry/ml/autogen/client/docs/FeatureValueType.md)
|
|
212
217
|
- [FileInfoDto](truefoundry/ml/autogen/client/docs/FileInfoDto.md)
|
|
@@ -224,12 +229,16 @@ Class | Method | HTTP request | Description
|
|
|
224
229
|
- [GetSignedURLsForDatasetReadResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForDatasetReadResponseDto.md)
|
|
225
230
|
- [GetSignedURLsForDatasetWriteResponseDto](truefoundry/ml/autogen/client/docs/GetSignedURLsForDatasetWriteResponseDto.md)
|
|
226
231
|
- [GetTenantIdResponseDto](truefoundry/ml/autogen/client/docs/GetTenantIdResponseDto.md)
|
|
232
|
+
- [GluonFramework](truefoundry/ml/autogen/client/docs/GluonFramework.md)
|
|
233
|
+
- [H2OFramework](truefoundry/ml/autogen/client/docs/H2OFramework.md)
|
|
227
234
|
- [HTTPValidationError](truefoundry/ml/autogen/client/docs/HTTPValidationError.md)
|
|
228
235
|
- [ImageContentPart](truefoundry/ml/autogen/client/docs/ImageContentPart.md)
|
|
229
236
|
- [ImageUrl](truefoundry/ml/autogen/client/docs/ImageUrl.md)
|
|
230
237
|
- [InternalMetadata](truefoundry/ml/autogen/client/docs/InternalMetadata.md)
|
|
238
|
+
- [KerasFramework](truefoundry/ml/autogen/client/docs/KerasFramework.md)
|
|
231
239
|
- [LatestRunLogDto](truefoundry/ml/autogen/client/docs/LatestRunLogDto.md)
|
|
232
240
|
- [LibraryName](truefoundry/ml/autogen/client/docs/LibraryName.md)
|
|
241
|
+
- [LightGBMFramework](truefoundry/ml/autogen/client/docs/LightGBMFramework.md)
|
|
233
242
|
- [ListArtifactVersionsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsRequestDto.md)
|
|
234
243
|
- [ListArtifactVersionsResponseDto](truefoundry/ml/autogen/client/docs/ListArtifactVersionsResponseDto.md)
|
|
235
244
|
- [ListArtifactsRequestDto](truefoundry/ml/autogen/client/docs/ListArtifactsRequestDto.md)
|
|
@@ -269,10 +278,13 @@ Class | Method | HTTP request | Description
|
|
|
269
278
|
- [MultiPartUploadResponseDto](truefoundry/ml/autogen/client/docs/MultiPartUploadResponseDto.md)
|
|
270
279
|
- [MultiPartUploadStorageProvider](truefoundry/ml/autogen/client/docs/MultiPartUploadStorageProvider.md)
|
|
271
280
|
- [NotifyArtifactVersionFailureDto](truefoundry/ml/autogen/client/docs/NotifyArtifactVersionFailureDto.md)
|
|
281
|
+
- [ONNXFramework](truefoundry/ml/autogen/client/docs/ONNXFramework.md)
|
|
272
282
|
- [OpenapiSpec](truefoundry/ml/autogen/client/docs/OpenapiSpec.md)
|
|
283
|
+
- [PaddleFramework](truefoundry/ml/autogen/client/docs/PaddleFramework.md)
|
|
273
284
|
- [ParamDto](truefoundry/ml/autogen/client/docs/ParamDto.md)
|
|
274
285
|
- [Parameters](truefoundry/ml/autogen/client/docs/Parameters.md)
|
|
275
286
|
- [PredictionType](truefoundry/ml/autogen/client/docs/PredictionType.md)
|
|
287
|
+
- [PyTorchFramework](truefoundry/ml/autogen/client/docs/PyTorchFramework.md)
|
|
276
288
|
- [ResolveAgentAppResponseDto](truefoundry/ml/autogen/client/docs/ResolveAgentAppResponseDto.md)
|
|
277
289
|
- [RestoreRunRequestDto](truefoundry/ml/autogen/client/docs/RestoreRunRequestDto.md)
|
|
278
290
|
- [RunDataDto](truefoundry/ml/autogen/client/docs/RunDataDto.md)
|
|
@@ -287,16 +299,21 @@ Class | Method | HTTP request | Description
|
|
|
287
299
|
- [SetExperimentTagRequestDto](truefoundry/ml/autogen/client/docs/SetExperimentTagRequestDto.md)
|
|
288
300
|
- [SetTagRequestDto](truefoundry/ml/autogen/client/docs/SetTagRequestDto.md)
|
|
289
301
|
- [SignedURLDto](truefoundry/ml/autogen/client/docs/SignedURLDto.md)
|
|
302
|
+
- [SklearnFramework](truefoundry/ml/autogen/client/docs/SklearnFramework.md)
|
|
290
303
|
- [Source](truefoundry/ml/autogen/client/docs/Source.md)
|
|
304
|
+
- [SpaCyFramework](truefoundry/ml/autogen/client/docs/SpaCyFramework.md)
|
|
305
|
+
- [StatsModelsFramework](truefoundry/ml/autogen/client/docs/StatsModelsFramework.md)
|
|
291
306
|
- [Stop](truefoundry/ml/autogen/client/docs/Stop.md)
|
|
292
307
|
- [StoreRunLogsRequestDto](truefoundry/ml/autogen/client/docs/StoreRunLogsRequestDto.md)
|
|
293
308
|
- [Subject](truefoundry/ml/autogen/client/docs/Subject.md)
|
|
294
309
|
- [SubjectType](truefoundry/ml/autogen/client/docs/SubjectType.md)
|
|
295
310
|
- [SystemMessage](truefoundry/ml/autogen/client/docs/SystemMessage.md)
|
|
296
|
-
- [
|
|
311
|
+
- [TensorFlowFramework](truefoundry/ml/autogen/client/docs/TensorFlowFramework.md)
|
|
297
312
|
- [Text](truefoundry/ml/autogen/client/docs/Text.md)
|
|
298
313
|
- [TextContentPart](truefoundry/ml/autogen/client/docs/TextContentPart.md)
|
|
299
314
|
- [TransformersFramework](truefoundry/ml/autogen/client/docs/TransformersFramework.md)
|
|
315
|
+
- [TriggerJobRunConfigRequestDto](truefoundry/ml/autogen/client/docs/TriggerJobRunConfigRequestDto.md)
|
|
316
|
+
- [TriggerJobRunConfigResponseDto](truefoundry/ml/autogen/client/docs/TriggerJobRunConfigResponseDto.md)
|
|
300
317
|
- [TruefoundryModelSource](truefoundry/ml/autogen/client/docs/TruefoundryModelSource.md)
|
|
301
318
|
- [UpdateArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateArtifactVersionRequestDto.md)
|
|
302
319
|
- [UpdateDatasetRequestDto](truefoundry/ml/autogen/client/docs/UpdateDatasetRequestDto.md)
|
|
@@ -304,11 +321,11 @@ Class | Method | HTTP request | Description
|
|
|
304
321
|
- [UpdateModelVersionRequestDto](truefoundry/ml/autogen/client/docs/UpdateModelVersionRequestDto.md)
|
|
305
322
|
- [UpdateRunRequestDto](truefoundry/ml/autogen/client/docs/UpdateRunRequestDto.md)
|
|
306
323
|
- [UpdateRunResponseDto](truefoundry/ml/autogen/client/docs/UpdateRunResponseDto.md)
|
|
307
|
-
- [UploadModelSource](truefoundry/ml/autogen/client/docs/UploadModelSource.md)
|
|
308
324
|
- [Url](truefoundry/ml/autogen/client/docs/Url.md)
|
|
309
325
|
- [UserMessage](truefoundry/ml/autogen/client/docs/UserMessage.md)
|
|
310
326
|
- [ValidationError](truefoundry/ml/autogen/client/docs/ValidationError.md)
|
|
311
327
|
- [ValidationErrorLocInner](truefoundry/ml/autogen/client/docs/ValidationErrorLocInner.md)
|
|
328
|
+
- [XGBoostFramework](truefoundry/ml/autogen/client/docs/XGBoostFramework.md)
|
|
312
329
|
|
|
313
330
|
|
|
314
331
|
<a id="documentation-for-authorization"></a>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: artifacts.json
|
|
3
|
-
# timestamp: 2024-10-
|
|
3
|
+
# timestamp: 2024-10-30T07:36:31+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
@@ -226,6 +226,17 @@ class ModelConfiguration(BaseModel):
|
|
|
226
226
|
)
|
|
227
227
|
|
|
228
228
|
|
|
229
|
+
class ONNXFramework(BaseModel):
|
|
230
|
+
"""
|
|
231
|
+
+docs=ONNX framework for the model version
|
|
232
|
+
+label=ONNX
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
type: Literal["onnx"] = Field(
|
|
236
|
+
..., description="+label=Type\n+usage=Type of the framework\n+value=onnx"
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
229
240
|
class PaddleFramework(BaseModel):
|
|
230
241
|
"""
|
|
231
242
|
+docs=PaddlePaddle framework for the model version
|
|
@@ -348,6 +359,10 @@ class TransformersFramework(BaseModel):
|
|
|
348
359
|
None,
|
|
349
360
|
description="+label=Pipeline Tag\n+usage=Pipeline tag\n+docs=Pipeline tag for the framework",
|
|
350
361
|
)
|
|
362
|
+
base_model: Optional[str] = Field(
|
|
363
|
+
None,
|
|
364
|
+
description="+label=Base Model\n+usage=Base model\n+docs=Base model Id. If this is a finetuned model, this points to the base model used for finetuning",
|
|
365
|
+
)
|
|
351
366
|
|
|
352
367
|
|
|
353
368
|
class TruefoundryModelSource(BaseModel):
|
|
@@ -361,7 +376,8 @@ class TruefoundryModelSource(BaseModel):
|
|
|
361
376
|
description="+usage=Type of the source\n+type=Upload\n+value=truefoundry\n+label=Upload",
|
|
362
377
|
)
|
|
363
378
|
uri: str = Field(
|
|
364
|
-
...,
|
|
379
|
+
...,
|
|
380
|
+
description='+label=URI\n+uiType=ModelUploadInput\n+uiProps={"hideClear":true}',
|
|
365
381
|
)
|
|
366
382
|
|
|
367
383
|
|
|
@@ -496,6 +512,7 @@ class ModelVersion(BaseArtifactVersion):
|
|
|
496
512
|
LightGBMFramework,
|
|
497
513
|
FastAIFramework,
|
|
498
514
|
H2OFramework,
|
|
515
|
+
ONNXFramework,
|
|
499
516
|
SpaCyFramework,
|
|
500
517
|
StatsModelsFramework,
|
|
501
518
|
GluonFramework,
|