Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Add dbinfer DFS Feature Transformer #2

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ feature_transformers:
- _target_: autogluon_assistant.transformer.OpenFETransformer
n_jobs: 1
num_features_to_keep: 10
- _target_: autogluon_assistant.transformer.DFSTransformer
depth: 2
max_fks: 10
categorical_var_cardinality_upper: 20
min_fk_cardinality: 2

autogluon:
predictor_init_kwargs: {}
predictor_fit_kwargs:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "An LLM-backed AI agent for competitive tabular machine learning"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"autogluon.tabular[all]>=1.1",
"autogluon.tabular[all]==1.1",
"hydra-core>=1.3",
"importlib-resources",
"langchain~=0.1.15",
Expand Down
3 changes: 2 additions & 1 deletion src/autogluon_assistant/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def preprocess_task(self, task: TabularPredictionTask) -> TabularPredictionTask:
FilenameInferenceTransformer(llm=self.llm),
LabelColumnInferenceTransformer(llm=self.llm),
TestIdColumnTransformer(llm=self.llm),
TrainIdColumnDropTransformer(llm=self.llm),
ProblemTypeInferenceTransformer(),
]
+ ([EvalMetricInferenceTransformer(llm=self.llm)] if self.config.infer_eval_metric else [])
Expand All @@ -74,6 +73,8 @@ def preprocess_task(self, task: TabularPredictionTask) -> TabularPredictionTask:
if self.feature_transformers_config
else []
)
# Avoid dropping Train ID Column before DFS transformer; Drop at last
+ [TrainIdColumnDropTransformer(llm=self.llm)]
)
for transformer in task_preprocessors:
try:
Expand Down
3 changes: 2 additions & 1 deletion src/autogluon_assistant/transformer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .base import BaseTransformer, TransformTimeoutError
from .feature_transformers import BaseFeatureTransformer, CAAFETransformer, OpenFETransformer
from .feature_transformers import BaseFeatureTransformer, CAAFETransformer, OpenFETransformer, DFSTransformer
from .task_inference import (
EvalMetricInferenceTransformer,
FilenameInferenceTransformer,
Expand All @@ -13,6 +13,7 @@
"BaseTransformer",
"BaseFeatureTransformer",
"CAAFETransformer",
"DFSTransformer",
"EvalMetricInferenceTransformer",
"FilenameInferenceTransformer",
"LabelColumnInferenceTransformer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from .base import BaseFeatureTransformer
from .caafe import CAAFETransformer
from .openfe import OpenFETransformer
from .dfs import DFSTransformer

__all__ = [
"BaseFeatureTransformer",
"CAAFETransformer",
"OpenFETransformer",
"DFSTransformer",
]
Loading