autogluon / autogluon/autogluon
[BUG] Child model fitting raises `AssertionError` with `TabularPredictor` and `extreme` preset
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 21h 29m
- Merged PRs (30d)
- 57
Description
**Describe the bug**
Using `TabularPredictor` with AG 1.4 and the `extreme` preset I occasionally observe AssertionErrors being raised in the child model fitting for Mitra as well as TabPFN.
The errors all follow the same schema, such as
```
Fitting model: TabPFNv2_r181_BAG_L1 ... Training model for up to 6231.12s of the 6231.12s of remaining time.
Warning: Exception caused TabPFNv2_r181_BAG_L1 to fail during training... Skipping this model.
ag.max_rows=10000 for model 'TabPFNv2_r181', but found 12428 rows.
Detailed Traceback:
Traceback (most recent call last):
File "/lib/python3.11/site-packages/autogluon/tabular/trainer/abstract_trainer.py", line 2171, in _train_and_save
model = self._train_single(**model_fit_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.11/site-packages/autogluon/tabular/trainer/abstract_trainer.py", line 2055, in _train_single
model = model.fit(X=X, y=y, X_val=X_val, y_val=y_val, X_test=X_test, y_test=y_test, total_resources=total_resources, **model_fit_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.11/site-packages/autogluon/core/models/abstract/abstract_model.py", line 1057, in fit
self.validate_fit_args(**kwargs)
File "/lib/python3.11/site-packages/autogluon/core/models/ensemble/bagged_ensemble_model.py", line 424, in validate_fit_args
model_base.validate_fit_args(X=X, **kwargs)
File "/lib/python3.11/site-packages/autogluon/core/models/abstract/abstract_model.py", line 1119, in validate_fit_args
raise AssertionError(
AssertionError: ag.max_rows=10000 for model 'TabPFNv2_r181', but found 12428 rows.
```
This happens for several children models being fit, but so far I've only observed it for Mitra and TabPFN, likely because of their internal 10k limit for training set size.
The overall model fitting proceeds normally, but the current behavior is confusing to the user at least.
**Expected behavior**
A normal fitting should not raise any intermediate errors, even when they are caught correctly.
TabPFN and Mitra should likely not be fit for datasets with more than 10k samples, so something might be off with the portfolio heuristics or catching the error under the hood to not raise it to the user?
**Installed Versions**
```python
INSTALLED VERSIONS
------------------
python : 3.11.9.final.0
OS : Linux
OS-release : 5.15.0-1074-azure
Version : #83-Ubuntu SMP Wed Oct 2 18:14:49 UTC 2024
machine : x86_64
processor : x86_64
num_cores : 40
cpu_ram_mb : 322243.50390625
cuda version : 12.560.35.03
num_gpus : 1
gpu_ram_mb : [95350]
avail_disk_size_mb : 121438
autogluon : None
autogluon.common : 1.4.0
autogluon.core : 1.4.0
autogluon.features : 1.4.0
autogluon.tabular : 1.4.0
blis : None
boto3 : 1.39.16
catboost : 1.2.8
einops : 0.8.1
einx : 0.3.0
fastai : None
huggingface-hub : 0.34.3
hyperopt : None
imodels : None
joblib : 1.5.1
lightgbm : 4.6.0
loguru : 0.7.3
matplotlib : 3.10.3
networkx : 3.5
numpy : 2.2.6
omegaconf : 2.3.0
onnx : None
onnxruntime : None
onnxruntime-gpu : None
pandas : 2.3.1
psutil : 7.0.0
pyarrow : 20.0.0
pytabkit : None
ray : 2.40.0
requests : 2.32.4
scikit-learn : 1.6.1
scikit-learn-intelex: 2025.4.0
scipy : 1.16.1
skl2onnx : None
spacy : None
tabicl : 0.1.3
tabpfn : 2.1.0
torch : 2.7.1
tqdm : 4.67.1
transformers : 4.54.1
xgboost : 3.0.2
```
Contributor guide
Assessment
This issue has not been assessed yet.