This document helps resolve common issues, errors, and problems encountered when using or developing this project.
Symptoms:
ModuleNotFoundError: No module named 'named'
Solution:
- Make sure dependencies are installed:
pip install -r requirements.txt- If using a virtual environment, activate it:
python -m venv venv
source venv/bin/activate # Linux / macOS
venv\Scripts\activate # WindowsTypeError: grad() missing required positional argument
Solution:
- Ensure gradient and function signatures match:
def f(x):
return (x**2).sum()
def grad(x):
return 2*xPossible Causes:
- Step sizes too large
- Improper line search
- Gradient not computed correctly
- Initial guess far from optimum
Tips:
- Try a different starting point
- Use smaller Wolfe line search parameters
- Check gradient implementation with numerical differentiation
Warning:
SyntaxError: invalid syntax
Solution:
- Ensure Python ≥ 3.10 is used
- Check version:
python --versionCause:
- Very large dimension (
n) - Storing all curvature pairs
Solution:
- Reduce memory parameter
m - Use sparse or mini-batch implementation
Fix:
- Ensure required extensions are installed:
jupyter labextension install @jupyter-widgets/jupyterlab-managerCheck:
- Are you using latest code?
- Did you update algorithm logic without updating test thresholds?
Below are common exceptions and how to address them:
| Error | Cause | Fix |
|---|---|---|
ValueError: shapes not aligned |
Wrong array shape | Ensure correct vector dimensions |
TypeError: '<' not supported |
Invalid comparison | Cast types properly |
IndexError |
Out-of-range | Check indices and loops |
FloatingPointError |
Numerical instability | Use smaller step size |
If none of the above solves your problem:
-
Search existing Issues in the repository
-
Open a new Issue with:
- Clear description
- Minimal reproducible code
- Screenshots or logs if possible
We will respond as soon as possible.
Please include:
- Operating System
- Python version
- Exact error traceback
- Input data that caused the error
Example:
OS: Ubuntu 22.04
Python: 3.11.2
Error Traceback:
...
Function definition:
...
Thank you for using the project! 🚀