{"id":4443,"library":"autogluon-features","title":"AutoGluon Features","description":"The `autogluon-features` sub-package provides core machine learning feature engineering capabilities for the AutoGluon AutoML library. It handles tasks like detecting data types, transforming categorical, datetime, and text features, and managing feature metadata. This package is usually consumed internally by AutoGluon's higher-level predictors, but can be used directly for advanced customization. It is currently at version 1.5.0 and releases in conjunction with the main AutoGluon library.","status":"active","version":"1.5.0","language":"en","source_language":"en","source_url":"https://github.com/autogluon/autogluon/","tags":["machine-learning","automl","feature-engineering","data-preprocessing","tabular-data"],"install":[{"cmd":"pip install autogluon-features","lang":"bash","label":"Install core feature engineering package"},{"cmd":"pip install autogluon","lang":"bash","label":"Install full AutoGluon (includes features)"}],"dependencies":[],"imports":[{"symbol":"PipelineFeatureGenerator","correct":"from autogluon.features.generators import PipelineFeatureGenerator"},{"symbol":"CategoryFeatureGenerator","correct":"from autogluon.features.generators import CategoryFeatureGenerator"},{"symbol":"FeatureMetadata","correct":"from autogluon.features.feature_metadata import FeatureMetadata"}],"quickstart":{"code":"import pandas as pd\nfrom autogluon.features.generators import PipelineFeatureGenerator, CategoryFeatureGenerator, DatetimeFeatureGenerator\n\n# Create a sample DataFrame\ndata = {\n    'numeric_col': [1, 2, 3, 4, 5],\n    'categorical_col': ['A', 'B', 'A', 'C', 'B'],\n    'datetime_col': ['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04', '2023-01-05'],\n    'text_col': ['hello world', 'foo bar', 'hello again', 'world peace', 'bar foo']\n}\ndf = pd.DataFrame(data)\n\n# Initialize a pipeline of feature generators\n# CategoryFeatureGenerator converts object/category dtypes\n# DatetimeFeatureGenerator extracts year, month, day, etc. from datetime columns\npipeline_generator = PipelineFeatureGenerator(\n    [CategoryFeatureGenerator(), DatetimeFeatureGenerator(fillna_limit=0)]\n)\n\n# Fit and transform the DataFrame\ndf_transformed = pipeline_generator.fit_transform(X=df)\n\nprint(\"Original DataFrame:\")\nprint(df)\nprint(\"\\nTransformed DataFrame features (first 5 rows):\")\nprint(df_transformed.head())\nprint(\"\\nFeature metadata after transformation (output features):\")\nprint(pipeline_generator.feature_metadata_out.pretty_print())","lang":"python","description":"This quickstart demonstrates how to instantiate and use a `PipelineFeatureGenerator` from `autogluon-features` to apply common transformations like categorical encoding and datetime feature extraction to a pandas DataFrame."},"warnings":[{"fix":"Always train and predict with the same AutoGluon (and therefore `autogluon-features`) version. When upgrading AutoGluon, retrain your models with the new version.","message":"Loading models trained with a different AutoGluon version (which includes `autogluon-features` components) is not supported and can lead to crashes, incorrect predictions, or unexpected behavior due to internal API changes and serialization formats.","severity":"breaking","affected_versions":"All versions, explicitly highlighted in v0.8.2 onwards."},{"fix":"Unless you have a specific need to customize the feature generation pipeline, prefer using `AutoGluon.TabularPredictor.fit()` which handles feature processing implicitly.","message":"Directly using `autogluon-features` components (like `FeatureGenerator` subclasses) is primarily for advanced customization. Most users should leverage feature engineering through AutoGluon's high-level APIs like `TabularPredictor`, which manage feature generation automatically.","severity":"gotcha","affected_versions":"All versions."},{"fix":"Ensure your Python environment is within the supported range (currently 3.10-3.13) before installing or upgrading AutoGluon. Check `requires_python` on PyPI for the most up-to-date information.","message":"Python version compatibility has changed. Support for Python 3.8 was dropped in AutoGluon v1.2.0, and support for Python 3.12 was added. Current versions require Python >=3.10 and <3.14.","severity":"breaking","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}