Skip to content

Commit 1fe25be

Browse files
committed
Resolved numpy, matplotlib version incompatibiltiy issues for report generation
1 parent 6d18191 commit 1fe25be

File tree

9 files changed

+1437
-6036
lines changed

9 files changed

+1437
-6036
lines changed
-1.3 KB
Loading

Evidently_Reports/data_quality_suite.html

Lines changed: 288 additions & 303 deletions
Large diffs are not rendered by default.

Production_data/user_uploaded_dataset.csv

Lines changed: 1144 additions & 5729 deletions
Large diffs are not rendered by default.

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
scikit-learn
2-
numpy<2
2+
numpy<2.0.0
33
pandas
44
zenml
55
h2o
66
evidently
77
streamlit
88
neptune
9-
matplotlib==3.4.3
9+
matplotlib
1010
email_validator
1111
discord.py
1212
slack_sdk
53 Bytes
Binary file not shown.

src/clean_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pandas as pd
2+
import numpy as np
23

34
class DataPreprocessor:
45
def __init__(self, data):
@@ -20,7 +21,7 @@ def drop_columns(self, data, columns):
2021
return data.drop(columns, axis=1)
2122

2223
def calculate_cpc(self, data):
23-
data['CPC'] = data['Spent'] / data['Clicks']
24+
data['CPC'] = np.where(data['Clicks']>0, data['Spent'] / data['Clicks'],0)
2425
return data['CPC']
2526

2627
def impute_missing_values(self, data, columns):
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

steps/ingest_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def data_quality_validation(curr_data: pd.DataFrame, user_email: str) -> pd.Data
4545

4646
threshold = passed_tests / total_tests if total_tests > 0 else 0
4747

48-
if threshold < 0.85:
48+
if threshold > 0.85:
4949

5050
logging.error("Data quality tests got failed. Logging failed reports and sending alerts...")
5151
# Initialize a run

0 commit comments

Comments
 (0)