FAQ and Troubleshooting
Objectives
Resolve common issues
Understand algorithm behavior
Get help when needed
Installation Issues
ModuleNotFoundError: cec2013 or mmo
Problem: Python can’t find the CEC2013 or mmo module.
Solution: Use the activation wrapper script instead of directly activating the venv:
# Wrong (doesn't set PYTHONPATH)
source venv/bin/activate
# Correct (sets PYTHONPATH automatically)
source activate-mmo.sh
The activate-mmo.sh script is created by setup.sh and automatically configures PYTHONPATH to include both the project root and the CEC2013 benchmarks directory.
ImportError: numpy.distutils
Problem: Old numpy compatibility issue.
Solution: Upgrade numpy:
pip install --upgrade numpy
Algorithm Issues
Algorithm finds few/no solutions
Possible causes:
Budget too low
Function has very narrow basins
Population size too small
Solutions:
Increase budget (try 2-5x)
Decrease CMA-ES initial sigma
Increase GA population size
Solutions are duplicates
Problem: Multiple solutions at the same location.
Cause: Clustering threshold too small or CMA-ES converging to same point from multiple seeds.
Solution: Increase solution uniqueness threshold in post-processing:
from scipy.spatial.distance import pdist, squareform
def remove_duplicates(solutions, threshold=1e-4):
"""Remove duplicate solutions."""
if len(solutions) <= 1:
return solutions
distances = squareform(pdist(solutions[:, :-1]))
keep = [0]
for i in range(1, len(solutions)):
if np.min(distances[i, keep]) > threshold:
keep.append(i)
return solutions[keep]
Algorithm is slow
Possible causes:
Function evaluation is expensive (not CEC2013 benchmarks)
Too many CMA-ES iterations
Large population size
Solutions:
For expensive custom functions: reduce evaluation cost or budget
Reduce CMA-ES max iterations
Use a surrogate model for expensive functions
VM Issues
Connection refused
Cause: VM not running or firewall blocking.
Solutions:
Check VM status in NAIC portal
Verify your IP is whitelisted
Try:
ping <VM_IP>
Permission denied (publickey)
Cause: SSH key issue.
Solutions:
# Fix key permissions
chmod 600 /path/to/your-key.pem
# Verify key path is correct
ls -la /path/to/your-key.pem
Host key verification failed
Cause: VM IP changed (common with NAIC Orchestrator).
Solution:
ssh-keygen -R <old_VM_IP>
Jupyter not accessible
Causes:
SSH tunnel not running
Jupyter not started
Wrong port
Solutions:
Start tunnel:
ssh -N -L 8888:localhost:8888 -i key.pem ubuntu@<VM_IP>Start Jupyter:
jupyter lab --no-browser --ip=127.0.0.1 --port=8888Use alternative port if 8888 is busy
Performance Questions
What budget should I use?
Guidelines based on CEC2013:
Dimension |
Optima |
Recommended Budget |
|---|---|---|
1-2D |
< 10 |
50,000 |
2D |
10-50 |
200,000 |
2-10D |
> 50 |
400,000 |
10-20D |
any |
400,000+ |
Getting Help
Resources
NAIC Support: support@naic.no
VM Workflows Guide: https://training.pages.sigma2.no/tutorials/naic-cloud-vm-workflows/
NAIC Portal: https://orchestrator.naic.no
Reporting Issues
When reporting issues, include:
Error message (full traceback)
Python version:
python --versionPackage versions:
pip listSteps to reproduce
Algorithm Reference
For algorithm details, see the research paper:
Johannsen et al. (2022). A scalable, hybrid genetic algorithm for continuous multimodal optimization in moderate dimensions. Nordic Machine Intelligence.
Keypoints
Most import errors are solved by using
source activate-mmo.sh(notsource venv/bin/activate)Increase budget for difficult functions with many optima
VM connection issues often stem from IP changes or key permissions
Contact support@naic.no for NAIC-specific issues