Remove the dead cache_trainset_representation flag - #1250
Open
jmkuebler wants to merge 3 commits into
Open
Conversation
Every architecture's get_architecture accepted the flag and deleted it unused: model-internal caching went away with InferenceEngineCacheKV (#1057), and the KV cache is owned by the inference engine. Drop it from the ArchitectureModule protocol, the loaders, and the tests. The built-model cache (TABPFN_MODEL_CACHE_SIZE) no longer gates on the flag, so fit_mode="fit_with_cache" uses it like every other mode. initialize_tabpfn_model loses its fit_mode argument, whose only job was computing the flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7 tasks
jmkuebler
added a commit
that referenced
this pull request
Sep 8, 2026
…d by #1250 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
cc @priorphil as you authored #1057 any reason to keep |
Without the bare *, a stale positional call that still passed fit_mode as the third argument would silently bind it to softmax_temperature_override, and with several checkpoints that non-None value would also suppress the temperature-disagreement check. Now it fails at the call. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
jmkuebler
added a commit
that referenced
this pull request
Sep 8, 2026
…d by #1250 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
RES-2743 (base of #1219).
Motivation and Context
cache_trainset_representationhas been dead sinceInferenceEngineCacheKVwas removed in #1057. Every architecture'sget_architectureaccepts it and immediatelydels it; the KV cache is owned by the inference engine and selected at call time throughforward(). The flag survived only because theArchitectureModuleprotocol still declared it, which forced every implementation, every loader, and every test call site to carry it.This removes it end to end:
ArchitectureModule.get_architecture(config)no longer takes the kwarg; the four architectures drop the parameter and their "accepted for interface compatibility but ignored" notes.load_model_criterion_config,load_modeland_build_modellose the parameter.TABPFN_MODEL_CACHE_SIZE) no longer gates on the flag. The gate assumed afit_with_cachebuild mutates the module, which it does not, so that fit mode now uses the cache like every other one.initialize_tabpfn_modelloses itsfit_modeargument, whose only job was computing the flag.ArchitectureModules, the "mutating build is never cached" test, and theload_modelsignature tripwire.#1219 is stacked on top and shrinks to keying the cache on device and dtype.
fomo-fitting side: PriorLabs/fomo-fitting#3776 drops the parameter from every architecture there. It is a draft until this merges and the tabpfn pin is bumped.
Public API Changes
No Public API changes
Yes, Public API changes (Details below)
ArchitectureModule.get_architectureno longer acceptscache_trainset_representation. External architectures implementing the protocol must drop the parameter.tabpfn.model_loading.load_modelandload_model_criterion_configno longer acceptcache_trainset_representation.tabpfn.base.initialize_tabpfn_modelno longer acceptsfit_mode.With
TABPFN_MODEL_CACHE_SIZEset,fit_mode="fit_with_cache"now uses the built-model cache. The default (cache off) is unchanged.How Has This Been Tested?
tests/test_classifier_interface.pyandtests/test_regressor_interface.pypass on cpu and cuda; the touched unit files (test_model_cache,test_model_loading,test_config,test_inference_config,test_inference,test_architectures/,test_save_load_fitted_model) pass.Checklist
changelog/README.md), or "no changelog needed" label requested.🤖 Generated with Claude Code