tabred 0.1.0__tar.gz

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.
tabred-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
tabred-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,311 @@
1
+ Metadata-Version: 2.3
2
+ Name: tabred
3
+ Version: 0.1.0
4
+ Summary: TabReD: Benchmark of industry-grade tabular datasets
5
+ Author: Ivan Rubachev
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright [yyyy] [name of copyright owner]
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
207
+ Classifier: Intended Audience :: Science/Research
208
+ Classifier: License :: OSI Approved :: Apache Software License
209
+ Classifier: Programming Language :: Python :: 3
210
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
211
+ Requires-Dist: cyclopts>=4.18.0,<5
212
+ Requires-Dist: kaggle>=2.2,<3
213
+ Requires-Dist: kagglesdk>=0.1.30,<0.2
214
+ Requires-Dist: requests>=2.34.2,<3
215
+ Requires-Dist: rich>=15.0.0,<16
216
+ Requires-Python: >=3.12, <4
217
+ Project-URL: Code, https://github.com/yandex-research/tabred
218
+ Project-URL: Documentation, https://github.com/yandex-research/tabred/tree/main/README.md
219
+ Description-Content-Type: text/markdown
220
+
221
+ # TabReD: Analyzing Pitfalls and Filling the Gaps in Tabular Deep Learning Benchmarks
222
+
223
+ :scroll: [arXiv](https://arxiv.org/abs/2406.19380)
224
+ &nbsp; :books: [Other tabular DL projects](https://github.com/yandex-research/rtdl)
225
+
226
+ > [!NOTE]
227
+ > **Download preprocessed TabReD datasets with one command**
228
+ >
229
+ > ```bash
230
+ > uvx tabred download all
231
+ > # or individual datasets with
232
+ > uvx tabred download cooking-time weather
233
+ > ```
234
+ >
235
+ > *You need a Kaggle account and an API token at `~/.kaggle/kaggle.json` for this to work.*
236
+
237
+ TabReD is a collection of eight industry-grade tabular datasets designed to evaluate machine learning methods under more realistic conditions: temporal distribution shift, rich feature sets from feature engineering pipelines, closer aligned with some real world applications of tabular machine learning.
238
+
239
+ <p align="center">
240
+ <img src="assets/about_tabred.png" alt="TabReD overview" width="75%">
241
+ </p>
242
+
243
+ ## Datasets
244
+
245
+ | Dataset | Features | Task | Instances Used | Instances Available | Source |
246
+ | ------------------ | -------- | -------------- | -------------- | ------------------- | ------------------------------------------------------------------------------------------ |
247
+ | Homesite Insurance | 299 | Classification | 260,753 | - | [Competition](https://www.kaggle.com/competitions/homesite-quote-conversion) |
248
+ | Ecom Offers | 119 | Classification | 160,057 | - | [Competition](https://www.kaggle.com/c/acquire-valued-shoppers-challenge) |
249
+ | Homecredit Default | 696 | Classification | 381,664 | 1,526,659 | [Competition](https://www.kaggle.com/competitions/home-credit-credit-risk-model-stability) |
250
+ | Sberbank Housing | 392 | Regression | 28,321 | - | [Competition](https://www.kaggle.com/competitions/sberbank-russian-housing-market) |
251
+ | Cooking Time | 192 | Regression | 319,986 | 12,799,642 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
252
+ | Delivery ETA | 223 | Regression | 416,451 | 17,044,043 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
253
+ | Maps Routing | 986 | Regression | 340,981 | 13,639,272 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
254
+ | Weather | 103 | Regression | 423,795 | 16,951,828 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
255
+ ## Preprocessed data format
256
+
257
+ The downloader unpacks each dataset into its own directory:
258
+
259
+ ```
260
+ data/<dataset>/
261
+ ├── info.json
262
+ ├── x_num.npy
263
+ ├── x_cat.npy # when present
264
+ ├── x_bin.npy # when present
265
+ ├── x_meta.npy
266
+ ├── y.npy
267
+ └── splits/
268
+ ├── default/
269
+ │ ├── train.npy
270
+ │ ├── val.npy
271
+ │ └── test.npy
272
+ ├── random-{0,1,2}/
273
+ │ ├── train.npy
274
+ │ ├── val.npy
275
+ │ └── test.npy
276
+ └── sliding-window-{0,1,2}/
277
+ ├── train.npy
278
+ ├── val.npy
279
+ └── test.npy
280
+ ```
281
+
282
+ The `x_*.npy` files contain feature matrices, `y.npy` contains targets, and
283
+ `info.json` contains task metadata. Split files contain row indices into these
284
+ arrays. The `default` split is the main split from the TabReD paper; the random
285
+ and sliding-window splits are provided for split-strategy studies.
286
+
287
+ ## Repository structure
288
+
289
+ - `src/tabred`: downloader package and CLI.
290
+ - `paper`: code for reproducing the paper
291
+
292
+ ## Rebuilding datasets from raw sources
293
+
294
+ Most users should use the preprocessed downloader above. The preprocessing pipeline is kept in this repository for reproducibility and maintenance, but it is not the recommended way to obtain the benchmark data.
295
+
296
+ > The cleaned-up dataset preparation scripts will be published in a few days (@puhsu 10.07.26). For now consult the previous commits and the preprocessing folder there.
297
+
298
+ ## Citation
299
+
300
+ If you use TabReD, please cite:
301
+
302
+ ```bibtex
303
+ @inproceedings{
304
+ rubachev2025tabred,
305
+ title={TabReD: Analyzing Pitfalls and Filling the Gaps in Tabular Deep Learning Benchmarks},
306
+ author={Ivan Rubachev and Nikolay Kartashev and Yury Gorishniy and Artem Babenko},
307
+ booktitle={The Thirteenth International Conference on Learning Representations},
308
+ year={2025},
309
+ url={https://openreview.net/forum?id=L14sqcrUC3}
310
+ }
311
+ ```
tabred-0.1.0/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # TabReD: Analyzing Pitfalls and Filling the Gaps in Tabular Deep Learning Benchmarks
2
+
3
+ :scroll: [arXiv](https://arxiv.org/abs/2406.19380)
4
+ &nbsp; :books: [Other tabular DL projects](https://github.com/yandex-research/rtdl)
5
+
6
+ > [!NOTE]
7
+ > **Download preprocessed TabReD datasets with one command**
8
+ >
9
+ > ```bash
10
+ > uvx tabred download all
11
+ > # or individual datasets with
12
+ > uvx tabred download cooking-time weather
13
+ > ```
14
+ >
15
+ > *You need a Kaggle account and an API token at `~/.kaggle/kaggle.json` for this to work.*
16
+
17
+ TabReD is a collection of eight industry-grade tabular datasets designed to evaluate machine learning methods under more realistic conditions: temporal distribution shift, rich feature sets from feature engineering pipelines, closer aligned with some real world applications of tabular machine learning.
18
+
19
+ <p align="center">
20
+ <img src="assets/about_tabred.png" alt="TabReD overview" width="75%">
21
+ </p>
22
+
23
+ ## Datasets
24
+
25
+ | Dataset | Features | Task | Instances Used | Instances Available | Source |
26
+ | ------------------ | -------- | -------------- | -------------- | ------------------- | ------------------------------------------------------------------------------------------ |
27
+ | Homesite Insurance | 299 | Classification | 260,753 | - | [Competition](https://www.kaggle.com/competitions/homesite-quote-conversion) |
28
+ | Ecom Offers | 119 | Classification | 160,057 | - | [Competition](https://www.kaggle.com/c/acquire-valued-shoppers-challenge) |
29
+ | Homecredit Default | 696 | Classification | 381,664 | 1,526,659 | [Competition](https://www.kaggle.com/competitions/home-credit-credit-risk-model-stability) |
30
+ | Sberbank Housing | 392 | Regression | 28,321 | - | [Competition](https://www.kaggle.com/competitions/sberbank-russian-housing-market) |
31
+ | Cooking Time | 192 | Regression | 319,986 | 12,799,642 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
32
+ | Delivery ETA | 223 | Regression | 416,451 | 17,044,043 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
33
+ | Maps Routing | 986 | Regression | 340,981 | 13,639,272 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
34
+ | Weather | 103 | Regression | 423,795 | 16,951,828 | [Dataset](https://www.kaggle.com/datasets/irubachev/tabred) |
35
+ ## Preprocessed data format
36
+
37
+ The downloader unpacks each dataset into its own directory:
38
+
39
+ ```
40
+ data/<dataset>/
41
+ ├── info.json
42
+ ├── x_num.npy
43
+ ├── x_cat.npy # when present
44
+ ├── x_bin.npy # when present
45
+ ├── x_meta.npy
46
+ ├── y.npy
47
+ └── splits/
48
+ ├── default/
49
+ │ ├── train.npy
50
+ │ ├── val.npy
51
+ │ └── test.npy
52
+ ├── random-{0,1,2}/
53
+ │ ├── train.npy
54
+ │ ├── val.npy
55
+ │ └── test.npy
56
+ └── sliding-window-{0,1,2}/
57
+ ├── train.npy
58
+ ├── val.npy
59
+ └── test.npy
60
+ ```
61
+
62
+ The `x_*.npy` files contain feature matrices, `y.npy` contains targets, and
63
+ `info.json` contains task metadata. Split files contain row indices into these
64
+ arrays. The `default` split is the main split from the TabReD paper; the random
65
+ and sliding-window splits are provided for split-strategy studies.
66
+
67
+ ## Repository structure
68
+
69
+ - `src/tabred`: downloader package and CLI.
70
+ - `paper`: code for reproducing the paper
71
+
72
+ ## Rebuilding datasets from raw sources
73
+
74
+ Most users should use the preprocessed downloader above. The preprocessing pipeline is kept in this repository for reproducibility and maintenance, but it is not the recommended way to obtain the benchmark data.
75
+
76
+ > The cleaned-up dataset preparation scripts will be published in a few days (@puhsu 10.07.26). For now consult the previous commits and the preprocessing folder there.
77
+
78
+ ## Citation
79
+
80
+ If you use TabReD, please cite:
81
+
82
+ ```bibtex
83
+ @inproceedings{
84
+ rubachev2025tabred,
85
+ title={TabReD: Analyzing Pitfalls and Filling the Gaps in Tabular Deep Learning Benchmarks},
86
+ author={Ivan Rubachev and Nikolay Kartashev and Yury Gorishniy and Artem Babenko},
87
+ booktitle={The Thirteenth International Conference on Learning Representations},
88
+ year={2025},
89
+ url={https://openreview.net/forum?id=L14sqcrUC3}
90
+ }
91
+ ```
@@ -0,0 +1,67 @@
1
+ [build-system]
2
+ requires = ["uv_build>=0.11.16,<0.12.0"]
3
+ build-backend = "uv_build"
4
+
5
+ [project]
6
+ name = "tabred"
7
+ version = "0.1.0"
8
+ description = "TabReD: Benchmark of industry-grade tabular datasets"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12,<4"
11
+ license = { file = "LICENSE" }
12
+ authors = [{ name = "Ivan Rubachev" }]
13
+ classifiers = [
14
+ "Intended Audience :: Science/Research",
15
+ "License :: OSI Approved :: Apache Software License",
16
+ "Programming Language :: Python :: 3",
17
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
18
+ ]
19
+ dependencies = [
20
+ "cyclopts>=4.18.0,<5",
21
+ "kaggle>=2.2,<3",
22
+ "kagglesdk>=0.1.30,<0.2",
23
+ "requests>=2.34.2,<3",
24
+ "rich>=15.0.0,<16",
25
+ ]
26
+
27
+ [project.urls]
28
+ Code = "https://github.com/yandex-research/tabred"
29
+ Documentation = "https://github.com/yandex-research/tabred/tree/main/README.md"
30
+
31
+ [project.scripts]
32
+ tabred = "tabred.cli:main"
33
+
34
+ [dependency-groups]
35
+ data = [
36
+ # dependencies in this group are intentionally
37
+ # strict for reproducible dataset artifacts.
38
+ "numpy==2.4.6",
39
+ "polars>=1.41,<2",
40
+ "pyarrow==24.0.0",
41
+ "scikit-learn==1.8.0",
42
+ ]
43
+ dev = [
44
+ "ipython>=9.13.0,<10",
45
+ "pytest>=8.0.0,<9",
46
+ "ruff>=0.15.0,<0.16",
47
+ ]
48
+
49
+ [tool.pyright]
50
+ exclude = [
51
+ "**/node_modules",
52
+ "**/__pycache__",
53
+ "**/.*",
54
+ "local",
55
+ ]
56
+ venv = ".venv"
57
+ venvPath = "."
58
+
59
+ [tool.ruff]
60
+ line-length = 120
61
+
62
+ [tool.ruff.lint]
63
+ extend-select = ["ARG", "RUF", "UP", "E501", "E731", "I"]
64
+
65
+
66
+ [tool.ruff.format]
67
+ quote-style = "single"
@@ -0,0 +1,10 @@
1
+ from tabred.kaggle_utils import download_kaggle_data, download_preprocessed_data, require_competition_access
2
+ from tabred.registry import get_preprocessed_files, get_raw_files
3
+
4
+ __all__ = [
5
+ 'download_kaggle_data',
6
+ 'download_preprocessed_data',
7
+ 'get_preprocessed_files',
8
+ 'get_raw_files',
9
+ 'require_competition_access',
10
+ ]
@@ -0,0 +1,28 @@
1
+ from pathlib import Path
2
+
3
+ import cyclopts
4
+
5
+ import tabred
6
+
7
+ app = cyclopts.App(name='tabred')
8
+
9
+
10
+ @app.command
11
+ def download(
12
+ names: list[str] = ['all'],
13
+ *,
14
+ output_path: Path = Path('data'),
15
+ force: bool = False,
16
+ max_workers: int = 4,
17
+ ) -> None:
18
+ tabred.require_competition_access(names)
19
+ tabred.download_preprocessed_data(
20
+ names,
21
+ output_path,
22
+ force=force,
23
+ max_workers=max_workers,
24
+ )
25
+
26
+
27
+ def main() -> None:
28
+ app()
@@ -0,0 +1,369 @@
1
+ import hashlib
2
+ import random
3
+ import shutil
4
+ import tarfile
5
+ import tempfile
6
+ from collections.abc import Iterable
7
+ from concurrent.futures import FIRST_EXCEPTION, ThreadPoolExecutor, wait
8
+ from pathlib import Path
9
+ from threading import Event
10
+
11
+ import kagglesdk
12
+ import requests
13
+ from kagglesdk.competitions.types.competition_api_service import (
14
+ ApiDownloadDataFilesRequest,
15
+ ApiListCompetitionsRequest,
16
+ )
17
+ from kagglesdk.competitions.types.competition_enums import CompetitionListTab
18
+ from kagglesdk.datasets.types.dataset_api_service import ApiDownloadDatasetRequest
19
+ from requests import exceptions as requests_exceptions
20
+ from rich.console import Console
21
+ from rich.panel import Panel
22
+ from rich.progress import (
23
+ BarColumn,
24
+ DownloadColumn,
25
+ Progress,
26
+ TextColumn,
27
+ TransferSpeedColumn,
28
+ )
29
+ from rich.theme import Theme
30
+ from urllib3 import exceptions as urllib3_exceptions
31
+
32
+ from tabred.registry import KaggleRef, competition_slugs, dataset_names, get_preprocessed_files
33
+
34
+ _CHUNK_SIZE = 1024 * 1024
35
+ _DOWNLOAD_RETRIES = 5
36
+ _DOWNLOAD_TIMEOUT = (5, 5)
37
+
38
+
39
+ class DownloadFailed(Exception):
40
+ pass
41
+
42
+
43
+ _DOWNLOAD_ERRORS = (
44
+ requests_exceptions.RequestException,
45
+ urllib3_exceptions.HTTPError,
46
+ )
47
+
48
+ console = Console(
49
+ highlight=False,
50
+ theme=Theme(
51
+ {
52
+ 'bar.complete': 'dim green',
53
+ 'bar.pulse': 'dim green',
54
+ 'bar.back': 'white',
55
+ }
56
+ ),
57
+ )
58
+
59
+
60
+ def download_preprocessed_data(
61
+ names: Iterable[str],
62
+ dst: Path,
63
+ *,
64
+ force: bool = False,
65
+ max_workers: int = 4,
66
+ ) -> dict[str, Path]:
67
+ names = dataset_names(names)
68
+ dst.mkdir(parents=True, exist_ok=True)
69
+
70
+ todo = []
71
+ for name in names:
72
+ dataset_dir = dst / name
73
+ if dataset_dir.exists():
74
+ if force:
75
+ shutil.rmtree(dataset_dir)
76
+ else:
77
+ console.print(f'[bold]{name}[/] [yellow]already exists[/]')
78
+ continue
79
+ todo.append(name)
80
+
81
+ if not todo:
82
+ return {name: dst / name for name in names}
83
+
84
+ with tempfile.TemporaryDirectory(dir=dst) as tmp_dir_str:
85
+ tmp_dir = Path(tmp_dir_str)
86
+ archives = download_kaggle_data(
87
+ get_preprocessed_files(todo),
88
+ tmp_dir,
89
+ force=True,
90
+ max_workers=max_workers,
91
+ )
92
+ for name, archive in archives.items():
93
+ with tarfile.open(archive, 'r:gz') as tar:
94
+ tar.extractall(dst, filter='data')
95
+ if not (dst / name).is_dir():
96
+ raise DownloadFailed(f'{archive.name} did not extract to expected directory {name}')
97
+
98
+ console.print(f'[bold green]✓[/] unpacked requested data into `{dst.as_posix()}`')
99
+ return {name: dst / name for name in names}
100
+
101
+
102
+ # This could have been a for loop with kaggle cli download,
103
+ # but I wanted the download to be faster and have a nice ui, so...
104
+
105
+
106
+ def download_kaggle_data(
107
+ data: dict[str, KaggleRef],
108
+ dst: Path,
109
+ *,
110
+ force: bool = False,
111
+ max_workers: int = 4,
112
+ ) -> dict[str, Path]:
113
+ if not data:
114
+ return {}
115
+
116
+ stop = Event()
117
+ workers = max(1, min(max_workers, len(data)))
118
+
119
+ with Progress(
120
+ TextColumn('{task.description}', style='dim'),
121
+ BarColumn(bar_width=30),
122
+ DownloadColumn(),
123
+ TransferSpeedColumn(),
124
+ console=console,
125
+ transient=True,
126
+ refresh_per_second=10,
127
+ expand=False,
128
+ ) as progress:
129
+ task_ids = {name: progress.add_task(ref.name, total=None) for name, ref in data.items()}
130
+
131
+ def run(name: str) -> Path:
132
+ return _download(data[name], dst / name, force, progress, task_ids[name], stop)
133
+
134
+ with ThreadPoolExecutor(max_workers=workers) as pool:
135
+ futures = {pool.submit(run, name): name for name in data}
136
+
137
+ try:
138
+ done, _pending = wait(futures, return_when=FIRST_EXCEPTION)
139
+ except KeyboardInterrupt:
140
+ # fast Ctrl-C cancelation niceties
141
+ stop.set()
142
+ console.print('[bold yellow]⊘[/] download interrupted')
143
+ raise SystemExit(130)
144
+
145
+ failed = next((f for f in done if f.exception() is not None), None)
146
+
147
+ if failed is not None:
148
+ # cancel other ongoing downloads and reraise the error
149
+ stop.set()
150
+ name = futures[failed]
151
+ progress.update(task_ids[name], description=f'{name} failed')
152
+ raise failed.exception() # ty: ignore
153
+
154
+ return {futures[f]: f.result() for f in done}
155
+
156
+
157
+ def require_competition_access(names: Iterable[str]) -> None:
158
+ slugs = competition_slugs(names)
159
+ if not slugs:
160
+ return
161
+
162
+ with console.status('Checking Kaggle competition access'):
163
+ with ThreadPoolExecutor(max_workers=min(8, len(slugs))) as pool:
164
+ access = dict(zip(slugs, pool.map(_entered_competition, slugs), strict=True))
165
+
166
+ missing = [slug for slug, ok in access.items() if not ok]
167
+ if not missing:
168
+ console.print('[bold green]✓[/] competition access verified')
169
+ return
170
+
171
+ links = '\n'.join(f' • [steel_blue3]https://www.kaggle.com/competitions/{slug}[/]' for slug in missing)
172
+ console.print(
173
+ Panel(
174
+ '\nPlease accept the rules for the following Kaggle competitions '
175
+ 'and then rerun the command\n'
176
+ '[dim] Use the account corresponding to the ~/.kaggle/kaggle.json API key[/]'
177
+ '\n\n'
178
+ f'{links}',
179
+ title='[bold]Kaggle competition access required[/]',
180
+ border_style='black',
181
+ )
182
+ )
183
+ raise SystemExit(0)
184
+
185
+
186
+ def _entered_competition(slug: str) -> bool:
187
+ request = ApiListCompetitionsRequest()
188
+ request.group = CompetitionListTab.COMPETITION_LIST_TAB_ENTERED
189
+ request.search = slug
190
+ request.page = 1
191
+ request.page_size = 5
192
+
193
+ with kagglesdk.KaggleClient() as client:
194
+ response = client.competitions.competition_api_client.list_competitions(request)
195
+
196
+ for competition in response.competitions or []:
197
+ for value in (competition.ref, competition.url):
198
+ if value and value.rstrip('/').split('/')[-1] == slug:
199
+ return True
200
+ return False
201
+
202
+
203
+ # This is a "vendored" KaggleApi.download_file
204
+ # it supports restarts, but also does write intermediate files into .part (no correptud)
205
+ # plus it is integrated nicer with the Rich progress bar
206
+ # original: https://github.com/Kaggle/kaggle-cli/blob/c97b6268ff1c6008207049144037cd556f957db3/src/kaggle/api/kaggle_api_extended.py#L4231
207
+
208
+
209
+ def _download(
210
+ file: KaggleRef,
211
+ dst: Path,
212
+ force: bool,
213
+ progress: Progress,
214
+ task_id,
215
+ stop: Event,
216
+ ) -> Path:
217
+ dst.mkdir(parents=True, exist_ok=True)
218
+
219
+ out = dst / (file.local_name or Path(file.name).name)
220
+ part = out.with_name(out.name + '.part')
221
+
222
+ if force:
223
+ out.unlink(missing_ok=True)
224
+ part.unlink(missing_ok=True)
225
+
226
+ if out.exists():
227
+ _check_existing_file(out, file)
228
+ size = out.stat().st_size
229
+ progress.update(task_id, total=size, completed=size)
230
+ progress.remove_task(task_id)
231
+ return out
232
+
233
+ with kagglesdk.KaggleClient() as client:
234
+ if file.kind == 'dataset':
235
+ owner, slug = file.ref.split('/', 1)
236
+ request = ApiDownloadDatasetRequest()
237
+ request.owner_slug = owner
238
+ request.dataset_slug = slug
239
+ request.file_name = file.name
240
+ response = client.datasets.dataset_api_client.download_dataset(request)
241
+ elif file.kind == 'competition':
242
+ request = ApiDownloadDataFilesRequest()
243
+ request.competition_name = file.ref
244
+ response = client.competitions.competition_api_client.download_data_files(request)
245
+ else:
246
+ raise DownloadFailed(f'Unknown Kaggle file kind: {file.kind}')
247
+
248
+ _stream_download(
249
+ response,
250
+ out=out,
251
+ part=part,
252
+ file=file,
253
+ progress=progress,
254
+ task_id=task_id,
255
+ stop=stop,
256
+ )
257
+
258
+ progress.remove_task(task_id)
259
+ return out
260
+
261
+
262
+ def _stream_download(
263
+ response,
264
+ *,
265
+ out: Path,
266
+ part: Path,
267
+ file: KaggleRef,
268
+ stop: Event,
269
+ progress: Progress,
270
+ task_id,
271
+ ) -> None:
272
+ content_length = response.headers.get('Content-Length')
273
+ total = int(content_length) if content_length else None
274
+ resumable = response.headers.get('Accept-Ranges') == 'bytes'
275
+
276
+ url = response.url
277
+ request = response.request
278
+ method = request.method if request is not None else 'GET'
279
+ headers = dict(request.headers) if request is not None else {}
280
+
281
+ response.close()
282
+
283
+ for attempt in range(1, _DOWNLOAD_RETRIES + 2):
284
+ if stop.is_set():
285
+ raise DownloadFailed('Interrupted')
286
+ start = part.stat().st_size if resumable and part.exists() else 0
287
+
288
+ if total is not None and start >= total:
289
+ break
290
+
291
+ request_headers = headers.copy()
292
+
293
+ if start:
294
+ request_headers['Range'] = f'bytes={start}-'
295
+
296
+ try:
297
+ with requests.request(
298
+ method,
299
+ url,
300
+ headers=request_headers,
301
+ stream=True,
302
+ timeout=_DOWNLOAD_TIMEOUT,
303
+ ) as response:
304
+ response.raise_for_status()
305
+ progress.update(task_id, total=total, completed=start)
306
+
307
+ mode = 'ab' if start else 'wb'
308
+ with part.open(mode) as f:
309
+ for chunk in response.iter_content(_CHUNK_SIZE):
310
+ if stop.is_set():
311
+ raise DownloadFailed('Interrupted')
312
+
313
+ if not chunk:
314
+ continue
315
+
316
+ f.write(chunk)
317
+ progress.update(task_id, advance=len(chunk))
318
+ break
319
+
320
+ except _DOWNLOAD_ERRORS as error:
321
+ if attempt > _DOWNLOAD_RETRIES:
322
+ raise DownloadFailed(f'Could not download {out.name}. Try running the command again.') from error
323
+
324
+ if not resumable:
325
+ part.unlink(missing_ok=True)
326
+
327
+ if stop.wait(min(2**attempt + random.random(), 60)):
328
+ raise DownloadFailed('Download cancelled') from error
329
+
330
+ if total is not None and part.stat().st_size != total:
331
+ part.unlink(missing_ok=True)
332
+ raise DownloadFailed(
333
+ f'Downloaded size for {out.name} does not match Kaggle metadata. Try running the command again.'
334
+ )
335
+
336
+ if file.sha256 is not None:
337
+ actual = _sha256(part)
338
+ expected = file.sha256.lower()
339
+
340
+ if actual != expected:
341
+ part.unlink(missing_ok=True)
342
+ raise DownloadFailed(f'Checksum mismatch for {out.name}. Try running the command again.')
343
+
344
+ part.replace(out)
345
+ size = out.stat().st_size
346
+ progress.update(task_id, total=size, completed=size)
347
+
348
+
349
+ def _check_existing_file(path: Path, file: KaggleRef) -> None:
350
+ if file.sha256 is None:
351
+ return
352
+
353
+ actual = _sha256(path)
354
+ expected = file.sha256.lower()
355
+
356
+ if actual != expected:
357
+ raise DownloadFailed(
358
+ f'{path.name} already exists, but its checksum does not match. Run again with --force to replace it.'
359
+ )
360
+
361
+
362
+ def _sha256(path: Path) -> str:
363
+ sha = hashlib.sha256()
364
+
365
+ with path.open('rb') as f:
366
+ for chunk in iter(lambda: f.read(_CHUNK_SIZE), b''):
367
+ sha.update(chunk)
368
+
369
+ return sha.hexdigest().lower()
@@ -0,0 +1,118 @@
1
+ from collections.abc import Iterable
2
+ from dataclasses import dataclass
3
+ from typing import Literal
4
+
5
+ _TABRED_KAGGLE_DATASET = 'irubachev/tabred'
6
+
7
+ KaggleKind = Literal['dataset', 'competition']
8
+
9
+
10
+ @dataclass(frozen=True)
11
+ class KaggleRef:
12
+ kind: KaggleKind
13
+ ref: str
14
+ name: str
15
+ sha256: str | None
16
+ local_name: str | None = None
17
+
18
+ @property
19
+ def slug(self):
20
+ return self.ref if self.kind == 'competition' else None
21
+
22
+
23
+ @dataclass(frozen=True)
24
+ class Dataset:
25
+ name: str
26
+
27
+ raw: KaggleRef
28
+ preprocessed: KaggleRef
29
+
30
+
31
+ def dataset_names(names: Iterable[str]) -> list[str]:
32
+ names = list(names)
33
+ result = list(DATASETS) if names == ['all'] else names
34
+ unknown = sorted(set(result) - set(DATASETS))
35
+ if unknown:
36
+ raise SystemExit('Unknown dataset(s): ' + ', '.join(unknown) + '. Available datasets: ' + ', '.join(DATASETS))
37
+ return result
38
+
39
+
40
+ def competition_slugs(names: Iterable[str]) -> list[str]:
41
+ return [ds.raw.slug for name in dataset_names(names) if (ds := DATASETS[name]).raw.kind == 'competition']
42
+
43
+
44
+ def get_raw_files(names: Iterable[str]) -> dict[str, KaggleRef]:
45
+ return {name: DATASETS[name].raw for name in dataset_names(names)}
46
+
47
+
48
+ def get_preprocessed_files(names: Iterable[str]) -> dict[str, KaggleRef]:
49
+ return {name: DATASETS[name].preprocessed for name in dataset_names(names)}
50
+
51
+
52
+ def _preprocessed_ref(name: str) -> KaggleRef:
53
+ return KaggleRef(
54
+ 'dataset',
55
+ _TABRED_KAGGLE_DATASET,
56
+ f'preprocessed/{name}.tabred',
57
+ _PREPROCESSED_SHA256[name],
58
+ )
59
+
60
+
61
+ def _competition_dataset(name, slug):
62
+ return Dataset(
63
+ name=name,
64
+ raw=KaggleRef('competition', slug, f'{slug}.zip', None),
65
+ preprocessed=_preprocessed_ref(name),
66
+ )
67
+
68
+
69
+ def _yandex_dataset(name, filename):
70
+ return Dataset(
71
+ name=name,
72
+ raw=KaggleRef(
73
+ 'dataset',
74
+ _TABRED_KAGGLE_DATASET,
75
+ f'raw/{name}/{filename}',
76
+ _RAW_SHA256[name],
77
+ local_name=filename,
78
+ ),
79
+ preprocessed=_preprocessed_ref(name),
80
+ )
81
+
82
+
83
+ _PREPROCESSED_SHA256 = {
84
+ 'cooking-time': 'ff7fb7f5be7101019164ec190831766997c28b00aefb4b902050099948435d95',
85
+ 'delivery-eta': '097b1272e45de3a723f66d7b0d5c0a397b53a773cd5a781b8f094bfb753d5362',
86
+ 'ecom-offers': 'de7f96400b9006eab4bfa4318993506aa667c0508da32a5e00b912b2bc702bc9',
87
+ 'homecredit-default': 'fdcdcfe9b67e9ac8fae0291ee0aa8b492e41c123f99c9d3cecae2b78602c7f30',
88
+ 'homesite-insurance': '9c94a9ba8a2dc68221c97d45273076714ad308b5e556ac59fd52117e1ea17d75',
89
+ 'maps-routing': 'bdf503d49f10af2594594feb8c2ad8f4d90725bf21f1fe3de238acf0cb9f2abf',
90
+ 'sberbank-housing': 'a6a11bc09204a5d6d0015dfae504cd630186c813a87e384eaf8caf5b960eb334',
91
+ 'weather': 'b5dfc96c4e33d3567b748f0cc2b12baa5ea28fac400147953a3cd1cb735697e5',
92
+ }
93
+
94
+ _RAW_SHA256 = {
95
+ 'cooking-time': '330b0b811195e7a6b75a43a7bd0ab65b52c83967c8f24d4765ccd2584c3228b9',
96
+ 'delivery-eta': '37dc8c9479821da3539d1c42f6d97afbc4bf8b1466604839edac834ceb9e1ef5',
97
+ 'maps-routing': '225712c539cf18503347c2d88bf4e4e9f624f180e7156a0fc4fedb19c43775b2',
98
+ 'weather': '1984681822f14d24fbb491a8935446f9a263f48a469564c038a856b8194195e8',
99
+ }
100
+
101
+
102
+ DATASETS = {
103
+ name: _yandex_dataset(name, filename)
104
+ for name, filename in [
105
+ ('cooking-time', 'cooking_time.parquet'),
106
+ ('delivery-eta', 'delivery_eta.parquet'),
107
+ ('maps-routing', 'maps_routing.parquet'),
108
+ ('weather', 'weather.parquet'),
109
+ ]
110
+ } | {
111
+ name: _competition_dataset(name, slug)
112
+ for name, slug in [
113
+ ('sberbank-housing', 'sberbank-russian-housing-market'),
114
+ ('ecom-offers', 'acquire-valued-shoppers-challenge'),
115
+ ('homesite-insurance', 'homesite-quote-conversion'),
116
+ ('homecredit-default', 'home-credit-credit-risk-model-stability'),
117
+ ]
118
+ }