pytorch_tabular
pytorch_tabular copied to clipboard
The architecture of TabularModelTuner best_model does not match best_params
Describe the bug The model in pytorch_tabular.tabular_model_tuner.OUTPUT.best_model is not the model defined by pytorch_tabular.tabular_model_tuner.OUTPUT.best_params but instead the model defined by the hyperparameter placeholders when constructing the various configs.
To Reproduce
- Follow How-To-Guide for Hyperparameter Turning
- Replace the search space with the placeholder parameters removed
search_space = {
"model_config__layers": ["1024-512-256", "1024-512-128"],
"model_config.head_config__dropout": [0.2, 0.3],
"trainer_config__batch_size": [1024, 2048, 4096],
"optimizer_config__optimizer": ["RAdam", "AdamW"],
}
- The output of the tune method will report the best parameters from the search_space, but the best model will have the parameters defined in CategoryEmbeddingModelConfig()
Expected behavior
That the architecture of .best_model matches .best_params
Screenshots
Additional context pytorch_tabular.version = '1.1.0'