Skip to content

Preserve TabM backbone_params in TorchUniversalModel#176

Open
tippered1-debug wants to merge 1 commit into
sb-ai-lab:masterfrom
tippered1-debug:fix-tabm-backbone-params
Open

Preserve TabM backbone_params in TorchUniversalModel#176
tippered1-debug wants to merge 1 commit into
sb-ai-lab:masterfrom
tippered1-debug:fix-tabm-backbone-params

Conversation

@tippered1-debug

Copy link
Copy Markdown

Fixes TabM parameter propagation.

TorchUniversalModel was overwriting backbone_params when adding start_scaling_init_chunks. Because of that, user-provided TabM params like k, d_block, n_blocks, dropout, and arch_type could be ignored.

This PR preserves the existing backbone_params and only adds start_scaling_init_chunks.

It also makes the TabM batch sampler read k from backbone_params, so the sampler uses the same ensemble size as the TabM model.

Added tests for preserving backbone_params and reading TabM k correctly.

Checks run:

.venv/bin/python -m pytest tests/unit/test_automl/test_presets/test_tabularautoml_tabm.py -q -k "preserves_backbone_params or uses_tabm_k"
.venv/bin/python -m py_compile lightautoml/text/nn_model.py lightautoml/ml_algo/dl_model.py tests/unit/test_automl/test_presets/test_tabularautoml_tabm.py
git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant