fastevolve 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastevolve-0.3.3 → fastevolve-0.3.4}/PKG-INFO +4 -4
- {fastevolve-0.3.3 → fastevolve-0.3.4}/README.md +3 -3
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/ollama.py +32 -3
- {fastevolve-0.3.3 → fastevolve-0.3.4}/pyproject.toml +1 -1
- {fastevolve-0.3.3 → fastevolve-0.3.4}/uv.lock +1 -1
- {fastevolve-0.3.3 → fastevolve-0.3.4}/.claude/settings.local.json +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/.gitignore +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/.python-version +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/__init__.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/checkpoint.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/config.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/controller.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/evaluator/__init__.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/evaluator/config.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/evaluator/evaluator.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/evaluator/result.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/__init__.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/anthropic_llm.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/base.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/config.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/ensemble.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/llm_ensemble/openai_llm.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/program_database/__init__.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/program_database/config.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/program_database/database.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/program_database/embedder.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/program_database/program.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/prompt_sampler/__init__.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/prompt_sampler/config.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/prompt_sampler/sampler.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/prompt_sampler/template_library.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/fastevolve/telemetry.py +0 -0
- {fastevolve-0.3.3 → fastevolve-0.3.4}/main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastevolve
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Minimal open-source AlphaEvolve: LLM-driven program evolution with MAP-Elites islands, cascade evaluation, and a local Ollama ensemble.
|
|
5
5
|
Project-URL: Homepage, https://github.com/tiagomonteiro0715/fastevolve
|
|
6
6
|
Project-URL: Repository, https://github.com/tiagomonteiro0715/fastevolve
|
|
@@ -99,7 +99,7 @@ cfg = Config()
|
|
|
99
99
|
cfg.iterations = 20
|
|
100
100
|
cfg.checkpoint_path = "run.log" # optional — resume if killed mid-run
|
|
101
101
|
cfg.ensemble.models = [
|
|
102
|
-
ModelConfig(name="
|
|
102
|
+
ModelConfig(name="gemma4:e4b", provider="ollama", temperature=0.7, weight=1.0, role="fast"),
|
|
103
103
|
]
|
|
104
104
|
cfg.evaluator.cascade = [(correctness, 0.0)]
|
|
105
105
|
|
|
@@ -225,7 +225,7 @@ Start Ollama and pull the model first:
|
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
227
|
ollama serve
|
|
228
|
-
ollama pull
|
|
228
|
+
ollama pull gemma4:e4b
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
Then:
|
|
@@ -251,7 +251,7 @@ Then pick a `provider` per model in your config. You can freely mix providers in
|
|
|
251
251
|
from fastevolve.llm_ensemble import ModelConfig
|
|
252
252
|
|
|
253
253
|
cfg.ensemble.models = [
|
|
254
|
-
ModelConfig(name="
|
|
254
|
+
ModelConfig(name="gemma4:e4b", provider="ollama", temperature=0.6, weight=1.0, role="fast"),
|
|
255
255
|
ModelConfig(name="gpt-4o-mini", provider="openai", temperature=0.6, weight=1.0, role="fast"),
|
|
256
256
|
ModelConfig(name="claude-opus-4-7", provider="anthropic", temperature=0.7, weight=1.0,
|
|
257
257
|
role="deep", options={"max_tokens": 4096}),
|
|
@@ -69,7 +69,7 @@ cfg = Config()
|
|
|
69
69
|
cfg.iterations = 20
|
|
70
70
|
cfg.checkpoint_path = "run.log" # optional — resume if killed mid-run
|
|
71
71
|
cfg.ensemble.models = [
|
|
72
|
-
ModelConfig(name="
|
|
72
|
+
ModelConfig(name="gemma4:e4b", provider="ollama", temperature=0.7, weight=1.0, role="fast"),
|
|
73
73
|
]
|
|
74
74
|
cfg.evaluator.cascade = [(correctness, 0.0)]
|
|
75
75
|
|
|
@@ -195,7 +195,7 @@ Start Ollama and pull the model first:
|
|
|
195
195
|
|
|
196
196
|
```bash
|
|
197
197
|
ollama serve
|
|
198
|
-
ollama pull
|
|
198
|
+
ollama pull gemma4:e4b
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
Then:
|
|
@@ -221,7 +221,7 @@ Then pick a `provider` per model in your config. You can freely mix providers in
|
|
|
221
221
|
from fastevolve.llm_ensemble import ModelConfig
|
|
222
222
|
|
|
223
223
|
cfg.ensemble.models = [
|
|
224
|
-
ModelConfig(name="
|
|
224
|
+
ModelConfig(name="gemma4:e4b", provider="ollama", temperature=0.6, weight=1.0, role="fast"),
|
|
225
225
|
ModelConfig(name="gpt-4o-mini", provider="openai", temperature=0.6, weight=1.0, role="fast"),
|
|
226
226
|
ModelConfig(name="claude-opus-4-7", provider="anthropic", temperature=0.7, weight=1.0,
|
|
227
227
|
role="deep", options={"max_tokens": 4096}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import platform
|
|
2
3
|
import shutil
|
|
3
4
|
import subprocess
|
|
4
5
|
import time
|
|
@@ -20,6 +21,34 @@ def _gpu_available() -> bool:
|
|
|
20
21
|
return False
|
|
21
22
|
|
|
22
23
|
|
|
24
|
+
@cache
|
|
25
|
+
def _hardware_info() -> str:
|
|
26
|
+
if _gpu_available():
|
|
27
|
+
try:
|
|
28
|
+
r = subprocess.run(
|
|
29
|
+
["nvidia-smi", "--query-gpu=name", "--format=csv,noheader"],
|
|
30
|
+
capture_output=True, text=True, timeout=2,
|
|
31
|
+
)
|
|
32
|
+
gpus = [g.strip() for g in r.stdout.strip().splitlines() if g.strip()]
|
|
33
|
+
if gpus:
|
|
34
|
+
tag = f"{gpus[0]}" + (f" ×{len(gpus)}" if len(gpus) > 1 else "")
|
|
35
|
+
return f"GPU: [bold green]{tag}[/]"
|
|
36
|
+
except Exception:
|
|
37
|
+
pass
|
|
38
|
+
return "GPU: [bold green]detected[/]"
|
|
39
|
+
cpu = platform.processor() or ""
|
|
40
|
+
if not cpu and os.path.exists("/proc/cpuinfo"):
|
|
41
|
+
try:
|
|
42
|
+
with open("/proc/cpuinfo") as f:
|
|
43
|
+
for line in f:
|
|
44
|
+
if line.startswith("model name"):
|
|
45
|
+
cpu = line.split(":", 1)[1].strip()
|
|
46
|
+
break
|
|
47
|
+
except Exception:
|
|
48
|
+
pass
|
|
49
|
+
return f"CPU: [bold yellow]{cpu or 'unknown'}[/] ({os.cpu_count() or '?'} cores)"
|
|
50
|
+
|
|
51
|
+
|
|
23
52
|
def start_ollama(host: str = "127.0.0.1:11434", *, wait: float = 5.0) -> None:
|
|
24
53
|
"""Start an ollama daemon with GPU-aware optimizations. No-op if one is already running."""
|
|
25
54
|
for prefix in ("http://", "https://"):
|
|
@@ -39,9 +68,9 @@ def start_ollama(host: str = "127.0.0.1:11434", *, wait: float = 5.0) -> None:
|
|
|
39
68
|
env.setdefault("OLLAMA_KV_CACHE_TYPE", "q8_0")
|
|
40
69
|
env.setdefault("OLLAMA_NUM_PARALLEL", "4")
|
|
41
70
|
env.setdefault("OLLAMA_MAX_LOADED_MODELS", "2")
|
|
42
|
-
log.info("[ollama] starting server
|
|
71
|
+
log.info("[ollama] starting server | %s | flash_attn, q8_0 kv-cache, parallel=4, max_loaded=2", _hardware_info())
|
|
43
72
|
else:
|
|
44
|
-
log.info("[ollama] starting server
|
|
73
|
+
log.info("[ollama] starting server | %s", _hardware_info())
|
|
45
74
|
|
|
46
75
|
path = shutil.which("ollama") or "/usr/local/bin/ollama"
|
|
47
76
|
subprocess.Popen([path, "serve"], env=env,
|
|
@@ -60,7 +89,7 @@ class OllamaLLM(BaseLLM):
|
|
|
60
89
|
except Exception:
|
|
61
90
|
start_ollama(host=host)
|
|
62
91
|
self.client = Client(host=host, timeout=timeout)
|
|
63
|
-
log.info("[ollama] %s
|
|
92
|
+
log.info("[ollama] %s | %s", self.cfg.name, _hardware_info())
|
|
64
93
|
self._ensure_model()
|
|
65
94
|
|
|
66
95
|
def _ensure_model(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "fastevolve"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.4"
|
|
4
4
|
description = "Minimal open-source AlphaEvolve: LLM-driven program evolution with MAP-Elites islands, cascade evaluation, and a local Ollama ensemble."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|