Tabular AutoML¶
TabularSupervisedClassificationTask
¶
Bases: TabularTask
Tabular classification task configuration.
Typical use-cases: churn prediction, loan approval, disease type, etc.
Source code in app/tabular_automl/models.py
25 26 27 28 29 30 31 | |
TabularSupervisedRegressionTask
¶
Bases: TabularTask
Tabular regression task configuration.
Predicts continuous numeric values (e.g., price, salary, demand).
Source code in app/tabular_automl/models.py
34 35 36 37 38 39 40 | |
TabularSupervisedTimeSeriesTask
¶
Bases: TabularTask
Time-series forecasting task configuration for tabular data.
Source code in app/tabular_automl/models.py
43 44 45 46 47 | |
TabularTask
¶
Bases: BaseModel
Base Pydantic model describing common tabular task inputs.
Source code in app/tabular_automl/models.py
13 14 15 16 17 18 19 20 21 22 | |
AutoMLTrainer
¶
Wrapper around AutoGluon Tabular training routines.
Source code in app/tabular_automl/modules.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
train(train_df, test_df, target_column, time_limit)
¶
Train AutoGluon Tabular and return leaderboard or error.
Source code in app/tabular_automl/modules.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
build_upload_payload(dataset_id, dataset_version, metadata, task_type, leaderboard_json)
¶
Return (model_id, form_data_dict) for the AutoDW upload request.
Source code in app/tabular_automl/services.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
create_session_directory(upload_root=UPLOAD_ROOT)
¶
Create and return a new session id and directory path.
Source code in app/tabular_automl/services.py
36 37 38 39 40 41 42 | |
download_dataset(download_url, dest_path)
¶
Stream-download a dataset file to dest_path.
Source code in app/tabular_automl/services.py
170 171 172 173 174 175 176 177 | |
fetch_dataset_metadata(autodw_base, user_id, dataset_id, dataset_version)
¶
Fetch and return dataset metadata from AutoDW.
Source code in app/tabular_automl/services.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
load_table(file_path)
¶
Load a table file into a DataFrame based on file extension.
Source code in app/tabular_automl/services.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
resolve_download_url(autodw_base, user_id, dataset_id, dataset_version, metadata, dataset_split)
¶
Determine the correct dataset download URL, accounting for splits.
Source code in app/tabular_automl/services.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
save_upload(file, destination)
¶
Persist an uploaded file to the given destination path.
Source code in app/tabular_automl/services.py
45 46 47 48 49 | |
serialize_and_zip_predictor(predictor, save_model_path, tmp_path)
¶
Pickle the predictor and zip the model directory. Returns the zip path.
Source code in app/tabular_automl/services.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
train_automl(dataset_path, save_model_path, target_column_name, task_type, time_budget)
¶
Train an AutoML model and return (leaderboard, predictor).
Source code in app/tabular_automl/services.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
upload_model(upload_url, zip_path, payload, task_id)
¶
Upload the zipped model to AutoDW. Returns the raw response.
Source code in app/tabular_automl/services.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
validate_tabular_inputs(train_path, target_column_name, time_stamp_column_name=None, task_type='tabular_classification')
¶
Validate required columns and task type for tabular training.
Source code in app/tabular_automl/services.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
Route definitions for the tabular AutoML service.
find_best_model_for_mvp(request, user_id, dataset_id, dataset_version='', target_column_name='', time_stamp_column_name=None, task_type='classification', time_budget=10, dataset_split=None)
async
¶
Fetch a tabular dataset from AutoDW, run AutoML training, and upload the best model.
Steps
- Fetch dataset metadata from AutoDW.
- Resolve the correct download URL (respecting splits if present).
- Download the dataset file to a temporary directory.
- Validate user-supplied parameters against the dataset.
- Train an AutoML model within the given time budget.
- Serialize and zip the best predictor.
- Upload the model and leaderboard back to AutoDW.
Returns:
| Type | Description |
|---|---|
JSONResponse
|
200 – success message and leaderboard summary. |
JSONResponse
|
400 – validation error (bad inputs or unsupported file type). |
JSONResponse
|
502 – AutoDW communication failure. |
JSONResponse
|
500 – unexpected runtime error. |
Source code in app/tabular_automl/router.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |