structured-data-models 0.0.0a0__tar.gz → 0.2.1__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.
Files changed (344) hide show
  1. structured_data_models-0.2.1/.agents/skills/docstring/SKILL.md +103 -0
  2. structured_data_models-0.2.1/.agents/skills/port-external-models/SKILL.md +41 -0
  3. structured_data_models-0.2.1/.agents/skills/processor-development/SKILL.md +46 -0
  4. structured_data_models-0.2.1/.agents/skills/recipe-development/SKILL.md +10 -0
  5. structured_data_models-0.2.1/.coderabbit.yaml +129 -0
  6. structured_data_models-0.2.1/.github/CODEOWNERS +1 -0
  7. structured_data_models-0.2.1/.github/copy-pr-bot.yaml +3 -0
  8. structured_data_models-0.2.1/.github/workflows/doc.yml +56 -0
  9. structured_data_models-0.2.1/.github/workflows/lint.yml +44 -0
  10. structured_data_models-0.2.1/.github/workflows/publish.yml +56 -0
  11. structured_data_models-0.2.1/.github/workflows/test-gpu.yml +232 -0
  12. structured_data_models-0.2.1/.github/workflows/test.yml +50 -0
  13. structured_data_models-0.2.1/.gitignore +225 -0
  14. structured_data_models-0.2.1/.pre-commit-config.yaml +63 -0
  15. structured_data_models-0.2.1/AGENTS.md +120 -0
  16. structured_data_models-0.2.1/CLAUDE.md +120 -0
  17. structured_data_models-0.2.1/CODE_OF_CONDUCT.md +85 -0
  18. structured_data_models-0.2.1/CONTRIBUTING.md +155 -0
  19. structured_data_models-0.2.1/LICENSE +204 -0
  20. structured_data_models-0.2.1/PKG-INFO +142 -0
  21. structured_data_models-0.2.1/README.md +106 -0
  22. structured_data_models-0.2.1/SECURITY.md +25 -0
  23. structured_data_models-0.2.1/THIRD_PARTY_LICENSES.md +40 -0
  24. structured_data_models-0.2.1/benchmark/README.md +11 -0
  25. structured_data_models-0.2.1/benchmark/__init__.py +2 -0
  26. structured_data_models-0.2.1/benchmark/relational/relarena/README.md +65 -0
  27. structured_data_models-0.2.1/benchmark/relational/relarena/kumo_relational.py +308 -0
  28. structured_data_models-0.2.1/benchmark/tabular/README.md +115 -0
  29. structured_data_models-0.2.1/benchmark/tabular/__init__.py +2 -0
  30. structured_data_models-0.2.1/benchmark/tabular/beyondarena/__init__.py +2 -0
  31. structured_data_models-0.2.1/benchmark/tabular/beyondarena/evaluate.py +61 -0
  32. structured_data_models-0.2.1/benchmark/tabular/beyondarena/main.py +96 -0
  33. structured_data_models-0.2.1/benchmark/tabular/model.py +476 -0
  34. structured_data_models-0.2.1/benchmark/tabular/scoringbench/README.md +58 -0
  35. structured_data_models-0.2.1/benchmark/tabular/scoringbench/__init__.py +2 -0
  36. structured_data_models-0.2.1/benchmark/tabular/scoringbench/evaluate.py +125 -0
  37. structured_data_models-0.2.1/benchmark/tabular/scoringbench/main.py +133 -0
  38. structured_data_models-0.2.1/benchmark/tabular/scoringbench/models.py +175 -0
  39. structured_data_models-0.2.1/benchmark/tabular/tabarena/__init__.py +2 -0
  40. structured_data_models-0.2.1/benchmark/tabular/tabarena/evaluate.py +59 -0
  41. structured_data_models-0.2.1/benchmark/tabular/tabarena/main.py +99 -0
  42. structured_data_models-0.2.1/benchmark/tabular/talent/README.md +58 -0
  43. structured_data_models-0.2.1/benchmark/tabular/talent/__init__.py +2 -0
  44. structured_data_models-0.2.1/benchmark/tabular/talent/evaluate.py +213 -0
  45. structured_data_models-0.2.1/benchmark/tabular/talent/main.py +124 -0
  46. structured_data_models-0.2.1/benchmark/tabular/talent/models.py +405 -0
  47. structured_data_models-0.2.1/docs/Makefile +15 -0
  48. structured_data_models-0.2.1/docs/source/_static/custom.css +23 -0
  49. structured_data_models-0.2.1/docs/source/_templates/autosummary/class.rst +7 -0
  50. structured_data_models-0.2.1/docs/source/_templates/autosummary/function.rst +5 -0
  51. structured_data_models-0.2.1/docs/source/_templates/autosummary/model_class.rst +42 -0
  52. structured_data_models-0.2.1/docs/source/_templates/autosummary/processor_class.rst +31 -0
  53. structured_data_models-0.2.1/docs/source/_templates/autosummary/tensor_class.rst +8 -0
  54. structured_data_models-0.2.1/docs/source/_templates/partials/site-foot.html +0 -0
  55. structured_data_models-0.2.1/docs/source/api/evaluation.rst +10 -0
  56. structured_data_models-0.2.1/docs/source/api/explain.rst +10 -0
  57. structured_data_models-0.2.1/docs/source/api/internal/cache.rst +7 -0
  58. structured_data_models-0.2.1/docs/source/api/internal/device_mixin.rst +7 -0
  59. structured_data_models-0.2.1/docs/source/api/internal/ensemble_table.rst +7 -0
  60. structured_data_models-0.2.1/docs/source/api/internal/kv_cache_entry.rst +7 -0
  61. structured_data_models-0.2.1/docs/source/api/internal/related_tables_schema.rst +7 -0
  62. structured_data_models-0.2.1/docs/source/api/internal/relational_sampler_output.rst +7 -0
  63. structured_data_models-0.2.1/docs/source/api/internal/table_schema.rst +7 -0
  64. structured_data_models-0.2.1/docs/source/api/models.rst +54 -0
  65. structured_data_models-0.2.1/docs/source/api/nn.rst +10 -0
  66. structured_data_models-0.2.1/docs/source/api/processing.rst +87 -0
  67. structured_data_models-0.2.1/docs/source/api/relational.rst +10 -0
  68. structured_data_models-0.2.1/docs/source/api/sdm.rst +10 -0
  69. structured_data_models-0.2.1/docs/source/api/tensor.rst +11 -0
  70. structured_data_models-0.2.1/docs/source/conf.py +167 -0
  71. structured_data_models-0.2.1/docs/source/icl.md +275 -0
  72. structured_data_models-0.2.1/docs/source/images/ensemble_dark.svg +4 -0
  73. structured_data_models-0.2.1/docs/source/images/ensemble_light.svg +4 -0
  74. structured_data_models-0.2.1/docs/source/images/graph_dark.svg +4 -0
  75. structured_data_models-0.2.1/docs/source/images/graph_light.svg +4 -0
  76. structured_data_models-0.2.1/docs/source/images/kumo_relational_dark.svg +2265 -0
  77. structured_data_models-0.2.1/docs/source/images/kumo_relational_light.svg +2265 -0
  78. structured_data_models-0.2.1/docs/source/images/kumo_tabular.svg +3 -0
  79. structured_data_models-0.2.1/docs/source/images/logo_dark.svg +156 -0
  80. structured_data_models-0.2.1/docs/source/images/logo_light.svg +156 -0
  81. structured_data_models-0.2.1/docs/source/images/nvidia.svg +1 -0
  82. structured_data_models-0.2.1/docs/source/images/pipeline_dark.svg +4 -0
  83. structured_data_models-0.2.1/docs/source/images/pipeline_light.svg +4 -0
  84. structured_data_models-0.2.1/docs/source/images/tabfm_dark.png +0 -0
  85. structured_data_models-0.2.1/docs/source/images/tabfm_light.png +0 -0
  86. structured_data_models-0.2.1/docs/source/images/tabicl_dark.svg +1089 -0
  87. structured_data_models-0.2.1/docs/source/images/tabicl_light.svg +1089 -0
  88. structured_data_models-0.2.1/docs/source/images/table_dark.svg +4 -0
  89. structured_data_models-0.2.1/docs/source/images/table_light.svg +4 -0
  90. structured_data_models-0.2.1/docs/source/index.md +48 -0
  91. structured_data_models-0.2.1/docs/source/install.md +12 -0
  92. structured_data_models-0.2.1/docs/source/overview.md +109 -0
  93. structured_data_models-0.2.1/docs/source/processing.md +122 -0
  94. structured_data_models-0.2.1/docs/source/tensor.md +174 -0
  95. structured_data_models-0.2.1/examples/README.md +8 -0
  96. structured_data_models-0.2.1/examples/relational/rel_bench.py +219 -0
  97. structured_data_models-0.2.1/examples/relational/salt/README.md +30 -0
  98. structured_data_models-0.2.1/examples/relational/salt/main.py +209 -0
  99. structured_data_models-0.2.1/examples/tabular/finetune.py +157 -0
  100. structured_data_models-0.2.1/examples/tabular/quickstart.py +56 -0
  101. structured_data_models-0.2.1/examples/tabular/text.py +76 -0
  102. structured_data_models-0.2.1/pyproject.toml +263 -0
  103. structured_data_models-0.2.1/sdm/__init__.py +58 -0
  104. structured_data_models-0.2.1/sdm/_constants.py +6 -0
  105. structured_data_models-0.2.1/sdm/_inference.py +42 -0
  106. structured_data_models-0.2.1/sdm/_kernels/__init__.py +10 -0
  107. structured_data_models-0.2.1/sdm/_kernels/rmsnorm_cast.py +92 -0
  108. structured_data_models-0.2.1/sdm/_kernels/segment_multi_reduce.py +141 -0
  109. structured_data_models-0.2.1/sdm/_kernels/triton/__init__.py +7 -0
  110. structured_data_models-0.2.1/sdm/_kernels/triton/rmsnorm_cast.py +136 -0
  111. structured_data_models-0.2.1/sdm/_kernels/triton/segment_multi_reduce.py +173 -0
  112. structured_data_models-0.2.1/sdm/_memory.py +34 -0
  113. structured_data_models-0.2.1/sdm/_warnings.py +29 -0
  114. structured_data_models-0.2.1/sdm/cache.py +163 -0
  115. structured_data_models-0.2.1/sdm/ensemble.py +501 -0
  116. structured_data_models-0.2.1/sdm/evaluation/__init__.py +11 -0
  117. structured_data_models-0.2.1/sdm/evaluation/classification.py +205 -0
  118. structured_data_models-0.2.1/sdm/explain/__init__.py +12 -0
  119. structured_data_models-0.2.1/sdm/explain/base.py +123 -0
  120. structured_data_models-0.2.1/sdm/explain/gradient.py +112 -0
  121. structured_data_models-0.2.1/sdm/models/__init__.py +20 -0
  122. structured_data_models-0.2.1/sdm/models/_huggingface.py +58 -0
  123. structured_data_models-0.2.1/sdm/models/base.py +966 -0
  124. structured_data_models-0.2.1/sdm/models/callback.py +106 -0
  125. structured_data_models-0.2.1/sdm/models/ecoc.py +197 -0
  126. structured_data_models-0.2.1/sdm/models/kumo/__init__.py +13 -0
  127. structured_data_models-0.2.1/sdm/models/kumo/relational/NOTICE +5 -0
  128. structured_data_models-0.2.1/sdm/models/kumo/relational/__init__.py +11 -0
  129. structured_data_models-0.2.1/sdm/models/kumo/relational/graph.py +101 -0
  130. structured_data_models-0.2.1/sdm/models/kumo/relational/invariant_gnn.py +122 -0
  131. structured_data_models-0.2.1/sdm/models/kumo/relational/model.py +602 -0
  132. structured_data_models-0.2.1/sdm/models/kumo/relational/recipe.py +18 -0
  133. structured_data_models-0.2.1/sdm/models/kumo/relational/task.py +113 -0
  134. structured_data_models-0.2.1/sdm/models/kumo/tabular/__init__.py +17 -0
  135. structured_data_models-0.2.1/sdm/models/kumo/tabular/batching.py +139 -0
  136. structured_data_models-0.2.1/sdm/models/kumo/tabular/block.py +100 -0
  137. structured_data_models-0.2.1/sdm/models/kumo/tabular/cell_embedding.py +85 -0
  138. structured_data_models-0.2.1/sdm/models/kumo/tabular/icl.py +136 -0
  139. structured_data_models-0.2.1/sdm/models/kumo/tabular/model.py +299 -0
  140. structured_data_models-0.2.1/sdm/models/kumo/tabular/recipe.py +71 -0
  141. structured_data_models-0.2.1/sdm/models/kumo/tabular/row_embedding.py +214 -0
  142. structured_data_models-0.2.1/sdm/models/tabfm/LICENSE +209 -0
  143. structured_data_models-0.2.1/sdm/models/tabfm/__init__.py +11 -0
  144. structured_data_models-0.2.1/sdm/models/tabfm/block.py +94 -0
  145. structured_data_models-0.2.1/sdm/models/tabfm/cell_embedding.py +219 -0
  146. structured_data_models-0.2.1/sdm/models/tabfm/ckpt.py +242 -0
  147. structured_data_models-0.2.1/sdm/models/tabfm/icl.py +107 -0
  148. structured_data_models-0.2.1/sdm/models/tabfm/model.py +261 -0
  149. structured_data_models-0.2.1/sdm/models/tabfm/recipe.py +46 -0
  150. structured_data_models-0.2.1/sdm/models/tabfm/row_embedding.py +241 -0
  151. structured_data_models-0.2.1/sdm/models/tabiclv2/LICENSE +33 -0
  152. structured_data_models-0.2.1/sdm/models/tabiclv2/__init__.py +11 -0
  153. structured_data_models-0.2.1/sdm/models/tabiclv2/block.py +81 -0
  154. structured_data_models-0.2.1/sdm/models/tabiclv2/ckpt.py +134 -0
  155. structured_data_models-0.2.1/sdm/models/tabiclv2/icl.py +420 -0
  156. structured_data_models-0.2.1/sdm/models/tabiclv2/model.py +293 -0
  157. structured_data_models-0.2.1/sdm/models/tabiclv2/recipe.py +46 -0
  158. structured_data_models-0.2.1/sdm/models/tabiclv2/row_embedding.py +254 -0
  159. structured_data_models-0.2.1/sdm/nn/__init__.py +28 -0
  160. structured_data_models-0.2.1/sdm/nn/_buffer.py +91 -0
  161. structured_data_models-0.2.1/sdm/nn/attention.py +825 -0
  162. structured_data_models-0.2.1/sdm/nn/glu.py +78 -0
  163. structured_data_models-0.2.1/sdm/nn/linear.py +46 -0
  164. structured_data_models-0.2.1/sdm/nn/rms_norm.py +59 -0
  165. structured_data_models-0.2.1/sdm/nn/rope.py +107 -0
  166. structured_data_models-0.2.1/sdm/nn/scaling.py +240 -0
  167. structured_data_models-0.2.1/sdm/nn/set_transformer.py +162 -0
  168. structured_data_models-0.2.1/sdm/nn/softplus.py +65 -0
  169. structured_data_models-0.2.1/sdm/processing/__init__.py +96 -0
  170. structured_data_models-0.2.1/sdm/processing/base.py +254 -0
  171. structured_data_models-0.2.1/sdm/processing/categorical/__init__.py +16 -0
  172. structured_data_models-0.2.1/sdm/processing/categorical/_categorical.py +60 -0
  173. structured_data_models-0.2.1/sdm/processing/categorical/align.py +540 -0
  174. structured_data_models-0.2.1/sdm/processing/categorical/count.py +121 -0
  175. structured_data_models-0.2.1/sdm/processing/categorical/impute.py +107 -0
  176. structured_data_models-0.2.1/sdm/processing/categorical/shuffle.py +204 -0
  177. structured_data_models-0.2.1/sdm/processing/common/__init__.py +32 -0
  178. structured_data_models-0.2.1/sdm/processing/common/callable.py +29 -0
  179. structured_data_models-0.2.1/sdm/processing/common/choice.py +185 -0
  180. structured_data_models-0.2.1/sdm/processing/common/drop.py +28 -0
  181. structured_data_models-0.2.1/sdm/processing/common/ensemble.py +187 -0
  182. structured_data_models-0.2.1/sdm/processing/common/identity.py +18 -0
  183. structured_data_models-0.2.1/sdm/processing/common/select.py +107 -0
  184. structured_data_models-0.2.1/sdm/processing/common/sequential.py +158 -0
  185. structured_data_models-0.2.1/sdm/processing/common/shuffle.py +195 -0
  186. structured_data_models-0.2.1/sdm/processing/common/stype.py +199 -0
  187. structured_data_models-0.2.1/sdm/processing/common/table.py +120 -0
  188. structured_data_models-0.2.1/sdm/processing/common/task.py +135 -0
  189. structured_data_models-0.2.1/sdm/processing/common/to_numerical.py +60 -0
  190. structured_data_models-0.2.1/sdm/processing/datetime/__init__.py +8 -0
  191. structured_data_models-0.2.1/sdm/processing/datetime/calendar.py +196 -0
  192. structured_data_models-0.2.1/sdm/processing/ensemble.py +203 -0
  193. structured_data_models-0.2.1/sdm/processing/execution.py +418 -0
  194. structured_data_models-0.2.1/sdm/processing/numerical/__init__.py +38 -0
  195. structured_data_models-0.2.1/sdm/processing/numerical/_stats.py +29 -0
  196. structured_data_models-0.2.1/sdm/processing/numerical/cast.py +33 -0
  197. structured_data_models-0.2.1/sdm/processing/numerical/clip.py +48 -0
  198. structured_data_models-0.2.1/sdm/processing/numerical/clip_soft.py +54 -0
  199. structured_data_models-0.2.1/sdm/processing/numerical/constant.py +235 -0
  200. structured_data_models-0.2.1/sdm/processing/numerical/flip_sign.py +78 -0
  201. structured_data_models-0.2.1/sdm/processing/numerical/impute.py +52 -0
  202. structured_data_models-0.2.1/sdm/processing/numerical/pca.py +62 -0
  203. structured_data_models-0.2.1/sdm/processing/numerical/power.py +325 -0
  204. structured_data_models-0.2.1/sdm/processing/numerical/quantile.py +306 -0
  205. structured_data_models-0.2.1/sdm/processing/numerical/quantile_clip.py +63 -0
  206. structured_data_models-0.2.1/sdm/processing/numerical/random_projection.py +86 -0
  207. structured_data_models-0.2.1/sdm/processing/numerical/rank_gaussian.py +168 -0
  208. structured_data_models-0.2.1/sdm/processing/numerical/robust_scale.py +88 -0
  209. structured_data_models-0.2.1/sdm/processing/numerical/sigma_clip.py +123 -0
  210. structured_data_models-0.2.1/sdm/processing/numerical/standardize.py +71 -0
  211. structured_data_models-0.2.1/sdm/processing/output/__init__.py +14 -0
  212. structured_data_models-0.2.1/sdm/processing/output/reduce.py +86 -0
  213. structured_data_models-0.2.1/sdm/processing/output/softmax.py +48 -0
  214. structured_data_models-0.2.1/sdm/processing/output/sort.py +16 -0
  215. structured_data_models-0.2.1/sdm/processing/recipe.py +154 -0
  216. structured_data_models-0.2.1/sdm/processing/text/__init__.py +12 -0
  217. structured_data_models-0.2.1/sdm/processing/text/sentence_transformer.py +451 -0
  218. structured_data_models-0.2.1/sdm/processing/text/tfidf.py +478 -0
  219. structured_data_models-0.2.1/sdm/relational/__init__.py +16 -0
  220. structured_data_models-0.2.1/sdm/relational/backend/__init__.py +12 -0
  221. structured_data_models-0.2.1/sdm/relational/backend/_cugraph.py +546 -0
  222. structured_data_models-0.2.1/sdm/relational/backend/_pyg_lib.py +175 -0
  223. structured_data_models-0.2.1/sdm/relational/data.py +393 -0
  224. structured_data_models-0.2.1/sdm/relational/join.py +173 -0
  225. structured_data_models-0.2.1/sdm/relational/sampler.py +259 -0
  226. structured_data_models-0.2.1/sdm/relational/task.py +465 -0
  227. structured_data_models-0.2.1/sdm/stype.py +396 -0
  228. structured_data_models-0.2.1/sdm/task.py +53 -0
  229. structured_data_models-0.2.1/sdm/tensor/__init__.py +20 -0
  230. structured_data_models-0.2.1/sdm/tensor/categorical.py +953 -0
  231. structured_data_models-0.2.1/sdm/tensor/columnar.py +1127 -0
  232. structured_data_models-0.2.1/sdm/tensor/io/__init__.py +22 -0
  233. structured_data_models-0.2.1/sdm/tensor/io/arrow.py +120 -0
  234. structured_data_models-0.2.1/sdm/tensor/io/cudf.py +47 -0
  235. structured_data_models-0.2.1/sdm/tensor/mixin.py +124 -0
  236. structured_data_models-0.2.1/sdm/tensor/nullable.py +963 -0
  237. structured_data_models-0.2.1/sdm/tensor/string.py +526 -0
  238. structured_data_models-0.2.1/sdm/tensor/table.py +2035 -0
  239. structured_data_models-0.2.1/sdm/tensor/var_len.py +1486 -0
  240. structured_data_models-0.2.1/sdm/testing/__init__.py +14 -0
  241. structured_data_models-0.2.1/sdm/testing/decorators.py +61 -0
  242. structured_data_models-0.2.1/sdm/testing/memory.py +92 -0
  243. structured_data_models-0.2.1/setup.cfg +4 -0
  244. structured_data_models-0.2.1/structured_data_models.egg-info/PKG-INFO +142 -0
  245. structured_data_models-0.2.1/structured_data_models.egg-info/SOURCES.txt +338 -0
  246. structured_data_models-0.2.1/structured_data_models.egg-info/dependency_links.txt +1 -0
  247. structured_data_models-0.2.1/structured_data_models.egg-info/requires.txt +6 -0
  248. structured_data_models-0.2.1/structured_data_models.egg-info/scm_file_list.json +335 -0
  249. structured_data_models-0.2.1/structured_data_models.egg-info/scm_version.json +8 -0
  250. structured_data_models-0.2.1/structured_data_models.egg-info/top_level.txt +1 -0
  251. structured_data_models-0.2.1/test/_kernels/test_rmsnorm_cast.py +178 -0
  252. structured_data_models-0.2.1/test/_kernels/test_segment_multi_reduce.py +389 -0
  253. structured_data_models-0.2.1/test/conftest.py +137 -0
  254. structured_data_models-0.2.1/test/evaluation/test_classification.py +60 -0
  255. structured_data_models-0.2.1/test/explain/test_base.py +53 -0
  256. structured_data_models-0.2.1/test/explain/test_gradient.py +137 -0
  257. structured_data_models-0.2.1/test/models/kumo/relational/test_model.py +341 -0
  258. structured_data_models-0.2.1/test/models/kumo/tabular/test_batching.py +95 -0
  259. structured_data_models-0.2.1/test/models/kumo/tabular/test_block.py +71 -0
  260. structured_data_models-0.2.1/test/models/kumo/tabular/test_cell_embedding.py +107 -0
  261. structured_data_models-0.2.1/test/models/kumo/tabular/test_icl.py +81 -0
  262. structured_data_models-0.2.1/test/models/kumo/tabular/test_model.py +335 -0
  263. structured_data_models-0.2.1/test/models/kumo/tabular/test_recipe.py +152 -0
  264. structured_data_models-0.2.1/test/models/kumo/tabular/test_row_embedding.py +48 -0
  265. structured_data_models-0.2.1/test/models/tabfm/test_cell_embedding.py +66 -0
  266. structured_data_models-0.2.1/test/models/tabfm/test_model.py +101 -0
  267. structured_data_models-0.2.1/test/models/tabiclv2/test_icl.py +304 -0
  268. structured_data_models-0.2.1/test/models/tabiclv2/test_model.py +326 -0
  269. structured_data_models-0.2.1/test/models/test_base.py +892 -0
  270. structured_data_models-0.2.1/test/models/test_ecoc.py +133 -0
  271. structured_data_models-0.2.1/test/nn/test_attention.py +750 -0
  272. structured_data_models-0.2.1/test/nn/test_buffer.py +142 -0
  273. structured_data_models-0.2.1/test/nn/test_compile.py +321 -0
  274. structured_data_models-0.2.1/test/nn/test_glu.py +16 -0
  275. structured_data_models-0.2.1/test/nn/test_linear.py +25 -0
  276. structured_data_models-0.2.1/test/nn/test_rms_norm.py +144 -0
  277. structured_data_models-0.2.1/test/nn/test_rope.py +88 -0
  278. structured_data_models-0.2.1/test/nn/test_scaling.py +96 -0
  279. structured_data_models-0.2.1/test/nn/test_set_transformer.py +160 -0
  280. structured_data_models-0.2.1/test/processing/categorical/test_align.py +506 -0
  281. structured_data_models-0.2.1/test/processing/categorical/test_count.py +159 -0
  282. structured_data_models-0.2.1/test/processing/categorical/test_impute.py +169 -0
  283. structured_data_models-0.2.1/test/processing/categorical/test_shuffle.py +222 -0
  284. structured_data_models-0.2.1/test/processing/common/test_choice.py +253 -0
  285. structured_data_models-0.2.1/test/processing/common/test_drop.py +33 -0
  286. structured_data_models-0.2.1/test/processing/common/test_identity.py +30 -0
  287. structured_data_models-0.2.1/test/processing/common/test_select.py +50 -0
  288. structured_data_models-0.2.1/test/processing/common/test_sequential.py +223 -0
  289. structured_data_models-0.2.1/test/processing/common/test_shuffle.py +150 -0
  290. structured_data_models-0.2.1/test/processing/common/test_stype.py +211 -0
  291. structured_data_models-0.2.1/test/processing/common/test_table.py +49 -0
  292. structured_data_models-0.2.1/test/processing/common/test_task.py +90 -0
  293. structured_data_models-0.2.1/test/processing/common/test_to_numerical.py +84 -0
  294. structured_data_models-0.2.1/test/processing/datetime/test_calendar.py +72 -0
  295. structured_data_models-0.2.1/test/processing/numerical/test_cast.py +34 -0
  296. structured_data_models-0.2.1/test/processing/numerical/test_clip.py +37 -0
  297. structured_data_models-0.2.1/test/processing/numerical/test_clip_soft.py +82 -0
  298. structured_data_models-0.2.1/test/processing/numerical/test_constant.py +144 -0
  299. structured_data_models-0.2.1/test/processing/numerical/test_flip_sign.py +31 -0
  300. structured_data_models-0.2.1/test/processing/numerical/test_impute.py +85 -0
  301. structured_data_models-0.2.1/test/processing/numerical/test_pca.py +40 -0
  302. structured_data_models-0.2.1/test/processing/numerical/test_power.py +426 -0
  303. structured_data_models-0.2.1/test/processing/numerical/test_quantile.py +264 -0
  304. structured_data_models-0.2.1/test/processing/numerical/test_quantile_clip.py +119 -0
  305. structured_data_models-0.2.1/test/processing/numerical/test_random_projection.py +32 -0
  306. structured_data_models-0.2.1/test/processing/numerical/test_rank_gaussian.py +306 -0
  307. structured_data_models-0.2.1/test/processing/numerical/test_robust_scale.py +221 -0
  308. structured_data_models-0.2.1/test/processing/numerical/test_sigma_clip.py +183 -0
  309. structured_data_models-0.2.1/test/processing/numerical/test_standardize.py +130 -0
  310. structured_data_models-0.2.1/test/processing/output/test_reduce.py +152 -0
  311. structured_data_models-0.2.1/test/processing/output/test_softmax.py +53 -0
  312. structured_data_models-0.2.1/test/processing/output/test_sort.py +20 -0
  313. structured_data_models-0.2.1/test/processing/test_contract.py +367 -0
  314. structured_data_models-0.2.1/test/processing/test_ensemble.py +240 -0
  315. structured_data_models-0.2.1/test/processing/test_execution.py +382 -0
  316. structured_data_models-0.2.1/test/processing/test_fitted_guard.py +168 -0
  317. structured_data_models-0.2.1/test/processing/test_recipe.py +127 -0
  318. structured_data_models-0.2.1/test/processing/text/test_sentence_transformer.py +296 -0
  319. structured_data_models-0.2.1/test/processing/text/test_tfidf.py +346 -0
  320. structured_data_models-0.2.1/test/relational/backend/test_cugraph.py +482 -0
  321. structured_data_models-0.2.1/test/relational/backend/test_sampler_parity.py +275 -0
  322. structured_data_models-0.2.1/test/relational/test_data.py +66 -0
  323. structured_data_models-0.2.1/test/relational/test_join.py +92 -0
  324. structured_data_models-0.2.1/test/relational/test_sampler.py +260 -0
  325. structured_data_models-0.2.1/test/tensor/test_categorical.py +634 -0
  326. structured_data_models-0.2.1/test/tensor/test_columnar.py +465 -0
  327. structured_data_models-0.2.1/test/tensor/test_io.py +91 -0
  328. structured_data_models-0.2.1/test/tensor/test_nullable.py +105 -0
  329. structured_data_models-0.2.1/test/tensor/test_record_stream.py +34 -0
  330. structured_data_models-0.2.1/test/tensor/test_string.py +384 -0
  331. structured_data_models-0.2.1/test/tensor/test_table.py +1666 -0
  332. structured_data_models-0.2.1/test/tensor/test_var_len.py +995 -0
  333. structured_data_models-0.2.1/test/test_cache.py +47 -0
  334. structured_data_models-0.2.1/test/test_ensemble.py +285 -0
  335. structured_data_models-0.2.1/test/test_stype.py +194 -0
  336. structured_data_models-0.2.1/third_party/contributor-covenant/LICENSE +20 -0
  337. structured_data_models-0.2.1/third_party/pytorch/LICENSE +84 -0
  338. structured_data_models-0.2.1/third_party/tabpfn-extensions/LICENSE +202 -0
  339. structured_data_models-0.2.1/uv.lock +2432 -0
  340. structured_data_models-0.0.0a0/MANIFEST.in +0 -4
  341. structured_data_models-0.0.0a0/PKG-INFO +0 -13
  342. structured_data_models-0.0.0a0/README.md +0 -3
  343. structured_data_models-0.0.0a0/pyproject.toml +0 -18
  344. structured_data_models-0.0.0a0/src/structured_data_models/__init__.py +0 -3
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: docstring
3
+ description: Write or review docstrings for public modules, classes, and functions in sdm/. Use when adding or reviewing docstrings to follow repo best practices (Args sections, paper citations, tensor shape notation).
4
+ ---
5
+
6
+ # Docstring Writing and Reviewing Guide
7
+
8
+ Use this when writing or reviewing docstrings for public modules, classes, and functions in `sdm/`.
9
+ Follow these best practices up front to keep docstrings consistent across the codebase.
10
+
11
+ ## General Principles
12
+
13
+ - Keep docstrings as minimal as possible and avoid documenting implementation details.
14
+ - Do not add module-level docstrings to individual modules; keep only a short package summary in the package `__init__.py`.
15
+ - Every public class and function has a docstring, a one-line summary, then an `Args:` section.
16
+ - When a class or function implements functionality proposed in an academic paper, cite it in the first sentence of its docstring.
17
+ - Document every public parameter, especially, constructor parameters. Document them in the **class** docstring's `Args:`, not in `__init__`.
18
+ - Use `r"""..."""` whenever the docstring contains math, LaTeX, or backslashes (e.g., a `.. math::` block).
19
+ - Describe tensor parameters with their shape in double-backtick notation, using a leading `...` for the batch dimensions (e.g., `[..., S, H, C]`). Spell out each remaining dimension letter, and keep the notation consistent across related processors/modules.
20
+ - If splitting a long line leads to a line-too-long error, put `# noqa: <code>` to ignore the error.
21
+ - Document non-obvious behavior: implicit caps, defaults, transformations, or side effects that affect results. If it would surprise a caller, state it.
22
+ - Do not add docstrings to methods that already have one in superclass's methods even if the class/methods are public. For example, `Processor.transform()` already has a general docstring that's applicable to its subclasses. In this case, put a comment `# noqa: D102` to ignore the linter error.
23
+
24
+ ## Example
25
+
26
+ ```python
27
+ class MyClass:
28
+ r"""My Class from the `"My Paper" <https://arxiv.org/abs/2602.11139>`_ paper.
29
+
30
+ .. math::
31
+
32
+ y = \frac{x}{\sqrt{d}}
33
+
34
+ Args:
35
+ fill_value: Value written into masked positions. Capped at ``1.0``;
36
+ larger values are silently clamped.
37
+ """
38
+
39
+ def __init__(self, fill_value: float) -> None:
40
+ ...
41
+
42
+ def forward(self, x: Tensor) -> Tensor:
43
+ """Normalize ``x`` along its last dimension.
44
+
45
+ Args:
46
+ x: Input tensor with shape ``[..., S, C]``.
47
+
48
+ Returns:
49
+ Tensor with shape ``[..., S, C]``.
50
+ """
51
+
52
+ def citation(self) -> str:
53
+ """Return the key from :func:`sdm.refs.resolve_default_citation_key`.""" # noqa: E501
54
+ ```
55
+
56
+ ## Sphinx Cross-Referencing Reference
57
+
58
+ The same roles resolve internal `sdm` targets and external ones. Prefer
59
+ cross-reference roles over plain literals, e.g.,
60
+
61
+ ```python
62
+ """:class:`pandas.DataFrame`"""
63
+ ```
64
+
65
+ over
66
+
67
+ ```python
68
+ """``pandas.DataFrame``"""
69
+ ```
70
+
71
+ whenever the target lives in an intersphinx-mapped project (`python`, `torch`, `numpy`,
72
+ `pandas`, `pyarrow`, `cudf`, `typing_extensions`; see `intersphinx_mapping`
73
+ in `docs/source/conf.py`).
74
+
75
+ ```python
76
+ r"""
77
+ - :mod:`sdm.nn`: Module reference.
78
+ - :class:`~sdm.nn.Module`: Class reference. External targets use the same
79
+ role: :class:`pandas.DataFrame`, :class:`torch.nn.Module`, :class:`dict`,
80
+ :class:`TypeError`, :class:`collections.abc.Mapping`.
81
+ - :class:`~pyarrow.Array`: Leading ``~`` renders only ``Array``. Use it in
82
+ summary lines; keep the full path in ``Args:`` entries.
83
+ - :meth:`~sdm.nn.Module.forward`: Method reference.
84
+ - :func:`torch.nn.functional.scaled_dot_product_attention`: Function
85
+ reference. Use :func: for free functions and :meth: only for methods.
86
+ - :attr:`attribute`: Attribute reference.
87
+ - :math:`equation`: Inline math.
88
+ - :ref:`label`: Internal label reference.
89
+ - :ref:`calling convention <torch-dispatch-calling-convention>`: External
90
+ label reference with custom link text, resolved through intersphinx.
91
+ - :external+torch:ref:`torch.int32 <dtype-doc>`: Label reference pinned to a
92
+ specific project's inventory. Use for targets without their own API entry
93
+ (e.g., dtypes like ``torch.int32`` resolve to the ``dtype-doc`` label).
94
+ Never guess label names: search the linked documentation for a fitting
95
+ target by dumping the project's inventory, e.g.
96
+ ``uv run --no-default-groups --group doc python -m sphinx.ext.intersphinx https://docs.pytorch.org/docs/stable/objects.inv | grep -i dtype``.
97
+ """
98
+ ```
99
+
100
+ ## Verification
101
+
102
+ Run `uv run ruff check`. This is a structural backstop only: it flags missing public class/method/function docstrings, capitalization, end punctuation, `r"""` for backslashes, and `Args:`/signature mismatches.
103
+ It does **not** require an `Args:` section to exist, or verify citations, shape notation, or behavior notes — confirm those by hand against the principles above.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: port-external-models
3
+ description: Implement or review a port of an external model in SDM, from upstream inference behavior and checkpoints through public prediction parity and reviewable PRs.
4
+ ---
5
+
6
+ # Port an External Model to SDM
7
+
8
+ Follow the repository-root `AGENTS.md`. When a port adds reusable processors or changes a `Recipe`, also follow the `processor-development` or `recipe-development` skill, respectively. Use `docstring` when writing or reviewing public docstrings.
9
+
10
+ ## Establish the reference
11
+
12
+ - Which revision: Pin the upstream git SHA, Hub revision, model config, and source vs weight licenses. Put them in the PR description; when merging, also in `THIRD_PARTY_LICENSES.md`, the model docstring, and the checkpoint load path.
13
+ - Which behaviour in this revision: Trace an upstream **public inference call** through input preparation, numerical execution, and output restoration. Identify the functions responsible for each stage; a low-level `forward` method alone does not establish public behavior.
14
+ - Which public contract: Record accepted forms and shapes, feature and target roles, auxiliary inputs, batching and size limits, missing and non-finite values, masks or padding, preprocessing and output restoration, and output ordering where applicable. Include any task-specific semantics that affect predictions. Distinguish public boundary behavior from numerical model computation, and state which capabilities the SDM port supports.
15
+
16
+ ## Build the SDM path
17
+
18
+ - Before porting blocks, specify the SDM `forward`: which public inputs become which core tensors, and how core outputs become the returned `TableTensor`.
19
+ - Keep the model wrapper responsible for SDM inputs, outputs, and lifecycle. Put reusable numerical operations in `sdm.nn`, model-specific composition and checkpoint handling in model components, and independently reusable preprocessing in `sdm.processing`.
20
+ - `ICLModel._forward` takes `TableTensor` (plus related tables when used). Unwrap to `Tensor` for numerical work and keep that tensor's device and dtype. `sdm.nn` takes `Tensor` only; keep `TableTensor` only while column or relation schema is still required.
21
+ - Start from existing `sdm.nn` components. Adapt one to the required semantics when the change is reusable across models; otherwise add a reusable component for a distinct operation. Prefer an efficient, numerically equivalent formulation over copying upstream computations, and verify it against the reference.
22
+ - Design components for clear SDM semantics, not for strict loading of an upstream state dict. Remap checkpoint keys or tensors at the loading boundary as needed, and verify that all weights required by supported inference are loaded.
23
+ - Write computations in execution order with short, typed methods and meaningful intermediate names. Extract helpers for distinct behavior or real reuse; omit upstream factories, configuration layers, and wrappers that SDM does not need.
24
+ - Compose default recipes from existing public processors. Use a fitted recipe transform only when its state can be learned from permitted data and applied without leakage; ensure any inverse transform works on the prediction's actual shape.
25
+
26
+ ## Plan reviewable PRs
27
+
28
+ Split the port into this stack. These are phases, not five PRs: Blocks and Capabilities are one PR each. Title PRs `[Model N/n]` with `n` the total count. Each PR has one reviewable outcome, names its parent PR, and keeps the branch working. Treat roughly 300 changed lines as a prompt to split, not a reason for incomplete PRs.
29
+
30
+ 1. **Skeleton (optional):** package and `ICLModel` subclass, imported only from the submodule. Zeros are allowed here.
31
+ 2. **Blocks:** one numerical piece per PR (`sdm.nn` or model component) with a focused tensor test. Add only what the working path needs.
32
+ 3. **Working path:** assemble the core, load the pinned checkpoint, and run one public `forward`/`predict` for one supported input kind (related tables only if required). The prediction matches the pinned reference; a public behavior test covers it. Zeros, stubs, or block-only tests do not complete this phase.
33
+ 4. **Capabilities:** extra input types, auxiliaries, missing values, size limits, recipe details. Keep each capability's implementation, tests, and needed docs together.
34
+ 5. **Index (last):** add the model to `sdm.models` and the docs index.
35
+
36
+ ## Verify and review
37
+
38
+ - Generate deterministic reference outputs from the pinned upstream revision. Compare observable SDM predictions through the public path, including checkpoint loading and output ordering. Claim end-to-end parity only after this comparison.
39
+ - Test supported boundaries and edge cases, such as missing or constant inputs, multiple outputs, auxiliary data, and size limits where applicable. Assert public behavior rather than internal helper layout.
40
+ - Benchmark performance-sensitive GPU changes with synchronization-aware timing.
41
+ - When reviewing a proposed port, reconstruct the upstream public contract and intended SDM call path before evaluating the diff. Check the working public slice, reference evidence, leakage boundaries, checkpoint behavior, and parity claims against that contract; suggest removing machinery unrelated to the supported path.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: processor-development
3
+ description: Create or modify reusable SDM processors and focused tests. Use when adding a processor or changing processor behavior.
4
+ ---
5
+
6
+ # Develop an SDM Processor
7
+
8
+ ## Workflow
9
+
10
+ 01. **General**: Read the repository-root `AGENTS.md` first and follow any more-specific instructions and matching skills.
11
+
12
+ 02. **Keep processors general**: Before adding behavior to a processor, check whether it describes the processing operation itself or a specific model/recipe use case. Keep only the former in sdm.processing.
13
+
14
+ 03. **Learn from existing processors**: Before implementing, inspect the target processor and a few relevant existing processors and tests. Reuse established SDM API & coding patterns rather than introducing a new approach. When modifying an existing processor, understand its current behavior and tests before changing it. For standard preprocessing operations, check the corresponding scikit-learn API and behavior before designing a new interface. Consult cuML when a comparable GPU implementation exists and its implementation is useful for SDM.
15
+
16
+ 04. **Choose the simplest processor type**: Use a regular `Processor` when its state and behavior are defined per table or batch; `EnsembleProcessorAdapter` handles its use with ensembles. Implement `EnsembleProcessor` directly only when state or behavior is scoped to logical ensemble members, depends on multiple members, or changes the ensemble structure.
17
+
18
+ 05. **Keep state and the public API minimal**: Keep fitted state private and PyTorch-native, using registered buffers and existing state containers. Do not expose processor state through new properties or methods unless required by existing public behavior. Do not treat implementation details as public API merely because existing tests access them.
19
+
20
+ 06. **Leading dimensions**: Regular processors must support arbitrary leading batch dimensions without changing their semantics.
21
+
22
+ 07. **Keep the main flow local**: Keep processor-specific logic in `_fit`, `_transform`, `_fit_transform`, and `_inverse_transform` simple and sequential. Do not add defensive validation, compatibility helpers, or convenience abstractions unless they are required by the processor's specific public behavior. Add a runtime check only when a bad value would otherwise be silently accepted with wrong semantics. Rely on AGENTS.md and the shared processor/ensemble abstractions for generic contracts and validation. Use the lifecycle behavior provided by the base classes. Override methods such as `_fit_transform` only when the processor needs different behavior or can reuse substantial computation. Avoid moving small pieces into helpers or compressing branching and multi-step logic into expressions merely to shorten the method.
23
+
24
+ 08. **Backward compatibility**: Processor APIs and internal state do not need to remain backward compatible. Do not preserve old attributes, properties, parameters, or behavior solely for compatibility. When the design changes, update affected tests and callers instead of adding compatibility layers.
25
+
26
+ 09. **Defaults require justification**: Never choose a default because it seems reasonable. Derive defaults from established semantics or evidence: first from the existing SDM contract or closest analogue, then from the established external API/reference when applicable. Prefer a neutral/no-op default when that preserves existing behavior. If no defensible default exists, require the argument instead of inventing one.
27
+
28
+ 10. **Docs:** Keep documentation minimal and proportional to the change. Document the public behavior and parameters, but do not add explanatory sections or implementation details unless they are necessary to understand how to use the processor. Do not explain ensemble grouping, member sharing, or how the operation is applied across ensemble members; that belongs on `EnsembleProcessor` and `EnsembleTable`. Mention ensemble members only when the public operation itself is routing or reducing them.
29
+
30
+ 11. **Tests:** Test shared Processor behavior through the processor contract tests and register new processors there as applicable. Keep processor-specific tests limited to behavior unique to that processor. No tests on validation.
31
+
32
+ ## Verification
33
+
34
+ Run the focused processor tests and the repository-required checks for the changed files.
35
+
36
+ ## Review
37
+
38
+ When reviewing an existing processor change, do not take the proposed implementation or its documentation as the design baseline.
39
+
40
+ 1. Reconstruct the intended behavior from the PR/task and existing public contracts.
41
+ 2. Determine how you would implement and document that behavior from scratch following this skill.
42
+ 3. Compare that minimal design with the proposed diff.
43
+ 4. Flag code that exists only because of the proposed implementation rather than because the behavior requires it, including unnecessary state, validation, compatibility layers, helpers, or public API.
44
+ 5. Write the docstring from scratch and compare it with the proposed text instead of editing the proposed text. Flag sentences that restate the summary, repeat contracts already documented on `Processor`/`EnsembleProcessor` such as batch or member independence, describe raised errors or missing validation, or state that untouched blocks stay unchanged.
45
+ 6. Check whether existing wording or tests caused implementation details to be preserved. Neither tests nor docstrings copied from sibling processors make internal behavior part of the public contract.
46
+ 7. Suggest removing unnecessary code and documentation, not only modifying it.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: recipe-development
3
+ description: Compose or restructure SDM model recipes. Use when changing a `Recipe` pipeline.
4
+ ---
5
+
6
+ # Compose an SDM Recipe
7
+
8
+ 1. **Follow the processor skill**: Read `AGENTS.md` and `processor-development`. Put only generally reusable operations in `sdm.processing`. Recipe-specific one-offs stay as lambdas.
9
+ 2. **Stay sequential**: Write the pipeline inline. Introduce a helper or wrapper only when it is required, not to name a group of steps.
10
+ 3. **No unused wrappers**: Do not wrap steps in `Sequential`, dtype casts, or named helpers unless they change behavior or remove real duplication.
@@ -0,0 +1,129 @@
1
+ # yaml-language-server: $schema=https://storage.googleapis.com/coderabbit_public_assets/schema.v2.json
2
+
3
+ language: en-US
4
+
5
+ tone_instructions: >-
6
+ Be concise and technical. Prioritize correctness, tensor semantics
7
+ (shape/device/dtype), API design, and leakage-sensitive preprocessing.
8
+ Skip style nitpicks already enforced by ruff and pre-commit.
9
+
10
+ reviews:
11
+ profile: quiet
12
+ request_changes_workflow: false
13
+ high_level_summary: true
14
+ high_level_summary_in_walkthrough: true
15
+ poem: false
16
+ review_status: false
17
+ collapse_walkthrough: true
18
+ sequence_diagrams: true
19
+ in_progress_fortune: false
20
+ suggested_labels: false
21
+ suggested_reviewers: false
22
+
23
+ path_filters:
24
+ - '!uv.lock'
25
+ - '!build/**'
26
+ - '!**/*.egg-info/**'
27
+
28
+ path_instructions:
29
+ - path: 'sdm/**/*.py'
30
+ instructions: >-
31
+ Core library code. Enforce the project's PyTorch-centric style:
32
+ typed function and method boundaries; keyword arguments in
33
+ multi-line calls; no `else` after return/raise/break/continue;
34
+ prefer vectorized PyTorch tensor operations over NumPy or Python
35
+ loops; preserve tensor device and dtype, flagging accidental
36
+ transfers via `.cpu()`, `.numpy()`, `.item()`, Python scalars, or
37
+ newly-created CPU tensors; prefer tensor methods over functions
38
+ (e.g. `x.log()` over `torch.log(x)`); expect short shape comments
39
+ on complex tensor operations; avoid formulations that cause
40
+ avoidable `torch.compile` graph breaks. Treat preprocessing as
41
+ leakage-sensitive: transformations that learn state must be
42
+ scoped to the context/training portion unless explicitly designed
43
+ otherwise, and stochastic transformations must expose
44
+ seed/generator control. Keep model-family wrappers thin, avoid
45
+ config-first APIs, and keep core dependencies minimal (heavy
46
+ dependencies optional). In `__init__.py`, imports and `__all__`
47
+ are intentionally ordered by dependency, not alphabetically — do
48
+ not suggest alphabetical sorting there.
49
+ - path: 'test/**/*.py'
50
+ instructions: >-
51
+ Pytest-based tests. Check that behavior changes in sdm/ have
52
+ corresponding test coverage, randomness is controlled via fixed
53
+ seeds or generators, and parametrization covers relevant
54
+ dtype/device variants. Plain pytest functions are preferred over
55
+ unittest-style classes.
56
+ - path: 'examples/**'
57
+ instructions: >-
58
+ Runnable benchmark/usage examples. Prioritize readability and
59
+ end-to-end correctness over micro-optimization, but still flag
60
+ API misuse and data leakage between train/test portions.
61
+
62
+ auto_review:
63
+ enabled: true
64
+ drafts: false
65
+
66
+ slop_detection:
67
+ enabled: true
68
+
69
+ finishing_touches:
70
+ docstrings:
71
+ enabled: true
72
+ unit_tests:
73
+ enabled: true
74
+
75
+ pre_merge_checks:
76
+ title:
77
+ mode: warning
78
+ description:
79
+ mode: warning
80
+
81
+ tools:
82
+ ruff:
83
+ enabled: true
84
+ yamllint:
85
+ enabled: false
86
+ markdownlint:
87
+ enabled: false
88
+ languagetool:
89
+ enabled: false
90
+ actionlint:
91
+ enabled: true
92
+ gitleaks:
93
+ enabled: true
94
+ github-checks:
95
+ enabled: true
96
+
97
+ chat:
98
+ auto_reply: true
99
+ art: false
100
+ allow_non_org_members: false
101
+
102
+ knowledge_base:
103
+ opt_out: false
104
+ learnings:
105
+ scope: local
106
+ pull_requests:
107
+ scope: local
108
+
109
+ code_generation:
110
+ docstrings:
111
+ language: en-US
112
+ path_instructions:
113
+ - path: 'sdm/**/*.py'
114
+ instructions: >-
115
+ Follow Google-style docstrings (ruff pydocstyle
116
+ convention=google, line length 79). Start with a one-line
117
+ imperative summary. Document public constructor parameters in
118
+ an Args section. Use bracket shape notation for tensors, e.g.
119
+ `[batch_size, num_cols, dim]`. Cite the paper when the
120
+ implementation follows one. Do not add docstrings to magic
121
+ methods or `__init__` (D105/D107 are ignored).
122
+ unit_tests:
123
+ path_instructions:
124
+ - path: 'sdm/**/*.py'
125
+ instructions: >-
126
+ Place tests under test/ mirroring the sdm/ package layout. Use
127
+ plain pytest functions with `pytest.mark.parametrize` for
128
+ dtype/device variants, fixed seeds or explicit generators for
129
+ any randomness, and `sdm.testing` utilities where applicable.
@@ -0,0 +1 @@
1
+ * @rusty1s @akihironitta @RBendias @aw471
@@ -0,0 +1,3 @@
1
+ enabled: true
2
+ auto_sync_draft: false
3
+ auto_sync_ready: true
@@ -0,0 +1,56 @@
1
+ name: Documentation
2
+
3
+ on: # yamllint disable-line rule:truthy
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+
10
+ permissions:
11
+ contents: write # gh-pages push
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
15
+ cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
16
+
17
+ jobs:
18
+ make_html:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
23
+
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
26
+ with:
27
+ python-version: '3.11'
28
+ activate-environment: true
29
+
30
+ - name: Install package
31
+ run: |
32
+ uv pip install --torch-backend=cpu --group=doc .
33
+
34
+ - name: Build documentation
35
+ working-directory: ./docs
36
+ run: |
37
+ uv run --no-project sphinx-build -M html "source" "build" -W --keep-going
38
+
39
+ - name: Upload documentation
40
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
41
+ with:
42
+ name: documentation
43
+ path: docs/build/html
44
+ retention-days: 1
45
+
46
+ - name: Run doctests
47
+ working-directory: ./docs
48
+ run: |
49
+ uv run --no-project sphinx-build -M doctest "source" "build" -W --keep-going
50
+
51
+ - name: Push documentation to gh-pages
52
+ if: github.event_name == 'push'
53
+ uses: peaceiris/actions-gh-pages@v4
54
+ with:
55
+ github_token: ${{ secrets.GITHUB_TOKEN }}
56
+ publish_dir: docs/build/html
@@ -0,0 +1,44 @@
1
+ name: Lint
2
+
3
+ on: # yamllint disable-line rule:truthy
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }} # yamllint disable-line
12
+ cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ pre-commit:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
23
+
24
+ - name: Cache pre-commit
25
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
26
+ with:
27
+ path: ~/.cache/pre-commit
28
+ key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
29
+
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
32
+ with:
33
+ python-version: '3.11'
34
+ activate-environment: true
35
+
36
+ - name: Install package and pre-commit
37
+ run: |
38
+ uv pip install --torch-backend=cpu . pre-commit
39
+
40
+ - name: Run pre-commit
41
+ run: |
42
+ uv run --no-project pre-commit run --all-files
43
+ env:
44
+ SKIP: 'no-commit-to-branch'
@@ -0,0 +1,56 @@
1
+ name: Publish
2
+
3
+ on: # yamllint disable-line rule:truthy
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ if: ${{ !github.event.release.prerelease }}
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ with:
18
+ ref: ${{ github.event.release.tag_name }}
19
+ fetch-depth: 0
20
+ persist-credentials: false
21
+
22
+ - uses: actions/setup-python@v6
23
+ with:
24
+ python-version: '3.11'
25
+
26
+ - name: Build distributions
27
+ run: |
28
+ python -m pip install --upgrade build twine
29
+ python -m build
30
+ python -m twine check dist/*
31
+
32
+ - uses: actions/upload-artifact@v5
33
+ with:
34
+ name: python-package-distributions
35
+ path: dist/
36
+ if-no-files-found: error
37
+
38
+ publish:
39
+ if: ${{ !github.event.release.prerelease }}
40
+ needs: build
41
+ runs-on: ubuntu-latest
42
+
43
+ environment:
44
+ name: pypi
45
+ url: https://pypi.org/project/structured-data-models/
46
+
47
+ permissions:
48
+ id-token: write
49
+
50
+ steps:
51
+ - uses: actions/download-artifact@v6
52
+ with:
53
+ name: python-package-distributions
54
+ path: dist/
55
+
56
+ - uses: pypa/gh-action-pypi-publish@release/v1