Skip to content

Commit

Permalink
add models folder and create it if it doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarvid committed Jul 5, 2024
1 parent 7715061 commit 83e31ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions challenge/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ def fit(self, features: pd.DataFrame, target: pd.DataFrame) -> None:
logging.info(f"Confusion Matrix:\n{conf_matrix}")
logging.info(f"Classification Report:\n{class_report}")

# Ensure the directory exists
self.complete_model_path.parent.mkdir(parents=True, exist_ok=True)
# Save the model
model.save_model(self.complete_model_path)
self._model = model
Expand Down
Empty file added models/.gitkeep
Empty file.

0 comments on commit 83e31ab

Please sign in to comment.