aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py')
-rw-r--r--.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py b/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py
new file mode 100644
index 00000000..aef98cca
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/azure/ai/ml/_schema/component/automl_component.py
@@ -0,0 +1,23 @@
+# ---------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# ---------------------------------------------------------
+from azure.ai.ml._restclient.v2022_10_01_preview.models import TaskType
+from azure.ai.ml._schema.component.component import ComponentSchema
+from azure.ai.ml._schema.core.fields import StringTransformedEnum
+from azure.ai.ml._utils.utils import camel_to_snake
+from azure.ai.ml.constants import JobType
+
+
+class AutoMLComponentSchema(ComponentSchema):
+ """AutoMl component schema.
+
+ Only has type & task property with basic component properties. No inputs & outputs are allowed.
+ """
+
+ type = StringTransformedEnum(required=True, allowed_values=JobType.AUTOML)
+ task = StringTransformedEnum(
+ # TODO: verify if this works
+ allowed_values=[t for t in TaskType], # pylint: disable=unnecessary-comprehension
+ casing_transform=camel_to_snake,
+ required=True,
+ )