From 956d9b2edb4ce106c9d4190fd7a7a39e398223af Mon Sep 17 00:00:00 2001 From: PreetSharma-12 Date: Sun, 20 Oct 2024 22:44:51 +0530 Subject: [PATCH 1/3] Updated main.py Updated the main.py file by removing an unnecessary line from the code. --- main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/main.py b/main.py index a082c20..d6f1e6b 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ import pandas as pd -import numpy as np from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression From 2c8287c9a660ede0074182de143cdacb4cb39b5b Mon Sep 17 00:00:00 2001 From: PreetSharma-12 Date: Sun, 20 Oct 2024 23:04:52 +0530 Subject: [PATCH 2/3] Updated load_dataset function I have improved the error handlng in the load_dataset function. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index d6f1e6b..6303a5a 100644 --- a/main.py +++ b/main.py @@ -20,7 +20,7 @@ def load_dataset(file_path): return df except Exception as e: logger.error(f"Error loading dataset: {str(e)}") - exit(1) + raise def split_data(df, target_column): """Split dataset into training and testing sets.""" From 781c405033edbe2dce00ff8ac86268f79c89a86b Mon Sep 17 00:00:00 2001 From: PreetSharma-12 Date: Sun, 20 Oct 2024 23:12:29 +0530 Subject: [PATCH 3/3] Update main.py --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 6303a5a..56b05eb 100644 --- a/main.py +++ b/main.py @@ -20,7 +20,7 @@ def load_dataset(file_path): return df except Exception as e: logger.error(f"Error loading dataset: {str(e)}") - raise + exit(1) def split_data(df, target_column): """Split dataset into training and testing sets.""" @@ -99,4 +99,4 @@ def main(file_path, target_column): args = parser.parse_args() logger.info("Starting the XAI program...") - main(args.file_path, args.target_column) \ No newline at end of file + main(args.file_path, args.target_column)