truefoundry 0.5.0rc5__py3-none-any.whl → 0.5.0rc6__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 (52) hide show
  1. truefoundry/ml/autogen/client/__init__.py +0 -4
  2. truefoundry/ml/autogen/client/api/deprecated_api.py +340 -7
  3. truefoundry/ml/autogen/client/api/mlfoundry_artifacts_api.py +0 -322
  4. truefoundry/ml/autogen/client/api_client.py +8 -1
  5. truefoundry/ml/autogen/client/models/__init__.py +0 -4
  6. truefoundry/ml/autogen/client/models/add_features_to_model_version_request_dto.py +3 -17
  7. truefoundry/ml/autogen/client/models/agent.py +1 -1
  8. truefoundry/ml/autogen/client/models/agent_app.py +1 -1
  9. truefoundry/ml/autogen/client/models/agent_open_api_tool.py +1 -1
  10. truefoundry/ml/autogen/client/models/agent_open_api_tool_with_fqn.py +1 -1
  11. truefoundry/ml/autogen/client/models/agent_with_fqn.py +1 -1
  12. truefoundry/ml/autogen/client/models/artifact_version_manifest.py +1 -1
  13. truefoundry/ml/autogen/client/models/assistant_message.py +1 -1
  14. truefoundry/ml/autogen/client/models/blob_storage_reference.py +1 -1
  15. truefoundry/ml/autogen/client/models/chat_prompt.py +1 -1
  16. truefoundry/ml/autogen/client/models/external_artifact_source.py +1 -1
  17. truefoundry/ml/autogen/client/models/fast_ai_framework.py +1 -1
  18. truefoundry/ml/autogen/client/models/gluon_framework.py +1 -1
  19. truefoundry/ml/autogen/client/models/h2_o_framework.py +1 -1
  20. truefoundry/ml/autogen/client/models/image_content_part.py +1 -1
  21. truefoundry/ml/autogen/client/models/keras_framework.py +1 -1
  22. truefoundry/ml/autogen/client/models/light_gbm_framework.py +1 -1
  23. truefoundry/ml/autogen/client/models/model_version_dto.py +7 -8
  24. truefoundry/ml/autogen/client/models/model_version_manifest.py +1 -1
  25. truefoundry/ml/autogen/client/models/onnx_framework.py +1 -1
  26. truefoundry/ml/autogen/client/models/paddle_framework.py +1 -1
  27. truefoundry/ml/autogen/client/models/py_torch_framework.py +1 -1
  28. truefoundry/ml/autogen/client/models/sklearn_framework.py +1 -1
  29. truefoundry/ml/autogen/client/models/spa_cy_framework.py +1 -1
  30. truefoundry/ml/autogen/client/models/stats_models_framework.py +1 -1
  31. truefoundry/ml/autogen/client/models/system_message.py +1 -1
  32. truefoundry/ml/autogen/client/models/tensor_flow_framework.py +1 -1
  33. truefoundry/ml/autogen/client/models/text_content_part.py +1 -1
  34. truefoundry/ml/autogen/client/models/transformers_framework.py +1 -1
  35. truefoundry/ml/autogen/client/models/true_foundry_artifact_source.py +1 -1
  36. truefoundry/ml/autogen/client/models/update_model_version_request_dto.py +1 -13
  37. truefoundry/ml/autogen/client/models/user_message.py +1 -1
  38. truefoundry/ml/autogen/client/models/xg_boost_framework.py +1 -1
  39. truefoundry/ml/autogen/client_README.md +4 -8
  40. truefoundry/ml/autogen/models/__init__.py +4 -0
  41. truefoundry/ml/autogen/models/exceptions.py +30 -0
  42. truefoundry/ml/autogen/models/schema.py +1547 -0
  43. truefoundry/ml/autogen/models/signature.py +139 -0
  44. truefoundry/ml/autogen/models/utils.py +699 -0
  45. {truefoundry-0.5.0rc5.dist-info → truefoundry-0.5.0rc6.dist-info}/METADATA +1 -1
  46. {truefoundry-0.5.0rc5.dist-info → truefoundry-0.5.0rc6.dist-info}/RECORD +48 -47
  47. truefoundry/ml/autogen/client/models/feature_dto.py +0 -68
  48. truefoundry/ml/autogen/client/models/feature_value_type.py +0 -35
  49. truefoundry/ml/autogen/client/models/model_schema_dto.py +0 -85
  50. truefoundry/ml/autogen/client/models/prediction_type.py +0 -34
  51. {truefoundry-0.5.0rc5.dist-info → truefoundry-0.5.0rc6.dist-info}/WHEEL +0 -0
  52. {truefoundry-0.5.0rc5.dist-info → truefoundry-0.5.0rc6.dist-info}/entry_points.txt +0 -0
