SPG_ML / check_models.py
meetmendapara's picture
Initial commit for ML space
df31aa1
"""Check what model types are stored in pkl files"""
import pickle, sys
for name in ['duration_predictor', 'stress_predictor']:
path = f'trained_models/{name}.pkl'
try:
with open(path, 'rb') as f:
bundle = pickle.load(f)
model = bundle.get('model', bundle)
print(f"{name}: {type(model).__module__}.{type(model).__name__}")
except Exception as e:
print(f"{name}: ERROR - {e}")