Update data/data_validator.py
Browse files- data/data_validator.py +10 -10
data/data_validator.py
CHANGED
@@ -582,16 +582,16 @@ class DataValidationPipeline:
|
|
582 |
except Exception as e:
|
583 |
logger.error(f"Failed to update validation statistics: {e}")
|
584 |
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
|
596 |
def get_validation_history(self, limit: int = 50) -> List[Dict[str, Any]]:
|
597 |
"""Get validation history"""
|
|
|
582 |
except Exception as e:
|
583 |
logger.error(f"Failed to update validation statistics: {e}")
|
584 |
|
585 |
+
def get_validation_statistics(self) -> Dict[str, Any]:
|
586 |
+
"""Get current validation statistics"""
|
587 |
+
try:
|
588 |
+
if self.validation_stats_path.exists():
|
589 |
+
with open(self.validation_stats_path, 'r') as f:
|
590 |
+
return json.load(f)
|
591 |
+
return {}
|
592 |
+
except Exception as e:
|
593 |
+
logger.error(f"Failed to load validation statistics: {e}")
|
594 |
+
return {}
|
595 |
|
596 |
def get_validation_history(self, limit: int = 50) -> List[Dict[str, Any]]:
|
597 |
"""Get validation history"""
|