getml_mlflow.autolog
autolog(
*,
log_data_information: bool = True,
log_data_as_artifact: bool = True,
log_function_parameters: bool = True,
log_function_return: bool = True,
log_function_as_trace: bool = True,
log_pipeline_parameters: bool = True,
log_pipeline_tags: bool = True,
log_pipeline_scores: bool = True,
log_pipeline_features: bool = True,
log_pipeline_columns: bool = True,
log_pipeline_targets: bool = True,
log_pipeline_data_model: bool = True,
log_pipeline_as_artifact: bool = True,
log_system_metrics: bool = True,
disable: bool = False,
silent: bool = False,
create_runs: bool = True,
extra_tags: Optional[Dict[str, str]] = None,
getml_project_path: Optional[Path] = None,
tracking_uri: Optional[str] = None
) -> None
Enable automatic logging of getML operations to MLflow.
This function enables automatic logging of the following operations to MLflow:
- pipeline creation, loading and operations (fit, score, predict, transform)
- project setting and switching.
Pipeline parameters, performance metrics, dataframe metadata, and other relevant information are captured and displayed in the MLflow UI. It also allows logging of dataframes passed as a function parameter or returned by a function as artifacts.
The artifacts are stored in artifacts-destination
set when running mlflow ui
command. The default is artifacts
directory in the current working directory.
In the UI, getML pipelines correspond to MLflow runs, functions correspond to sub-runs, and projects correspond to experiments.
For a detailed introduction on this MLflow integration, including setup, working with artifact pipelines, and more, please refer to our Tracking with MLflow guide. The guide provides examples and configuration options to help you get the most from it.
PARAMETER | DESCRIPTION |
---|---|
log_data_information | Whether to log metadata about a The
TYPE: |
log_data_as_artifact | Whether to log a TYPE: |
log_function_parameters | Whether to log parameters passed to getML functions, e.g., pipe.fit() in the MLflow UI. To log the TYPE: |
log_function_return | Whether to log return values of getML functions as artifacts. For example, it enables logging of TYPE: |
log_function_as_trace | Whether to log function calls as MLflow traces for detailed execution flow. TYPE: |
log_pipeline_parameters | Whether to log TYPE: |
log_pipeline_tags | Whether to log TYPE: |
log_pipeline_scores | Whether to log TYPE: |
log_pipeline_features | Whether to log TYPE: |
log_pipeline_columns | Whether to log TYPE: |
log_pipeline_targets | Whether to log TYPE: |
log_pipeline_data_model | Whether to log the TYPE: |
log_pipeline_as_artifact | Whether to save pipelines as MLflow artifacts. Docker configuration, |
log_system_metrics | Whether to log system metrics (CPU, memory usage) during pipeline fitting. Metrics are available for getML Enterprise only. TYPE: |
disable | If True, disables all getML autologging. TYPE: |
silent | If True, suppresses all informational logging messages. TYPE: |
create_runs | If True, creates new MLflow runs automatically when logging. You may set it to False and log under your own run. For example:
TYPE: |
extra_tags | Additional custom tags to log with each MLflow run. |
getml_project_path | Path to the getML projects directory. Used for accessing and logging pipeline artifacts when TYPE: |
tracking_uri | MLflow tracking server URI. If not provided, uses TYPE: |
Examples:
Basic usage with default settings:
import getml
import getml_mlflow
getml_mlflow.autolog()
# Subsequent getML pipeline operations will be logged to MLflow
Custom configuration:
getml_mlflow.autolog(
log_pipeline_as_artifact=True,
log_system_metrics=False,
tracking_uri="http://localhost:5000"
)
Source code in getml_mlflow/autologging.py
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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|