Skip to content

Commit

Permalink
remove models
Browse files Browse the repository at this point in the history
  • Loading branch information
kachiann committed Aug 19, 2024
1 parent 27683c7 commit bb7b0f0
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 104,288 deletions.
Binary file removed models/DecisionTreeRegressor.pkl
Binary file not shown.
Binary file removed models/DecisionTreeRegressor_model.pkl
Binary file not shown.
3,477 changes: 0 additions & 3,477 deletions models/DecisionTreeRegressor_x_test.csv

This file was deleted.

13,904 changes: 0 additions & 13,904 deletions models/DecisionTreeRegressor_x_train.csv

This file was deleted.

Binary file removed models/LinearRegression.pkl
Binary file not shown.
3,477 changes: 0 additions & 3,477 deletions models/LinearRegression_x_test.csv

This file was deleted.

13,904 changes: 0 additions & 13,904 deletions models/LinearRegression_x_train.csv

This file was deleted.

3,477 changes: 0 additions & 3,477 deletions models/x_test.csv

This file was deleted.

13,904 changes: 0 additions & 13,904 deletions models/x_train.csv

This file was deleted.

10 changes: 8 additions & 2 deletions src/experiment_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ def train_and_log_model(
Returns:
run_id: The ID of the MLflow run.
"""
# Ensure the models directory exists
models_dir = os.path.join(os.getcwd(), "models")
os.makedirs(models_dir, exist_ok=True)

with mlflow.start_run(run_name=model_name) as run:
mlflow.set_tag("model", model_name)

# Log the full dataset as an artifact
mlflow.log_artifact(dataset_path, artifact_path="data")
if dataset_path:
# Log the full dataset as an artifact
mlflow.log_artifact(dataset_path, artifact_path="data")

# Save and log the training dataset as a CSV file
train_csv_path = os.path.join(models_dir, f"{model_name}_x_train.csv")
Expand Down Expand Up @@ -103,6 +108,7 @@ def train_and_log_model(
return run.info.run_id



def main():
"""Main function to load data, train models, and log to MLflow."""
# Path to the dataset
Expand Down
Binary file removed src/models/DecisionTreeRegressor.pkl
Binary file not shown.
Loading

0 comments on commit bb7b0f0

Please sign in to comment.