@@ -26,7 +26,6 @@ from truefoundry.ml.autogen.client.models.artifact_version_status import (
26
26
  ArtifactVersionStatus,
27
27
  )
28
28
  from truefoundry.ml.autogen.client.models.metric_dto import MetricDto
29
- from truefoundry.ml.autogen.client.models.model_schema_dto import ModelSchemaDto
30
29
  from truefoundry.ml.autogen.client.models.model_version_manifest import (
31
30
  ModelVersionManifest,
32
31
  )
@@ -58,7 +57,7 @@ class ModelVersionDto(BaseModel):
58
57
  step: Optional[StrictInt] = 0
59
58
  created_by: Optional[StrictStr] = None
60
59
  created_by_subject: Subject = Field(...)
61
- model_schema: Optional[ModelSchemaDto] = None
60
+ model_schema: Optional[Dict[str, Any]] = None
62
61
  custom_metrics: Optional[conlist(Dict[str, Any])] = None
63
62
  created_at: Optional[datetime] = None
64
63
  updated_at: Optional[datetime] = None
@@ -73,6 +72,7 @@ class ModelVersionDto(BaseModel):
73
72
  artifact_size: Optional[StrictInt] = None
74
73
  manifest: Optional[ModelVersionManifest] = None
75
74
  serialization_format: ArtifactVersionSerializationFormat = Field(...)
75
+ deployable: Optional[StrictBool] = False
76
76
  __properties = [
77
77
  "id",
78
78
  "model_id",
@@ -101,6 +101,7 @@ class ModelVersionDto(BaseModel):
101
101
  "artifact_size",
102
102
  "manifest",
103
103
  "serialization_format",
104
+ "deployable",
104
105
  ]
105
106
 
106
107
  class Config:
@@ -128,9 +129,6 @@ class ModelVersionDto(BaseModel):
128
129
  # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of created_by_subject
129
130
  if self.created_by_subject:
130
131
  _dict["created_by_subject"] = self.created_by_subject.to_dict()
131
- # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of model_schema
132
- if self.model_schema:
133
- _dict["model_schema"] = self.model_schema.to_dict()
134
132
  # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of each item in metrics (list)
135
133
  _items = []
136
134
  if self.metrics:
@@ -168,9 +166,7 @@ class ModelVersionDto(BaseModel):
168
166
  "created_by_subject": Subject.from_dict(obj.get("created_by_subject"))
169
167
  if obj.get("created_by_subject") is not None
170
168
  else None,
171
- "model_schema": ModelSchemaDto.from_dict(obj.get("model_schema"))
172
- if obj.get("model_schema") is not None
173
- else None,
169
+ "model_schema": obj.get("model_schema"),
174
170
  "custom_metrics": obj.get("custom_metrics"),
175
171
  "created_at": obj.get("created_at"),
176
172
  "updated_at": obj.get("updated_at"),
@@ -191,6 +187,9 @@ class ModelVersionDto(BaseModel):
191
187
  if obj.get("manifest") is not None
192
188
  else None,
193
189
  "serialization_format": obj.get("serialization_format"),
190
+ "deployable": obj.get("deployable")
191
+ if obj.get("deployable") is not None
192
+ else False,
194
193
  }
195
194
  )
196
195
  return _obj
@@ -69,7 +69,7 @@ class ModelVersionManifest(BaseModel):
69
69
  if value is None:
70
70
  return value
71
71
 
72
- if value not in ("model-version"):
72
+ if value not in ("model-version",):
73
73
  raise ValueError("must be one of enum values ('model-version')")
74
74
  return value
75
75
 
@@ -33,7 +33,7 @@ class ONNXFramework(BaseModel):
33
33
  @validator("type")
34
34
  def type_validate_enum(cls, value):
35
35
  """Validates the enum"""
36
- if value not in ("onnx"):
36
+ if value not in ("onnx",):
37
37
  raise ValueError("must be one of enum values ('onnx')")
38
38
  return value
39
39
 
@@ -34,7 +34,7 @@ class PaddleFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("paddle"):
37
+ if value not in ("paddle",):
38
38
  raise ValueError("must be one of enum values ('paddle')")
