|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from typing import Dict, List, Union, Iterable, Optional |
| 5 | +from typing import Dict, Union, Iterable, Optional |
6 | 6 | from typing_extensions import Required, Annotated, TypeAlias, TypedDict |
7 | 7 |
|
| 8 | +from ..._types import SequenceNotStr |
8 | 9 | from ..._utils import PropertyInfo |
9 | 10 |
|
10 | 11 | __all__ = [ |
@@ -60,7 +61,7 @@ class ConfigLlmData(TypedDict, total=False): |
60 | 61 | provided, a unique id is generated by Openlayer. |
61 | 62 | """ |
62 | 63 |
|
63 | | - input_variable_names: Annotated[List[str], PropertyInfo(alias="inputVariableNames")] |
| 64 | + input_variable_names: Annotated[SequenceNotStr[str], PropertyInfo(alias="inputVariableNames")] |
64 | 65 | """Array of input variable names. Each input variable should be a dataset column.""" |
65 | 66 |
|
66 | 67 | latency_column_name: Annotated[str, PropertyInfo(alias="latencyColumnName")] |
@@ -90,19 +91,19 @@ class ConfigLlmData(TypedDict, total=False): |
90 | 91 |
|
91 | 92 |
|
92 | 93 | class ConfigTabularClassificationData(TypedDict, total=False): |
93 | | - class_names: Required[Annotated[List[str], PropertyInfo(alias="classNames")]] |
| 94 | + class_names: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="classNames")]] |
94 | 95 | """List of class names indexed by label integer in the dataset. |
95 | 96 |
|
96 | 97 | E.g. ["Retained", "Exited"] when 0, 1 are in your label column. |
97 | 98 | """ |
98 | 99 |
|
99 | | - categorical_feature_names: Annotated[List[str], PropertyInfo(alias="categoricalFeatureNames")] |
| 100 | + categorical_feature_names: Annotated[SequenceNotStr[str], PropertyInfo(alias="categoricalFeatureNames")] |
100 | 101 | """Array with the names of all categorical features in the dataset. |
101 | 102 |
|
102 | 103 | E.g. ["Age", "Geography"]. |
103 | 104 | """ |
104 | 105 |
|
105 | | - feature_names: Annotated[List[str], PropertyInfo(alias="featureNames")] |
| 106 | + feature_names: Annotated[SequenceNotStr[str], PropertyInfo(alias="featureNames")] |
106 | 107 | """Array with all input feature names.""" |
107 | 108 |
|
108 | 109 | inference_id_column_name: Annotated[str, PropertyInfo(alias="inferenceIdColumnName")] |
@@ -143,13 +144,13 @@ class ConfigTabularClassificationData(TypedDict, total=False): |
143 | 144 |
|
144 | 145 |
|
145 | 146 | class ConfigTabularRegressionData(TypedDict, total=False): |
146 | | - categorical_feature_names: Annotated[List[str], PropertyInfo(alias="categoricalFeatureNames")] |
| 147 | + categorical_feature_names: Annotated[SequenceNotStr[str], PropertyInfo(alias="categoricalFeatureNames")] |
147 | 148 | """Array with the names of all categorical features in the dataset. |
148 | 149 |
|
149 | 150 | E.g. ["Gender", "Geography"]. |
150 | 151 | """ |
151 | 152 |
|
152 | | - feature_names: Annotated[List[str], PropertyInfo(alias="featureNames")] |
| 153 | + feature_names: Annotated[SequenceNotStr[str], PropertyInfo(alias="featureNames")] |
153 | 154 | """Array with all input feature names.""" |
154 | 155 |
|
155 | 156 | inference_id_column_name: Annotated[str, PropertyInfo(alias="inferenceIdColumnName")] |
@@ -180,7 +181,7 @@ class ConfigTabularRegressionData(TypedDict, total=False): |
180 | 181 |
|
181 | 182 |
|
182 | 183 | class ConfigTextClassificationData(TypedDict, total=False): |
183 | | - class_names: Required[Annotated[List[str], PropertyInfo(alias="classNames")]] |
| 184 | + class_names: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="classNames")]] |
184 | 185 | """List of class names indexed by label integer in the dataset. |
185 | 186 |
|
186 | 187 | E.g. ["Retained", "Exited"] when 0, 1 are in your label column. |
|
0 commit comments