chaos-genius / chaos_genius

ML powered analytics engine for outlier detection and root cause analysis.
https://www.chaosgenius.io
MIT License
731 stars 83 forks source link

Error in Analytics: ValueError: Dataframe is empty. #1232

Open Yuuuuer opened 11 months ago

Yuuuuer commented 11 months ago

Error Report

An error was caught when running analytics. Exception message: ValueError: Dataframe is empty.

Environment

Additional context

Additional information

Exception traceback ``` Traceback (most recent call last): File "/usr/src/app/chaos_genius/jobs/anomaly_tasks.py", line 80, in anomaly_single_kpi run_anomaly_for_kpi(kpi_id, end_date, task_id=task_id) File "/usr/src/app/chaos_genius/controllers/kpi_controller.py", line 94, in run_anomaly_for_kpi adc.detect() File "/usr/src/app/chaos_genius/core/anomaly/controller.py", line 721, in detect raise e File "/usr/src/app/chaos_genius/core/anomaly/controller.py", line 718, in detect input_data = self._load_anomaly_data() File "/usr/src/app/chaos_genius/core/anomaly/controller.py", line 139, in _load_anomaly_data df = dl.get_data() File "/usr/src/app/chaos_genius/core/utils/data_loader.py", line 314, in get_data raise ValueError("Dataframe is empty.") ValueError: Dataframe is empty. ```
KPI Info ``` {'active': True, 'aggregation': 'sum', 'anomaly_frequency': None, 'anomaly_params': {'anomaly_period': 60, 'frequency': 'D', 'model_name': 'ProphetModel', 'sensitivity': 'high'}, 'count_column': None, 'created_at': datetime.datetime(2023, 12, 4, 13, 0, 24, 100975), 'data_source': 2, 'datetime_column': 'date', 'dimensions': ['Country'], 'id': 5, 'is_certified': False, 'is_static': False, 'kpi_query': '', 'kpi_type': 'table', 'metric': 'Quantity', 'name': 'test3', 'run_anomaly': True, 'scheduler_params': {'anomaly_status': 'failed', 'last_scheduled_time_anomaly': '2023-12-04T13:08:44.821167', 'last_scheduled_time_rca': '2023-12-04T13:08:44.830971', 'rca_status': 'in-progress', 'rca_time': '11:00:00', 'scheduler_frequency': 'D', 'time': '11:00:00'}, 'schema_name': 'public', 'static_params': None, 'table_name': 'ecom_retail_data', 'timezone_aware': False} ```
Data Source Info ``` {'active': True, 'connection_status': 'connected', 'connection_type': 'Postgres', 'created_at': datetime.datetime(2023, 12, 4, 12, 42, 39, 849683), 'database_timezone': 'UTC', 'id': 2, 'is_third_party': False, 'last_sync': datetime.datetime(2023, 12, 4, 12, 42, 53, 369827), 'name': 'test1', 'sync_status': 'Completed'} ```
github-actions[bot] commented 11 months ago

Hello there, thanks for opening your first issue. We welcome you to the community!