39
39
  return value
40
40
 
@@ -34,7 +34,7 @@ class PyTorchFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("pytorch"):
37
+ if value not in ("pytorch",):
38
38
  raise ValueError("must be one of enum values ('pytorch')")
39
39
  return value
40
40
 
@@ -34,7 +34,7 @@ class SklearnFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("sklearn"):
37
+ if value not in ("sklearn",):
38
38
  raise ValueError("must be one of enum values ('sklearn')")
39
39
  return value
40
40
 
@@ -33,7 +33,7 @@ class SpaCyFramework(BaseModel):
33
33
  @validator("type")
34
34
  def type_validate_enum(cls, value):
35
35
  """Validates the enum"""
36
- if value not in ("spacy"):
36
+ if value not in ("spacy",):
37
37
  raise ValueError("must be one of enum values ('spacy')")
38
38
  return value
39
39
 
@@ -34,7 +34,7 @@ class StatsModelsFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("statsmodels"):
37
+ if value not in ("statsmodels",):
38
38
  raise ValueError("must be one of enum values ('statsmodels')")
39
39
  return value
40
40
 
@@ -37,7 +37,7 @@ class SystemMessage(BaseModel):
37
37
  @validator("role")
38
38
  def role_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ("system"):
40
+ if value not in ("system",):
41
41
  raise ValueError("must be one of enum values ('system')")
42
42
  return value
43
43
 
@@ -34,7 +34,7 @@ class TensorFlowFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("tensorflow"):
37
+ if value not in ("tensorflow",):
38
38
  raise ValueError("must be one of enum values ('tensorflow')")
39
39
  return value
40
40
 
@@ -33,7 +33,7 @@ class TextContentPart(BaseModel):
33
33
  @validator("type")
34
34
  def type_validate_enum(cls, value):
35
35
  """Validates the enum"""
36
- if value not in ("text"):
36
+ if value not in ("text",):
37
37
  raise ValueError("must be one of enum values ('text')")
38
38
  return value
39
39
 
@@ -48,7 +48,7 @@ class TransformersFramework(BaseModel):
48
48
  @validator("type")
49
49
  def type_validate_enum(cls, value):
50
50
  """Validates the enum"""
51
- if value not in ("transformers"):
51
+ if value not in ("transformers",):
52
52
  raise ValueError("must be one of enum values ('transformers')")
53
53
  return value
54
54
 
@@ -38,7 +38,7 @@ class TrueFoundryArtifactSource(BaseModel):
38
38
  @validator("type")
39
39
  def type_validate_enum(cls, value):
40
40
  """Validates the enum"""
41
- if value not in ("truefoundry"):
41
+ if value not in ("truefoundry",):
42
42
  raise ValueError("must be one of enum values ('truefoundry')")
43
43
  return value
44
44
 
@@ -18,11 +18,10 @@ import pprint
18
18
  import re # noqa: F401
19
19
  from typing import Any, Dict, Optional
20
20
 
21
- from truefoundry.ml.autogen.client.models.model_schema_dto import ModelSchemaDto
22
21
  from truefoundry.ml.autogen.client.models.model_version_manifest import (
23
22
  ModelVersionManifest,
24
23
  )
25
- from truefoundry.pydantic_v1 import BaseModel, Field, StrictBool, StrictStr
24
+ from truefoundry.pydantic_v1 import BaseModel, Field, StrictStr
26
25
 
27
26
 
28
27
  class UpdateModelVersionRequestDto(BaseModel):
@@ -33,16 +32,12 @@ class UpdateModelVersionRequestDto(BaseModel):
33
32
  id: StrictStr = Field(...)
34
33
  description: Optional[StrictStr] = None
35
34
  artifact_metadata: Optional[Dict[str, Any]] = None
36
- model_schema: Optional[ModelSchemaDto] = None
37
- monitoring_enabled: Optional[StrictBool] = None
38
35
  model_framework: Optional[StrictStr] = None
39
36
  manifest: Optional[ModelVersionManifest] = None
40
37
  __properties = [
41
38
  "id",
42
39
  "description",
43
40
  "artifact_metadata",
44
- "model_schema",
45
- "monitoring_enabled",
46
41
  "model_framework",
47
42
  "manifest",
48
43
  ]
@@ -69,9 +64,6 @@ class UpdateModelVersionRequestDto(BaseModel):
69
64
  def to_dict(self):
