Databricks AutoML Runtime

0.2.21 · active · verified Fri Apr 17

The Databricks AutoML Runtime package provides utilities and custom transformers designed to integrate with Databricks AutoML, particularly for time series and other specialized machine learning tasks. It offers custom scikit-learn compatible transformers, hyperparameter tuning wrappers for models like Prophet and pmdarima, and MLflow logging integrations. The current version is 0.2.21, and it has a moderate release cadence, often addressing compatibility or bug fixes.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use the `DateTransformer` to extract various date and time features from a datetime column in a Pandas DataFrame. This is a common preprocessing step for time series models.

import pandas as pd
from automl_runtime.sklearn.date_time_transformers import DateTransformer

# Create a sample DataFrame with a datetime column
df = pd.DataFrame({
    'timestamp_col': pd.to_datetime(['2023-01-01', '2023-01-02', '2023-01-03']),
    'value': [10, 12, 15]
})

# Instantiate the DateTransformer
# This transformer extracts date-related features like year, month, day, day_of_week, etc.
date_transformer = DateTransformer(
    timestamp_col='timestamp_col', 
    output_timestamp_col_name='datetime_features'
)

# Fit and transform the DataFrame
X_transformed = date_transformer.fit_transform(df)

print("Original DataFrame:\n", df)
print("\nTransformed DataFrame (first 5 columns):\n", X_transformed.iloc[:, :5])

view raw JSON →