-
Notifications
You must be signed in to change notification settings - Fork 551
Description
I am trying to run the full alphageometry solver by following the instructions in the README.md. While the ddar solver works perfectly after some modifications, I am unable to get the full alphageometry mode (which requires the Meliad library) to run.
I have followed all installation steps, including manually cloning the Meliad repository and setting the PYTHONPATH. However, this leads to a series of persistent import errors.
Environment
- Python Version: 3.10.9 (in a virtual environment)
- System: Remote server (Beagle3)
Sequence of Errors and Fixes Attempted
-
Initial Error:
ImportError: cannot import name 'decoder_stack' from 'transformer'.- This occurred because Python could not find the Meliad library.
- Fix: I confirmed that I had cloned Meliad into
meliad_lib/meliadand correctly set thePYTHONPATHusingexport PYTHONPATH=$PYTHONPATH:$(pwd)/meliad_lib/meliad.
-
Circular Import Error: After fixing the path, a new error appeared:
ImportError: cannot import name 'decoder_stack' from partially initialized module 'transformer' (most likely due to a circular import).- This seemed to be caused by a file name conflict, as both AlphaGeometry and Meliad have a file named
decoder_stack.py. - Fix: I renamed the AlphaGeometry file to
ag_decoder_stack.pyand updated the corresponding import statement inmodels.py.
- This seemed to be caused by a file name conflict, as both AlphaGeometry and Meliad have a file named
-
Module Not Found Error: The previous fix led to
ModuleNotFoundError: No module named 'transformer.decoder_stack'.- To diagnose this, I ran a direct import test in a Python shell (
import transformer.decoder_stack), which also failed. This confirmed the issue was with the Meliad library itself, not the AlphaGeometry script. - Fix: I installed Meliad's own dependencies by running
pip install -r meliad_lib/meliad/requirements.txt.
- To diagnose this, I ran a direct import test in a Python shell (
-
NumPy Version Conflict: After installing Meliad's dependencies, a new error occurred:
ImportError: numpy.core.multiarray failed to import.- This was because Meliad's requirements installed NumPy 2.x, which conflicted with
matplotliband other packages that required NumPy 1.x. - Fix: I downgraded NumPy by running
pip install --force-reinstall "numpy<2.0".
- This was because Meliad's requirements installed NumPy 2.x, which conflicted with
-
Persistent
ModuleNotFoundError: After all these fixes, the error has reverted back toModuleNotFoundError: No module named 'transformer.decoder_stack'.
Current Status
The purely symbolic DDAR solver works correctly. However, the full alphageometry mode is unusable due to what appears to be a fundamental issue with the way the Meliad library's modules are structured or imported. Despite all troubleshooting, the core problem of importing transformer.decoder_stack persists.
Any help or guidance on how to resolve this final import issue would be greatly appreciated.