Merancang Pipeline Peramalan untuk Produksi
Rami Krispin
Senior Manager, Data Science and Engineering


Ingesti data
Penyegaran peramalan
Tangguh






Pendekatan
Persyaratan
from lightgbm import LGBMRegressor from mlforecast import MLForecast import mlflow import mlforecast.flavorexperiment_name = "ml_forecast" mlflow_path = "file:///mlruns"meta = mlflow.get_experiment_by_name(experiment_name)
model = LGBMRegressor(n_estimators = 500, learning_rate= 0.05)params = { "freq": "h", "lags": list(range(1, 24)), "date_features": ["month", "day", "dayofweek", "week", "hour"] }
mlf = MLForecast(
models= model,
freq= params["freq"],
lags=params["lags"],
date_features=params["date_features"]
)
mlf.fit(ts)
run_time = datetime.datetime.now().strftime("%Y-%m-%d %H-%M-%S") run_name = f"lightGBM6_{run_time}"print(run_name)
'lightGBM6_2025-05-19 05-12-16'
with mlflow.start_run(experiment_id=meta.experiment_id,
run_name=run_name) as run:
mlforecast.flavor.log_model(model=mlf, artifact_path="prod_model")



Merancang Pipeline Peramalan untuk Produksi