-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_import.py
More file actions
39 lines (30 loc) · 1.13 KB
/
Copy pathdebug_import.py
File metadata and controls
39 lines (30 loc) · 1.13 KB
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
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
print("Starting import test...")
try:
print("Importing basic modules...")
import numpy as np
import pandas as pd
from datetime import datetime
print("Basic modules OK")
print("Importing sklearn...")
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.neural_network import MLPClassifier
print("sklearn OK")
print("Importing xgboost...")
import xgboost as xgb
print("xgboost OK")
print("Importing feature engineering...")
from src.models.feature_engineering import PatientFeatures
print("feature_engineering OK")
print("Importing ml_models module...")
import src.models.ml_models
print("ml_models module imported")
print("Available in ml_models:", [x for x in dir(src.models.ml_models) if not x.startswith('_')])
print("Trying to import ModelEnsemble...")
from src.models.ml_models import ModelEnsemble
print("ModelEnsemble imported successfully!")
except Exception as e:
print(f"Error: {e}")
import traceback
traceback.print_exc()