Commit 1930b4e
feat: add bigframes.ml.compose.SQLScalarColumnTransformer to create custom SQL-based transformations (#955)
* Add support for custom transformers (not ML.) in ColumnTransformer.
* allow numbers in Custom-Transformer-IDs.
* comment was moved to the end of the sql.
* Do not offer the feedback link for missing custom transformers.
* cleanup typing hints.
* Add unit tests for CustomTransformer.
* added unit tests for _extract_output_names() and _compile_to_sql().
* run black and flake8 linter.
* fixed wrong @classmethod annotation.
* on the way to SQLScalarColumnTransformer
* remove pytest.main call.
* remove CustomTransformer class and implementations.
* fix typing.
* fix typing.
* fixed mock typing.
* replace _NameClass.
* black formating.
* add traget_column as input_column with a "?" prefix
when parsing SQLScalarColumnTransformer from sql.
* reformatted with black version 22.3.0.
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* remove eclipse project files
* SQLScalarColumnTransformer needs not to be inherited from
base.BaseTransformer.
* remove filter for "ML." sqls in _extract_output_names() of
BaseTransformer
* introduced type hint SingleColTransformer
for transformers contained in ColumnTransformer
* make sql and target_column private in SQLScalarColumnTransformer
* Add documentation for SQLScalarColumnTransformer.
* add first system test for SQLScalarColumnTransformer.
* SQLScalarColumnTransformer system tests for fit-transform and save-load
* make SQLScalarColumnTransformer comparable (equals) for comparing sets
in tests
* implement hash and eq (copied from BaseTransformer)
* undo accidentally checked in files
* remove eclipse settings accidentally checked in.
* fix docs.
* Update bigframes/ml/compose.py
* Update bigframes/ml/compose.py
* add support for flexible column names.
* remove main.
* add system test for output column with flexible column name
* system tests: add new flexible output column to check-df-schema.
* Apply suggestions from code review
---------
Co-authored-by: Ferenc Hechler <ferenc.hechler@telekom.de>
Co-authored-by: Tim Sweña (Swast) <swast@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>1 parent 3c54399 commit 1930b4e
File tree
4 files changed
+633
-14
lines changed- bigframes/ml
- tests
- system/large/ml
- unit/ml
4 files changed
+633
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 201 | | |
206 | 202 | | |
207 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
49 | 144 | | |
50 | 145 | | |
51 | 146 | | |
| |||
60 | 155 | | |
61 | 156 | | |
62 | 157 | | |
63 | | - | |
| 158 | + | |
64 | 159 | | |
65 | 160 | | |
66 | 161 | | |
| |||
78 | 173 | | |
79 | 174 | | |
80 | 175 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 176 | + | |
84 | 177 | | |
85 | 178 | | |
86 | 179 | | |
87 | 180 | | |
88 | | - | |
| 181 | + | |
89 | 182 | | |
90 | 183 | | |
91 | 184 | | |
| |||
103 | 196 | | |
104 | 197 | | |
105 | 198 | | |
| 199 | + | |
| 200 | + | |
106 | 201 | | |
107 | 202 | | |
108 | 203 | | |
| |||
114 | 209 | | |
115 | 210 | | |
116 | 211 | | |
117 | | - | |
| 212 | + | |
118 | 213 | | |
119 | 214 | | |
120 | 215 | | |
| |||
130 | 225 | | |
131 | 226 | | |
132 | 227 | | |
133 | | - | |
134 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
135 | 233 | | |
136 | 234 | | |
137 | 235 | | |
| |||
148 | 246 | | |
149 | 247 | | |
150 | 248 | | |
151 | | - | |
152 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
153 | 265 | | |
154 | 266 | | |
155 | 267 | | |
| |||
167 | 279 | | |
168 | 280 | | |
169 | 281 | | |
| 282 | + | |
| 283 | + | |
170 | 284 | | |
171 | 285 | | |
172 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
39 | 65 | | |
40 | 66 | | |
41 | 67 | | |
| |||
51 | 77 | | |
52 | 78 | | |
53 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
54 | 86 | | |
55 | 87 | | |
56 | 88 | | |
| |||
70 | 102 | | |
71 | 103 | | |
72 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
73 | 118 | | |
74 | 119 | | |
75 | 120 | | |
| |||
83 | 128 | | |
84 | 129 | | |
85 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
86 | 134 | | |
87 | 135 | | |
88 | 136 | | |
| |||
102 | 150 | | |
103 | 151 | | |
104 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
105 | 174 | | |
106 | 175 | | |
107 | 176 | | |
| |||
122 | 191 | | |
123 | 192 | | |
124 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
125 | 224 | | |
126 | 225 | | |
127 | 226 | | |
| |||
136 | 235 | | |
137 | 236 | | |
138 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
139 | 242 | | |
140 | 243 | | |
141 | 244 | | |
| |||
0 commit comments