Skip to content

Commit 4077ae0

Browse files
chore: autopublish 2024-04-05T18:46:33Z
1 parent bca6542 commit 4077ae0

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

src/energy_forcasting_model/pipelines/lightgbm_training_pipeline/nodes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import pandas as pd
2-
import matplotlib.pyplot as plt
3-
import seaborn as sns
41
import lightgbm as lgb
52
import logging
63

@@ -50,4 +47,4 @@ def train_lightgbm_model(X_train, y_train, params):
5047
# Log the completion of the training process
5148
logger.info("LightGBM model training completed successfully.")
5249

53-
return lgbm_model
50+
return lgbm_model

src/energy_forcasting_model/pipelines/lightgbm_training_pipeline/pipeline.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from kedro.pipeline import Pipeline, node, pipeline
22

3-
from kedro.pipeline import Pipeline, pipeline
43

54
from .nodes import train_lightgbm_model
65

@@ -51,14 +50,14 @@ def create_pipeline(**kwargs) -> Pipeline:
5150
tags="model_training",
5251
namespace="lightgbm_training_pipeline",
5352
inputs=[
54-
"X_train",
55-
"y_train",
56-
"X_test",
57-
"y_test",
53+
"X_train",
54+
"y_train",
55+
"X_test",
56+
"y_test",
5857
],
5958
outputs=[
60-
"lightgbm_model",
61-
"lightgbm_feature_importance_plot",
62-
"real_data_and_lightgbm_predictions_plot",
59+
"lightgbm_model",
60+
"lightgbm_feature_importance_plot",
61+
"real_data_and_lightgbm_predictions_plot",
6362
],
6463
)

src/energy_forcasting_model/pipelines/xgboost_training_pipeline/nodes.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import pandas as pd
2-
import matplotlib.pyplot as plt
31
import xgboost as xgb
4-
import seaborn as sns
52
import logging
63

74

@@ -49,13 +46,13 @@ def train_xgboost_model(X_train, y_train, params):
4946
# Training the model with verbosity based on the provided configuration
5047
logger.info("Training the XGBoost model...")
5148
xgb_model.fit(
52-
X_train_clean,
53-
y_train_clean,
49+
X_train_clean,
50+
y_train_clean,
5451
eval_set=[(X_train_clean, y_train_clean)],
55-
verbose=params["verbose_eval"]
52+
verbose=params["verbose_eval"],
5653
)
5754

5855
# Log the completion of the training process
5956
logger.info("XGBoost model training completed successfully.")
6057

61-
return xgb_model
58+
return xgb_model

0 commit comments

Comments
 (0)