You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing Model IV, I encountered ModuleNotFoundError and ImportError for CDM and ULDM imports. This appears to be due to API changes in newer versions of pyHalo. This issue tracks the implementation of version-agnostic factory imports to ensure compatibility.
##Proposed Fix
Replace the original import code with a try and except code block
try:
from pyHalo.preset_models import preset_model_from_name
# Use the factory function to get ULDM
ULDM = preset_model_from_name('ULDM')
except Exception as e:
# If that also fails, we'll need to see the specific error
print(f"Failed to load ULDM: {e}")
raise