70
65
  """Returns the dictionary representation of the model using alias"""
71
66
  _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
72
- # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of model_schema
73
- if self.model_schema:
74
- _dict["model_schema"] = self.model_schema.to_dict()
75
67
  # override the default output from truefoundry.pydantic_v1 by calling `to_dict()` of manifest
76
68
  if self.manifest:
77
69
  _dict["manifest"] = self.manifest.to_dict()
@@ -91,10 +83,6 @@ class UpdateModelVersionRequestDto(BaseModel):
91
83
  "id": obj.get("id"),
92
84
  "description": obj.get("description"),
93
85
  "artifact_metadata": obj.get("artifact_metadata"),
94
- "model_schema": ModelSchemaDto.from_dict(obj.get("model_schema"))
95
- if obj.get("model_schema") is not None
96
- else None,
97
- "monitoring_enabled": obj.get("monitoring_enabled"),
98
86
  "model_framework": obj.get("model_framework"),
99
87
  "manifest": ModelVersionManifest.from_dict(obj.get("manifest"))
100
88
  if obj.get("manifest") is not None
@@ -37,7 +37,7 @@ class UserMessage(BaseModel):
37
37
  @validator("role")
38
38
  def role_validate_enum(cls, value):
39
39
  """Validates the enum"""
40
- if value not in ("user"):
40
+ if value not in ("user",):
41
41
  raise ValueError("must be one of enum values ('user')")
42
42
  return value
43
43
 
@@ -34,7 +34,7 @@ class XGBoostFramework(BaseModel):
34
34
  @validator("type")
35
35
  def type_validate_enum(cls, value):
36
36
  """Validates the enum"""
37
- if value not in ("xgboost"):
37
+ if value not in ("xgboost",):
38
38
  raise ValueError("must be one of enum values ('xgboost')")
39
39
  return value
40
40
 
@@ -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.10.0
9
9
  - Build package: org.openapitools.codegen.languages.PythonPydanticV1ClientCodegen
10
10
 
11
11
  ## Requirements.
