mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-04 14:39:23 +00:00
fix: address 4 new bugbot review comments
- cli.py: use s.get('done',0)+1 instead of max(s['done'], event['case_index']) for correct progress counting
- cli.py: use explicit 'is not None' check for config_threshold to avoid treating 0.0 as falsy
- cli.py: remove unused agent_count variable
- constants.py + create_agent.py: add key_name to ollama ENV_VARS entry so API_BASE is correctly saved to OPENAI_API_BASE
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -543,7 +543,9 @@ def test(
|
||||
uv_args.extend(["-f", trained_agents_file])
|
||||
_relaunch_via_uv(uv_args)
|
||||
|
||||
config_threshold = _read_config("test", "threshold") or _read_config("test_threshold")
|
||||
config_threshold = _read_config("test", "threshold")
|
||||
if config_threshold is None:
|
||||
config_threshold = _read_config("test_threshold")
|
||||
effective_threshold = threshold if threshold is not None else (float(config_threshold) if config_threshold is not None else 0.7)
|
||||
|
||||
_test_new_agents(agent_files, n_iterations, model, effective_threshold, effective_judge)
|
||||
@@ -623,7 +625,7 @@ class _BenchmarkLiveProgress:
|
||||
self._state[model]["status"] = "judging"
|
||||
elif t == "case_done":
|
||||
s = self._state[model]
|
||||
s["done"] = max(s["done"], event["case_index"])
|
||||
s["done"] = s.get("done", 0) + 1
|
||||
if event.get("passed"):
|
||||
s["passed"] += 1
|
||||
s["status"] = "running"
|
||||
@@ -776,7 +778,6 @@ def _test_new_agents(
|
||||
)
|
||||
return await asyncio.gather(*tasks, return_exceptions=True)
|
||||
|
||||
agent_count = sum(1 for j in jobs for _ in (model_list or [None]))
|
||||
case_count = sum(len(j["cases"]) for j in jobs)
|
||||
click.echo()
|
||||
click.secho(
|
||||
|
||||
@@ -55,6 +55,7 @@ ENV_VARS: dict[str, list[dict[str, Any]]] = {
|
||||
"ollama": [
|
||||
{
|
||||
"default": True,
|
||||
"key_name": "OPENAI_API_BASE",
|
||||
"API_BASE": "http://localhost:11434",
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user