-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_env.py
More file actions
30 lines (25 loc) · 1011 Bytes
/
debug_env.py
File metadata and controls
30 lines (25 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
import sys
import importlib
def check_submodule(mod_name):
try:
importlib.import_module(mod_name)
print(f"✅ {mod_name} imported successfully!")
except ImportError as e:
print(f"❌ {mod_name} failed: {e}")
except Exception as e:
print(f"⚠️ {mod_name} crashed with a different error: {e}")
print(f"Python Version: {sys.version}")
import evidently
print(f"Evidently Location: {evidently.__file__}")
# Check if the 'report' directory actually exists on disk
report_path = os.path.join(os.path.dirname(evidently.__file__), "report")
print(f"Does 'report' folder exist on disk? {os.path.exists(report_path)}")
if os.path.exists(report_path):
print(f"Contents of evidently folder: {os.listdir(os.path.dirname(evidently.__file__))}")
print("\n--- Testing Imports ---")
check_submodule("evidently.metrics")
check_submodule("evidently.model_profile") # Old name
check_submodule("evidently.report")
check_submodule("pydantic")
check_submodule("plotly")