@@ -66,7 +66,9 @@ 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* | [**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
69
+ *DeprecatedApi* | [**add_custom_metrics_to_model_version_post**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#add_custom_metrics_to_model_version_post) | **POST** /model-versions/custom-metrics/add | Add Custom Metrics To Model Version
70
+ *DeprecatedApi* | [**add_features_to_model_version_post**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#add_features_to_model_version_post) | **POST** /model-versions/features/add | Add Features To Model Version
71
+ *DeprecatedApi* | [**get_run_by_name_get**](truefoundry/ml/autogen/client/docs/DeprecatedApi.md#get_run_by_name_get) | **GET** /api/2.0mlflow/runs/get-by-name | Get Run By Name
70
72
  *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
73
  *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
74
  *ExperimentsApi* | [**create_experiment_post**](truefoundry/ml/autogen/client/docs/ExperimentsApi.md#create_experiment_post) | **POST** /api/2.0/mlflow/experiments/create | Create Experiment
@@ -87,8 +89,6 @@ Class | Method | HTTP request | Description
87
89
  *HealthApi* | [**serve_get**](truefoundry/ml/autogen/client/docs/HealthApi.md#serve_get) | **GET** / | Serve
88
90
  *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
89
91
  *MetricsApi* | [**list_metric_history_post**](truefoundry/ml/autogen/client/docs/MetricsApi.md#list_metric_history_post) | **POST** /api/2.0/mlflow/metrics/list-history | List Metric History
90
- *MlfoundryArtifactsApi* | [**add_custom_metrics_to_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#add_custom_metrics_to_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/custom-metrics/add | Add Custom Metrics To Model Version
91
- *MlfoundryArtifactsApi* | [**add_features_to_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#add_features_to_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/features/add | Add Features To Model Version
92
92
  *MlfoundryArtifactsApi* | [**authorize_user_for_model_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#authorize_user_for_model_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/models/authorize | Authorize User For Model
93
93
  *MlfoundryArtifactsApi* | [**authorize_user_for_model_version_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#authorize_user_for_model_version_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/model-versions/authorize | Authorize User For Model Version
94
94
  *MlfoundryArtifactsApi* | [**create_artifact_post**](truefoundry/ml/autogen/client/docs/MlfoundryArtifactsApi.md#create_artifact_post) | **POST** /api/2.0/mlflow/mlfoundry-artifacts/artifacts/create | Create Artifact
@@ -213,8 +213,6 @@ Class | Method | HTTP request | Description
213
213
  - [ExperimentTagDto](truefoundry/ml/autogen/client/docs/ExperimentTagDto.md)
214
214
  - [ExternalArtifactSource](truefoundry/ml/autogen/client/docs/ExternalArtifactSource.md)
215
215
  - [FastAIFramework](truefoundry/ml/autogen/client/docs/FastAIFramework.md)
216
- - [FeatureDto](truefoundry/ml/autogen/client/docs/FeatureDto.md)
217
- - [FeatureValueType](truefoundry/ml/autogen/client/docs/FeatureValueType.md)
218
216
  - [FileInfoDto](truefoundry/ml/autogen/client/docs/FileInfoDto.md)
219
217
  - [FinalizeArtifactVersionRequestDto](truefoundry/ml/autogen/client/docs/FinalizeArtifactVersionRequestDto.md)
220
218
  - [Framework](truefoundry/ml/autogen/client/docs/Framework.md)
@@ -272,7 +270,6 @@ Class | Method | HTTP request | Description
272
270
  - [ModelConfiguration](truefoundry/ml/autogen/client/docs/ModelConfiguration.md)
273
271
  - [ModelDto](truefoundry/ml/autogen/client/docs/ModelDto.md)
274
272
  - [ModelResponseDto](truefoundry/ml/autogen/client/docs/ModelResponseDto.md)
275
- - [ModelSchemaDto](truefoundry/ml/autogen/client/docs/ModelSchemaDto.md)
276
273
  - [ModelVersionDto](truefoundry/ml/autogen/client/docs/ModelVersionDto.md)
277
274
  - [ModelVersionManifest](truefoundry/ml/autogen/client/docs/ModelVersionManifest.md)
278
275
  - [ModelVersionResponseDto](truefoundry/ml/autogen/client/docs/ModelVersionResponseDto.md)
@@ -285,7 +282,6 @@ Class | Method | HTTP request | Description
285
282
  - [PaddleFramework](truefoundry/ml/autogen/client/docs/PaddleFramework.md)
286
283
  - [ParamDto](truefoundry/ml/autogen/client/docs/ParamDto.md)
287
284
  - [Parameters](truefoundry/ml/autogen/client/docs/Parameters.md)
288
- - [PredictionType](truefoundry/ml/autogen/client/docs/PredictionType.md)
289
285
  - [PyTorchFramework](truefoundry/ml/autogen/client/docs/PyTorchFramework.md)
290
286
  - [ResolveAgentAppResponseDto](truefoundry/ml/autogen/client/docs/ResolveAgentAppResponseDto.md)
291
287
  - [RestoreRunRequestDto](truefoundry/ml/autogen/client/docs/RestoreRunRequestDto.md)
@@ -0,0 +1,4 @@
1
+ from .schema import ColSpec, TensorSpec
2
+ from .signature import ModelSignature, Schema, infer_signature
3
+
4
+ __all__ = ["infer_signature", "ModelSignature", "Schema", "TensorSpec", "ColSpec"]
@@ -0,0 +1,30 @@
1
+ INTERNAL_ERROR = 1
2
+ INVALID_PARAMETER_VALUE = 1000
3
+
4
+
5
+ class MlflowException(Exception):
6
+ """
7
+ Generic exception thrown to surface failure information about external-facing operations.
8
+ The error message associated with this exception may be exposed to clients in HTTP responses
9
+ for debugging purposes. If the error text is sensitive, raise a generic `Exception` object
10
+ instead.
11
+ """
12
+
13
+ def __init__(self, message, error_code=INTERNAL_ERROR, **kwargs):
14
+ """
15
+ :param message: The message describing the error that occured. This will be included in the
16
+ exception's serialized JSON representation.
17
+ :param error_code: An appropriate error code for the error that occured; it will be included
18
+ in the exception's serialized JSON representation. This should be one of
19
+ the codes listed in the `mlflow.protos.databricks_pb2` proto.
20
+ :param kwargs: Additional key-value pairs to include in the serialized JSON representation
21
+ of the MlflowException.
22
+ """
23
+ self.error_code = error_code
24
+ self.message = str(message)
25
+ self.json_kwargs = kwargs
26
+ super().__init__(message)
27
+
28
+ @classmethod
29
+ def invalid_parameter_value(cls, message, **kwargs):
30
+ return cls(message, error_code=INVALID_PARAMETER_VALUE, **kwargs)