Skip to content

Add Mitra-v2 regressor via optional mitra-finetune dependency - #295

Merged
shchur merged 5 commits into
masterfrom
mitra-v2-regressor
Oct 12, 2026
Merged

shchur merged 5 commits into
masterfrom
mitra-v2-regressor

Conversation

@shchur

@shchur shchur commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Adds mitra-v2-regressor, which runs through the patches in mitra-finetune 0.3.0. The patch is temporary: AutoGluon 1.7 is expected to support the checkpoint natively.

  • FoundationModelConfig.requirements: list[str]: lines of a requirements.txt that the container installs before the model is used. The backend writes it into the training sourcedir.tar.gz (installed by sagemaker_training) and into the model's code/ dir (installed by the DLC serve entrypoint's install_requirements.py before Gunicorn starts). Both honour CA_REPOSITORY_ARN. Covers fit() / batch predict, fresh deploy() and cache_model_artifact().
  • New mitra-v2-regressor registry entry (autogluon/mitra-regressor-2) with requirements=["mitra-finetune==0.3.0"].
  • serving_utils/mitra.py: patch_mitra_regressor applies install_d2h_sync_patch, install_reg_ce_patches(n_bins) (n_bins from checkpoint config.json) and install_use_hf_patch if mitra_finetune is importable and hf_reg_model is set. Only the v2 registry entry installs the package, so nothing else is patched. serving_utils/ now also ships in the training sourcedir, so tabular_fm_serve.py and train.py share the helper.
  • Docs: mitra-v2-regressor row in the tabular foundation model table.
  • Tests: inference hyperparameters for mitra-v2-regressor; training sourcedir contents with and without requirements.txt.

Caveat: custom images not built on the DLC entrypoint won't install requirements.txt.

shchur added 4 commits October 8, 2026 15:20
Add FoundationModelConfig.optional_dependencies, pip-installed in the training / serving
container before the model is used. mitra-v2-regressor ships mitra-finetune==0.3.0 (TestPyPI),
whose patches switch AutoGluon 1.6 Mitra to the v2 cross-entropy regression head.
… pip in the scripts

Rename FoundationModelConfig.optional_dependencies to requirements. The backend writes them as
requirements.txt into the training sourcedir and the model's code/ dir, which the DLC installs
before running the script.
…Mitra patch helper instead of duplicating it
…rparameters, add Mitra-v2 regressor docs and tests
@shchur
shchur marked this pull request as ready for review October 12, 2026 14:13
@shchur shchur changed the title Add Mitra-v2 regressor via optional mitra-finetune dependency (MVP) Add Mitra-v2 regressor via optional mitra-finetune dependency Oct 12, 2026
@shchur
shchur enabled auto-merge (squash) October 12, 2026 14:18
@github-actions

Copy link
Copy Markdown

Job PR-295-daccfdd is done.
Docs are uploaded to https://d12sc05jpx1wj5.cloudfront.net/PR-295/daccfdd/index.html

@shchur
shchur merged commit 2532c5d into master Oct 12, 2026
9 checks passed
@shchur
shchur deleted the mitra-v2-regressor branch October 12, 2026 14:32
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