structured-data-models 0.0.0a0__tar.gz → 0.2.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.
- structured_data_models-0.2.0/.agents/skills/docstring/SKILL.md +103 -0
- structured_data_models-0.2.0/.agents/skills/port-external-models/SKILL.md +41 -0
- structured_data_models-0.2.0/.agents/skills/processor-development/SKILL.md +46 -0
- structured_data_models-0.2.0/.agents/skills/recipe-development/SKILL.md +10 -0
- structured_data_models-0.2.0/.coderabbit.yaml +129 -0
- structured_data_models-0.2.0/.github/CODEOWNERS +1 -0
- structured_data_models-0.2.0/.github/copy-pr-bot.yaml +3 -0
- structured_data_models-0.2.0/.github/workflows/doc.yml +56 -0
- structured_data_models-0.2.0/.github/workflows/lint.yml +44 -0
- structured_data_models-0.2.0/.github/workflows/publish.yml +1 -0
- structured_data_models-0.2.0/.github/workflows/test-gpu.yml +232 -0
- structured_data_models-0.2.0/.github/workflows/test.yml +50 -0
- structured_data_models-0.2.0/.gitignore +225 -0
- structured_data_models-0.2.0/.pre-commit-config.yaml +63 -0
- structured_data_models-0.2.0/AGENTS.md +120 -0
- structured_data_models-0.2.0/CLAUDE.md +120 -0
- structured_data_models-0.2.0/CODE_OF_CONDUCT.md +85 -0
- structured_data_models-0.2.0/CONTRIBUTING.md +155 -0
- structured_data_models-0.2.0/LICENSE +204 -0
- structured_data_models-0.2.0/PKG-INFO +142 -0
- structured_data_models-0.2.0/README.md +106 -0
- structured_data_models-0.2.0/SECURITY.md +25 -0
- structured_data_models-0.2.0/THIRD_PARTY_LICENSES.md +40 -0
- structured_data_models-0.2.0/benchmark/README.md +11 -0
- structured_data_models-0.2.0/benchmark/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/relational/relarena/README.md +65 -0
- structured_data_models-0.2.0/benchmark/relational/relarena/kumo_relational.py +308 -0
- structured_data_models-0.2.0/benchmark/tabular/README.md +115 -0
- structured_data_models-0.2.0/benchmark/tabular/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/tabular/beyondarena/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/tabular/beyondarena/evaluate.py +61 -0
- structured_data_models-0.2.0/benchmark/tabular/beyondarena/main.py +96 -0
- structured_data_models-0.2.0/benchmark/tabular/model.py +476 -0
- structured_data_models-0.2.0/benchmark/tabular/scoringbench/README.md +58 -0
- structured_data_models-0.2.0/benchmark/tabular/scoringbench/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/tabular/scoringbench/evaluate.py +125 -0
- structured_data_models-0.2.0/benchmark/tabular/scoringbench/main.py +133 -0
- structured_data_models-0.2.0/benchmark/tabular/scoringbench/models.py +175 -0
- structured_data_models-0.2.0/benchmark/tabular/tabarena/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/tabular/tabarena/evaluate.py +59 -0
- structured_data_models-0.2.0/benchmark/tabular/tabarena/main.py +99 -0
- structured_data_models-0.2.0/benchmark/tabular/talent/README.md +58 -0
- structured_data_models-0.2.0/benchmark/tabular/talent/__init__.py +2 -0
- structured_data_models-0.2.0/benchmark/tabular/talent/evaluate.py +213 -0
- structured_data_models-0.2.0/benchmark/tabular/talent/main.py +124 -0
- structured_data_models-0.2.0/benchmark/tabular/talent/models.py +405 -0
- structured_data_models-0.2.0/docs/Makefile +15 -0
- structured_data_models-0.2.0/docs/source/_static/custom.css +23 -0
- structured_data_models-0.2.0/docs/source/_templates/autosummary/class.rst +7 -0
- structured_data_models-0.2.0/docs/source/_templates/autosummary/function.rst +5 -0
- structured_data_models-0.2.0/docs/source/_templates/autosummary/model_class.rst +42 -0
- structured_data_models-0.2.0/docs/source/_templates/autosummary/processor_class.rst +31 -0
- structured_data_models-0.2.0/docs/source/_templates/autosummary/tensor_class.rst +8 -0
- structured_data_models-0.2.0/docs/source/_templates/partials/site-foot.html +0 -0
- structured_data_models-0.2.0/docs/source/api/evaluation.rst +10 -0
- structured_data_models-0.2.0/docs/source/api/explain.rst +10 -0
- structured_data_models-0.2.0/docs/source/api/internal/cache.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/device_mixin.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/ensemble_table.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/kv_cache_entry.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/related_tables_schema.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/relational_sampler_output.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/internal/table_schema.rst +7 -0
- structured_data_models-0.2.0/docs/source/api/models.rst +54 -0
- structured_data_models-0.2.0/docs/source/api/nn.rst +10 -0
- structured_data_models-0.2.0/docs/source/api/processing.rst +87 -0
- structured_data_models-0.2.0/docs/source/api/relational.rst +10 -0
- structured_data_models-0.2.0/docs/source/api/sdm.rst +10 -0
- structured_data_models-0.2.0/docs/source/api/tensor.rst +11 -0
- structured_data_models-0.2.0/docs/source/conf.py +167 -0
- structured_data_models-0.2.0/docs/source/icl.md +275 -0
- structured_data_models-0.2.0/docs/source/images/ensemble_dark.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/ensemble_light.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/graph_dark.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/graph_light.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/kumo_relational_dark.svg +2265 -0
- structured_data_models-0.2.0/docs/source/images/kumo_relational_light.svg +2265 -0
- structured_data_models-0.2.0/docs/source/images/kumo_tabular.svg +3 -0
- structured_data_models-0.2.0/docs/source/images/logo_dark.svg +156 -0
- structured_data_models-0.2.0/docs/source/images/logo_light.svg +156 -0
- structured_data_models-0.2.0/docs/source/images/nvidia.svg +1 -0
- structured_data_models-0.2.0/docs/source/images/pipeline_dark.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/pipeline_light.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/tabfm_dark.png +0 -0
- structured_data_models-0.2.0/docs/source/images/tabfm_light.png +0 -0
- structured_data_models-0.2.0/docs/source/images/tabicl_dark.svg +1089 -0
- structured_data_models-0.2.0/docs/source/images/tabicl_light.svg +1089 -0
- structured_data_models-0.2.0/docs/source/images/table_dark.svg +4 -0
- structured_data_models-0.2.0/docs/source/images/table_light.svg +4 -0
- structured_data_models-0.2.0/docs/source/index.md +48 -0
- structured_data_models-0.2.0/docs/source/install.md +12 -0
- structured_data_models-0.2.0/docs/source/overview.md +109 -0
- structured_data_models-0.2.0/docs/source/processing.md +122 -0
- structured_data_models-0.2.0/docs/source/tensor.md +174 -0
- structured_data_models-0.2.0/examples/README.md +8 -0
- structured_data_models-0.2.0/examples/relational/rel_bench.py +219 -0
- structured_data_models-0.2.0/examples/relational/salt/README.md +30 -0
- structured_data_models-0.2.0/examples/relational/salt/main.py +209 -0
- structured_data_models-0.2.0/examples/tabular/finetune.py +157 -0
- structured_data_models-0.2.0/examples/tabular/quickstart.py +56 -0
- structured_data_models-0.2.0/examples/tabular/text.py +76 -0
- structured_data_models-0.2.0/pyproject.toml +263 -0
- structured_data_models-0.2.0/sdm/__init__.py +58 -0
- structured_data_models-0.2.0/sdm/_constants.py +6 -0
- structured_data_models-0.2.0/sdm/_inference.py +42 -0
- structured_data_models-0.2.0/sdm/_kernels/__init__.py +10 -0
- structured_data_models-0.2.0/sdm/_kernels/rmsnorm_cast.py +92 -0
- structured_data_models-0.2.0/sdm/_kernels/segment_multi_reduce.py +141 -0
- structured_data_models-0.2.0/sdm/_kernels/triton/__init__.py +7 -0
- structured_data_models-0.2.0/sdm/_kernels/triton/rmsnorm_cast.py +136 -0
- structured_data_models-0.2.0/sdm/_kernels/triton/segment_multi_reduce.py +173 -0
- structured_data_models-0.2.0/sdm/_memory.py +34 -0
- structured_data_models-0.2.0/sdm/_warnings.py +29 -0
- structured_data_models-0.2.0/sdm/cache.py +163 -0
- structured_data_models-0.2.0/sdm/ensemble.py +501 -0
- structured_data_models-0.2.0/sdm/evaluation/__init__.py +11 -0
- structured_data_models-0.2.0/sdm/evaluation/classification.py +205 -0
- structured_data_models-0.2.0/sdm/explain/__init__.py +12 -0
- structured_data_models-0.2.0/sdm/explain/base.py +123 -0
- structured_data_models-0.2.0/sdm/explain/gradient.py +112 -0
- structured_data_models-0.2.0/sdm/models/__init__.py +20 -0
- structured_data_models-0.2.0/sdm/models/_huggingface.py +58 -0
- structured_data_models-0.2.0/sdm/models/base.py +966 -0
- structured_data_models-0.2.0/sdm/models/callback.py +106 -0
- structured_data_models-0.2.0/sdm/models/ecoc.py +197 -0
- structured_data_models-0.2.0/sdm/models/kumo/__init__.py +13 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/NOTICE +5 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/__init__.py +11 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/graph.py +101 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/invariant_gnn.py +122 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/model.py +602 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/recipe.py +18 -0
- structured_data_models-0.2.0/sdm/models/kumo/relational/task.py +113 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/__init__.py +17 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/batching.py +139 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/block.py +100 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/cell_embedding.py +85 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/icl.py +136 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/model.py +299 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/recipe.py +71 -0
- structured_data_models-0.2.0/sdm/models/kumo/tabular/row_embedding.py +214 -0
- structured_data_models-0.2.0/sdm/models/tabfm/LICENSE +209 -0
- structured_data_models-0.2.0/sdm/models/tabfm/__init__.py +11 -0
- structured_data_models-0.2.0/sdm/models/tabfm/block.py +94 -0
- structured_data_models-0.2.0/sdm/models/tabfm/cell_embedding.py +219 -0
- structured_data_models-0.2.0/sdm/models/tabfm/ckpt.py +242 -0
- structured_data_models-0.2.0/sdm/models/tabfm/icl.py +107 -0
- structured_data_models-0.2.0/sdm/models/tabfm/model.py +261 -0
- structured_data_models-0.2.0/sdm/models/tabfm/recipe.py +46 -0
- structured_data_models-0.2.0/sdm/models/tabfm/row_embedding.py +241 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/LICENSE +33 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/__init__.py +11 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/block.py +81 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/ckpt.py +134 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/icl.py +420 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/model.py +293 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/recipe.py +46 -0
- structured_data_models-0.2.0/sdm/models/tabiclv2/row_embedding.py +254 -0
- structured_data_models-0.2.0/sdm/nn/__init__.py +28 -0
- structured_data_models-0.2.0/sdm/nn/_buffer.py +91 -0
- structured_data_models-0.2.0/sdm/nn/attention.py +825 -0
- structured_data_models-0.2.0/sdm/nn/glu.py +78 -0
- structured_data_models-0.2.0/sdm/nn/linear.py +46 -0
- structured_data_models-0.2.0/sdm/nn/rms_norm.py +59 -0
- structured_data_models-0.2.0/sdm/nn/rope.py +107 -0
- structured_data_models-0.2.0/sdm/nn/scaling.py +240 -0
- structured_data_models-0.2.0/sdm/nn/set_transformer.py +162 -0
- structured_data_models-0.2.0/sdm/nn/softplus.py +65 -0
- structured_data_models-0.2.0/sdm/processing/__init__.py +96 -0
- structured_data_models-0.2.0/sdm/processing/base.py +254 -0
- structured_data_models-0.2.0/sdm/processing/categorical/__init__.py +16 -0
- structured_data_models-0.2.0/sdm/processing/categorical/_categorical.py +60 -0
- structured_data_models-0.2.0/sdm/processing/categorical/align.py +540 -0
- structured_data_models-0.2.0/sdm/processing/categorical/count.py +121 -0
- structured_data_models-0.2.0/sdm/processing/categorical/impute.py +107 -0
- structured_data_models-0.2.0/sdm/processing/categorical/shuffle.py +204 -0
- structured_data_models-0.2.0/sdm/processing/common/__init__.py +32 -0
- structured_data_models-0.2.0/sdm/processing/common/callable.py +29 -0
- structured_data_models-0.2.0/sdm/processing/common/choice.py +185 -0
- structured_data_models-0.2.0/sdm/processing/common/drop.py +28 -0
- structured_data_models-0.2.0/sdm/processing/common/ensemble.py +187 -0
- structured_data_models-0.2.0/sdm/processing/common/identity.py +18 -0
- structured_data_models-0.2.0/sdm/processing/common/select.py +107 -0
- structured_data_models-0.2.0/sdm/processing/common/sequential.py +158 -0
- structured_data_models-0.2.0/sdm/processing/common/shuffle.py +195 -0
- structured_data_models-0.2.0/sdm/processing/common/stype.py +199 -0
- structured_data_models-0.2.0/sdm/processing/common/table.py +120 -0
- structured_data_models-0.2.0/sdm/processing/common/task.py +135 -0
- structured_data_models-0.2.0/sdm/processing/common/to_numerical.py +60 -0
- structured_data_models-0.2.0/sdm/processing/datetime/__init__.py +8 -0
- structured_data_models-0.2.0/sdm/processing/datetime/calendar.py +196 -0
- structured_data_models-0.2.0/sdm/processing/ensemble.py +203 -0
- structured_data_models-0.2.0/sdm/processing/execution.py +418 -0
- structured_data_models-0.2.0/sdm/processing/numerical/__init__.py +38 -0
- structured_data_models-0.2.0/sdm/processing/numerical/_stats.py +29 -0
- structured_data_models-0.2.0/sdm/processing/numerical/cast.py +33 -0
- structured_data_models-0.2.0/sdm/processing/numerical/clip.py +48 -0
- structured_data_models-0.2.0/sdm/processing/numerical/clip_soft.py +54 -0
- structured_data_models-0.2.0/sdm/processing/numerical/constant.py +235 -0
- structured_data_models-0.2.0/sdm/processing/numerical/flip_sign.py +78 -0
- structured_data_models-0.2.0/sdm/processing/numerical/impute.py +52 -0
- structured_data_models-0.2.0/sdm/processing/numerical/pca.py +62 -0
- structured_data_models-0.2.0/sdm/processing/numerical/power.py +325 -0
- structured_data_models-0.2.0/sdm/processing/numerical/quantile.py +306 -0
- structured_data_models-0.2.0/sdm/processing/numerical/quantile_clip.py +63 -0
- structured_data_models-0.2.0/sdm/processing/numerical/random_projection.py +86 -0
- structured_data_models-0.2.0/sdm/processing/numerical/rank_gaussian.py +168 -0
- structured_data_models-0.2.0/sdm/processing/numerical/robust_scale.py +88 -0
- structured_data_models-0.2.0/sdm/processing/numerical/sigma_clip.py +123 -0
- structured_data_models-0.2.0/sdm/processing/numerical/standardize.py +71 -0
- structured_data_models-0.2.0/sdm/processing/output/__init__.py +14 -0
- structured_data_models-0.2.0/sdm/processing/output/reduce.py +86 -0
- structured_data_models-0.2.0/sdm/processing/output/softmax.py +48 -0
- structured_data_models-0.2.0/sdm/processing/output/sort.py +16 -0
- structured_data_models-0.2.0/sdm/processing/recipe.py +154 -0
- structured_data_models-0.2.0/sdm/processing/text/__init__.py +12 -0
- structured_data_models-0.2.0/sdm/processing/text/sentence_transformer.py +451 -0
- structured_data_models-0.2.0/sdm/processing/text/tfidf.py +478 -0
- structured_data_models-0.2.0/sdm/relational/__init__.py +16 -0
- structured_data_models-0.2.0/sdm/relational/backend/__init__.py +12 -0
- structured_data_models-0.2.0/sdm/relational/backend/_cugraph.py +546 -0
- structured_data_models-0.2.0/sdm/relational/backend/_pyg_lib.py +175 -0
- structured_data_models-0.2.0/sdm/relational/data.py +393 -0
- structured_data_models-0.2.0/sdm/relational/join.py +173 -0
- structured_data_models-0.2.0/sdm/relational/sampler.py +259 -0
- structured_data_models-0.2.0/sdm/relational/task.py +465 -0
- structured_data_models-0.2.0/sdm/stype.py +396 -0
- structured_data_models-0.2.0/sdm/task.py +53 -0
- structured_data_models-0.2.0/sdm/tensor/__init__.py +20 -0
- structured_data_models-0.2.0/sdm/tensor/categorical.py +953 -0
- structured_data_models-0.2.0/sdm/tensor/columnar.py +1127 -0
- structured_data_models-0.2.0/sdm/tensor/io/__init__.py +22 -0
- structured_data_models-0.2.0/sdm/tensor/io/arrow.py +120 -0
- structured_data_models-0.2.0/sdm/tensor/io/cudf.py +47 -0
- structured_data_models-0.2.0/sdm/tensor/mixin.py +124 -0
- structured_data_models-0.2.0/sdm/tensor/nullable.py +963 -0
- structured_data_models-0.2.0/sdm/tensor/string.py +526 -0
- structured_data_models-0.2.0/sdm/tensor/table.py +2035 -0
- structured_data_models-0.2.0/sdm/tensor/var_len.py +1486 -0
- structured_data_models-0.2.0/sdm/testing/__init__.py +14 -0
- structured_data_models-0.2.0/sdm/testing/decorators.py +61 -0
- structured_data_models-0.2.0/sdm/testing/memory.py +92 -0
- structured_data_models-0.2.0/setup.cfg +4 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/PKG-INFO +142 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/SOURCES.txt +338 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/dependency_links.txt +1 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/requires.txt +6 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/scm_file_list.json +335 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/scm_version.json +8 -0
- structured_data_models-0.2.0/structured_data_models.egg-info/top_level.txt +1 -0
- structured_data_models-0.2.0/test/_kernels/test_rmsnorm_cast.py +178 -0
- structured_data_models-0.2.0/test/_kernels/test_segment_multi_reduce.py +389 -0
- structured_data_models-0.2.0/test/conftest.py +137 -0
- structured_data_models-0.2.0/test/evaluation/test_classification.py +60 -0
- structured_data_models-0.2.0/test/explain/test_base.py +53 -0
- structured_data_models-0.2.0/test/explain/test_gradient.py +137 -0
- structured_data_models-0.2.0/test/models/kumo/relational/test_model.py +341 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_batching.py +95 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_block.py +71 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_cell_embedding.py +107 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_icl.py +81 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_model.py +335 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_recipe.py +152 -0
- structured_data_models-0.2.0/test/models/kumo/tabular/test_row_embedding.py +48 -0
- structured_data_models-0.2.0/test/models/tabfm/test_cell_embedding.py +66 -0
- structured_data_models-0.2.0/test/models/tabfm/test_model.py +101 -0
- structured_data_models-0.2.0/test/models/tabiclv2/test_icl.py +304 -0
- structured_data_models-0.2.0/test/models/tabiclv2/test_model.py +326 -0
- structured_data_models-0.2.0/test/models/test_base.py +892 -0
- structured_data_models-0.2.0/test/models/test_ecoc.py +133 -0
- structured_data_models-0.2.0/test/nn/test_attention.py +750 -0
- structured_data_models-0.2.0/test/nn/test_buffer.py +142 -0
- structured_data_models-0.2.0/test/nn/test_compile.py +321 -0
- structured_data_models-0.2.0/test/nn/test_glu.py +16 -0
- structured_data_models-0.2.0/test/nn/test_linear.py +25 -0
- structured_data_models-0.2.0/test/nn/test_rms_norm.py +144 -0
- structured_data_models-0.2.0/test/nn/test_rope.py +88 -0
- structured_data_models-0.2.0/test/nn/test_scaling.py +96 -0
- structured_data_models-0.2.0/test/nn/test_set_transformer.py +160 -0
- structured_data_models-0.2.0/test/processing/categorical/test_align.py +506 -0
- structured_data_models-0.2.0/test/processing/categorical/test_count.py +159 -0
- structured_data_models-0.2.0/test/processing/categorical/test_impute.py +169 -0
- structured_data_models-0.2.0/test/processing/categorical/test_shuffle.py +222 -0
- structured_data_models-0.2.0/test/processing/common/test_choice.py +253 -0
- structured_data_models-0.2.0/test/processing/common/test_drop.py +33 -0
- structured_data_models-0.2.0/test/processing/common/test_identity.py +30 -0
- structured_data_models-0.2.0/test/processing/common/test_select.py +50 -0
- structured_data_models-0.2.0/test/processing/common/test_sequential.py +223 -0
- structured_data_models-0.2.0/test/processing/common/test_shuffle.py +150 -0
- structured_data_models-0.2.0/test/processing/common/test_stype.py +211 -0
- structured_data_models-0.2.0/test/processing/common/test_table.py +49 -0
- structured_data_models-0.2.0/test/processing/common/test_task.py +90 -0
- structured_data_models-0.2.0/test/processing/common/test_to_numerical.py +84 -0
- structured_data_models-0.2.0/test/processing/datetime/test_calendar.py +72 -0
- structured_data_models-0.2.0/test/processing/numerical/test_cast.py +34 -0
- structured_data_models-0.2.0/test/processing/numerical/test_clip.py +37 -0
- structured_data_models-0.2.0/test/processing/numerical/test_clip_soft.py +82 -0
- structured_data_models-0.2.0/test/processing/numerical/test_constant.py +144 -0
- structured_data_models-0.2.0/test/processing/numerical/test_flip_sign.py +31 -0
- structured_data_models-0.2.0/test/processing/numerical/test_impute.py +85 -0
- structured_data_models-0.2.0/test/processing/numerical/test_pca.py +40 -0
- structured_data_models-0.2.0/test/processing/numerical/test_power.py +426 -0
- structured_data_models-0.2.0/test/processing/numerical/test_quantile.py +264 -0
- structured_data_models-0.2.0/test/processing/numerical/test_quantile_clip.py +119 -0
- structured_data_models-0.2.0/test/processing/numerical/test_random_projection.py +32 -0
- structured_data_models-0.2.0/test/processing/numerical/test_rank_gaussian.py +306 -0
- structured_data_models-0.2.0/test/processing/numerical/test_robust_scale.py +221 -0
- structured_data_models-0.2.0/test/processing/numerical/test_sigma_clip.py +183 -0
- structured_data_models-0.2.0/test/processing/numerical/test_standardize.py +130 -0
- structured_data_models-0.2.0/test/processing/output/test_reduce.py +152 -0
- structured_data_models-0.2.0/test/processing/output/test_softmax.py +53 -0
- structured_data_models-0.2.0/test/processing/output/test_sort.py +20 -0
- structured_data_models-0.2.0/test/processing/test_contract.py +367 -0
- structured_data_models-0.2.0/test/processing/test_ensemble.py +240 -0
- structured_data_models-0.2.0/test/processing/test_execution.py +382 -0
- structured_data_models-0.2.0/test/processing/test_fitted_guard.py +168 -0
- structured_data_models-0.2.0/test/processing/test_recipe.py +127 -0
- structured_data_models-0.2.0/test/processing/text/test_sentence_transformer.py +296 -0
- structured_data_models-0.2.0/test/processing/text/test_tfidf.py +346 -0
- structured_data_models-0.2.0/test/relational/backend/test_cugraph.py +482 -0
- structured_data_models-0.2.0/test/relational/backend/test_sampler_parity.py +275 -0
- structured_data_models-0.2.0/test/relational/test_data.py +66 -0
- structured_data_models-0.2.0/test/relational/test_join.py +92 -0
- structured_data_models-0.2.0/test/relational/test_sampler.py +260 -0
- structured_data_models-0.2.0/test/tensor/test_categorical.py +634 -0
- structured_data_models-0.2.0/test/tensor/test_columnar.py +465 -0
- structured_data_models-0.2.0/test/tensor/test_io.py +91 -0
- structured_data_models-0.2.0/test/tensor/test_nullable.py +105 -0
- structured_data_models-0.2.0/test/tensor/test_record_stream.py +34 -0
- structured_data_models-0.2.0/test/tensor/test_string.py +384 -0
- structured_data_models-0.2.0/test/tensor/test_table.py +1666 -0
- structured_data_models-0.2.0/test/tensor/test_var_len.py +995 -0
- structured_data_models-0.2.0/test/test_cache.py +47 -0
- structured_data_models-0.2.0/test/test_ensemble.py +285 -0
- structured_data_models-0.2.0/test/test_stype.py +194 -0
- structured_data_models-0.2.0/third_party/contributor-covenant/LICENSE +20 -0
- structured_data_models-0.2.0/third_party/pytorch/LICENSE +84 -0
- structured_data_models-0.2.0/third_party/tabpfn-extensions/LICENSE +202 -0
- structured_data_models-0.2.0/uv.lock +2432 -0
- structured_data_models-0.0.0a0/MANIFEST.in +0 -4
- structured_data_models-0.0.0a0/PKG-INFO +0 -13
- structured_data_models-0.0.0a0/README.md +0 -3
- structured_data_models-0.0.0a0/pyproject.toml +0 -18
- 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,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 @@
|
|
|
1
|
+
# Placeholder for future PyPI Trusted Publishing workflow.
|