Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/simple_scibuddy/coevolve/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def run(config, cfg):
"max_output_tokens": hcfg["max_tokens"],
"context_tokens": hcfg["context_tokens"],
"rollout_timeout_seconds": hcfg["seconds"],
"tool_seconds": cfg["tool_seconds"],
"tool_response_tokens": hcfg["tool_response_tokens"],
"tool_history_tokens": hcfg["tool_history_tokens"],
"train_index": str(root / "train.jsonl"),
Expand Down
3 changes: 2 additions & 1 deletion src/simple_scibuddy/coevolve/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def plan_round(cfg, directory, steps=50):
no_eval=False, no_checkpoint=False, eval_samples=1, eval_temperature=0.0)
mapping = {"context_tokens": "context_tokens", "max_output_tokens": "max_tokens",
"max_model_calls": "actions", "rollout_timeout_seconds": "seconds",
"tool_response_tokens": "tool_response_tokens", "tool_history_tokens": "tool_history_tokens"}
"tool_seconds": "tool_seconds", "tool_response_tokens": "tool_response_tokens",
"tool_history_tokens": "tool_history_tokens"}
for source, destination in mapping.items():
value = contract[source]
if not isinstance(value, int) or isinstance(value, bool) or value < 1:
Expand Down
5 changes: 3 additions & 2 deletions tests/test_explicit_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_rl_handoff_accepts_only_declared_train_test_ids(tmp_path, monkeypatch):
contract = dict(thinking_enabled=False, execution_network='disabled', temperature=1.0, top_p=1.0,
top_k=-1, entrypoint='run(task, api)', max_model_calls=9, max_tool_calls=9,
context_tokens=24576, max_output_tokens=4096, rollout_timeout_seconds=900,
tool_response_tokens=2048, tool_history_tokens=8192)
tool_seconds=47, tool_response_tokens=2048, tool_history_tokens=8192)
for split, key in [('train', 'train_index'), ('test', 'eval_index')]:
path = tmp_path / f'{split}.jsonl'
path.write_text(''.join(json.dumps(r) + '\n' for r in rows if r['split'] == split))
Expand All @@ -85,7 +85,8 @@ def test_rl_handoff_accepts_only_declared_train_test_ids(tmp_path, monkeypatch):
write_json(tmp_path / 'request.json', request)
monkeypatch.setattr(protocol, 'read_request', lambda _: request)
monkeypatch.setattr(worker, 'validate_payloads', lambda *args: None)
worker.plan_round({'dataset': str(tmp_path / 'dataset')}, tmp_path, 30)
_, planned = worker.plan_round({'dataset': str(tmp_path / 'dataset'), 'tool_seconds': 999}, tmp_path, 30)
assert planned['tool_seconds'] == contract['tool_seconds'] == 47
path = tmp_path / 'train.jsonl'
path.write_text(path.read_text().replace('train-0', 'val-0'))
with pytest.raises(ValueError, match='differs from frozen'):
Expand Down