Skip to main content

automl

AutoML, 시계열, 실험 자동화 중심의 데이터 사이언스 환경입니다.

문서 기준

  • 기준일: 2026-02-23
  • Python: 3.12
  • 운영체제: macOS, Ubuntu, Windows
  • 동기화 명령: uv sync

호환성 메모

환경autogluon기타 패키지설명
macOS / Ubuntu설치됨전체 사용 가능전체 스택 동기화
Windows제외됨전체 사용 가능AutoGluon 대신 FLAML/Optuna 사용
autogluon은 Windows에서 일부 의존성 빌드 문제가 있어 환경 마커로 제외됩니다. Windows 사용자는 FLAML 또는 Optuna를 대안으로 사용하세요.

AutoML 프레임워크 비교

프레임워크특징장점적합한 상황
AutoGluon앙상블 스태킹 자동화코드 한 줄로 SOTA급 성능정형 데이터 빠른 베이스라인
FLAML경량 AutoML낮은 리소스 소모, 빠른 탐색제한된 컴퓨팅 환경, 빠른 실험
Optuna하이퍼파라미터 최적화유연한 탐색 공간 정의, 시각화커스텀 모델 튜닝, 연구 실험

주요 패키지 역할

패키지역할비고
autogluon엔드투엔드 AutoMLTabular, Multimodal, TimeSeries 지원
flaml경량 AutoML 프레임워크scikit-learn/LightGBM/XGBoost 자동 선택
optuna하이퍼파라미터 최적화TPE, CMA-ES 등 다양한 샘플러
ray분산 컴퓨팅 프레임워크AutoGluon/Optuna 분산 실행 백엔드
fastai고수준 딥러닝 래퍼빠른 프로토타이핑, 학습률 탐색
statsforecast통계 시계열 예측ARIMA, ETS, Theta 등 고전 모델
spacy자연어 처리 파이프라인토큰화, NER, 텍스트 전처리

pyproject.toml

[project]
name = "automl"
version = "0.1.0"
description = "AutoML experimentation environment"
requires-python = "==3.12.*"
dependencies = [
  "autogluon==1.5.0; platform_system != 'Windows'",
  "ray==2.52.1",
  "fastai==2.8.7",
  "statsforecast==2.0.1",
  "spacy==3.8.11",
  "flaml==2.5.0",
  "optuna==4.7.0",
  "ipykernel==7.2.0",
  "pytest==9.0.2",
  "ruff==0.15.2",
]

[tool.uv]
package = false

설치

1

프로젝트 생성

uv init automl
cd automl
2

의존성 락 및 동기화

uv lock
uv sync
3

Jupyter 커널 등록

uv run python -m ipykernel install --user --name automl --display-name "UV automl"

설치 확인

모든 OS 공통 확인:
uv run python -c "import ray, fastai, flaml, optuna; print('ray', ray.__version__); print('fastai', fastai.__version__); print('flaml', flaml.__version__)"
macOS/Ubuntu에서 autogluon 확인:
uv run python -c "import autogluon; print('autogluon', autogluon.__version__)"

기본 사용 예시

AutoGluon (macOS/Ubuntu)

from autogluon.tabular import TabularPredictor

# 데이터 준비 (pandas DataFrame)
train_data = "train.csv"  # label 컬럼 포함

# 한 줄로 학습 (앙상블 스태킹 자동 수행)
predictor = TabularPredictor(label="target", eval_metric="accuracy").fit(
    train_data, time_limit=300  # 5분 제한
)

# 예측 및 리더보드
predictions = predictor.predict("test.csv")
leaderboard = predictor.leaderboard(silent=True)
print(leaderboard)

Optuna 하이퍼파라미터 최적화

import optuna
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
from sklearn.datasets import load_iris

X, y = load_iris(return_X_y=True)

def objective(trial):
    n_estimators = trial.suggest_int("n_estimators", 50, 300)
    max_depth = trial.suggest_int("max_depth", 3, 15)
    clf = RandomForestClassifier(n_estimators=n_estimators, max_depth=max_depth)
    return cross_val_score(clf, X, y, cv=5).mean()

study = optuna.create_study(direction="maximize")
study.optimize(objective, n_trials=50)
print(f"Best params: {study.best_params}, Best score: {study.best_value:.4f}")
Optuna의 대시보드를 사용하려면 optuna-dashboard 패키지를 추가 설치하세요. optuna-dashboard sqlite:///optuna.db 명령으로 시각화할 수 있습니다.

트러블슈팅

증상원인해결
Windows에서 autogluon 미설치환경 마커로 의도적 제외FLAML 또는 Optuna 사용
Ray 포트 충돌기존 Ray 프로세스 점유ray stop 후 다시 시작
AutoGluon 학습이 느림시간 제한 미설정time_limit 파라미터 지정
Optuna study DB 잠금동시 실행 시 SQLite 락storage="sqlite:///optuna.db" 단일 프로세스 사용
spaCy 모델 누락언어 모델 미다운로드uv run python -m spacy download ko_core_news_sm
uv sync 의존성 충돌기존 락 파일과 버전 불일치uv lock --refreshuv sync