Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

fix(rollout): point the ruler backend at openpipe-art (#2046) (#2059)

Rahul Seervi111bb285f410
diff --git a/changelog.d/0.76.0/2059.fixed.md b/changelog.d/0.76.0/2059.fixed.md
new file mode 100644
index 00000000..46a0e0ca
--- /dev/null
+++ b/changelog.d/0.76.0/2059.fixed.md
@@ -0,0 +1,3 @@
+- `rollout_backend: ruler` now names `openpipe-art`, the package RULER ships in, instead of
+ `ruler-eval`, which is not on PyPI, and no longer treats PyPI's unrelated `ruler` grammar
+ library as the backend being installed (#2046 by @Rahul-cs50 in #2059).
diff --git a/src/soup_cli/utils/agent_rollout.py b/src/soup_cli/utils/agent_rollout.py
index a9c7bfcc..c668a3b9 100644
--- a/src/soup_cli/utils/agent_rollout.py
+++ b/src/soup_cli/utils/agent_rollout.py
@@ -4,7 +4,7 @@ Closed allowlist for multi-turn agent RL rollout backends shipped for
unsloth + axolotl parity:
- ``art`` — OpenPipe ART (multi-turn agent rollouts; unsloth)
-- ``ruler`` — RULER agent eval framework (unsloth)
+- ``ruler`` — OpenPipe RULER judge scorer, shipped in ``openpipe-art`` (unsloth)
- ``nemo_gym`` — NVIDIA NeMo Gym (unsloth, axolotl)
- ``openenv`` — Generic ``rollout_func`` protocol (unsloth, axolotl)
@@ -55,10 +55,11 @@ _ROLLOUT_FUNC_RE = re.compile(
)
# Import names per external backend (pip name differs — see
-# ``required_package`` on the spec).
+# ``required_package`` on the spec). RULER ships inside ``openpipe-art``,
+# so it probes ``art``: PyPI's ``ruler`` is an unrelated grammar library.
_EXTERNAL_IMPORT_NAMES = types.MappingProxyType({
"art": "art",
- "ruler": "ruler",
+ "ruler": "art",
"nemo_gym": "nemo_gym",
})
@@ -94,8 +95,8 @@ _BACKEND_METADATA = types.MappingProxyType({
),
"ruler": RolloutBackendSpec(
name="ruler",
- description="RULER agent evaluation framework",
- required_package="ruler-eval",
+ description="OpenPipe RULER — ART's relative LLM-judge scorer",
+ required_package="openpipe-art",
live_wired=False,
),
"nemo_gym": RolloutBackendSpec(
diff --git a/tests/test_agent_rollout.py b/tests/test_agent_rollout.py
new file mode 100644
index 00000000..0eb4029a
--- /dev/null
+++ b/tests/test_agent_rollout.py
@@ -0,0 +1,32 @@
+"""agent_rollout: the ``ruler`` backend must point at a package that exists (#2046)."""
+
+from __future__ import annotations
+
+import pytest
+
+from soup_cli.utils import agent_rollout
+
+
+def test_ruler_missing_package_message_names_an_installable_package(monkeypatch):
+ monkeypatch.setattr(agent_rollout, "_spec_exists", lambda _name: False)
+ with pytest.raises(ImportError) as excinfo:
+ agent_rollout.launch_rollout("ruler", prompts=["x"])
+ message = str(excinfo.value)
+ assert "ruler-eval" not in message
+ assert "pip install openpipe-art" in message
+
+
+def test_ruler_probe_is_not_satisfied_by_an_unrelated_ruler_module(monkeypatch):
+ # PyPI's `ruler` (a grammar library) installs a top-level `ruler` module.
+ monkeypatch.setattr(agent_rollout, "_spec_exists", lambda name: name == "ruler")
+ with pytest.raises(ImportError, match="openpipe-art"):
+ agent_rollout.launch_rollout("ruler", prompts=["x"])
+
+
+def test_ruler_with_openpipe_art_installed_reaches_the_beta_gate(monkeypatch):
+ monkeypatch.setattr(agent_rollout, "_spec_exists", lambda name: name == "art")
+ with pytest.raises(RuntimeError) as excinfo:
+ agent_rollout.launch_rollout("ruler", prompts=["x"])
+ message = str(excinfo.value)
+ assert "openpipe-art" in message
+ assert "not yet validated" in message
diff --git a/tests/test_v0500_part_c.py b/tests/test_v0500_part_c.py
index 1592dca0..dc50ede4 100644
--- a/tests/test_v0500_part_c.py
+++ b/tests/test_v0500_part_c.py
@@ -100,7 +100,7 @@ def test_get_rollout_backend_spec_frozen():
@pytest.mark.parametrize("name,pkg", [
("art", "openpipe-art"),
- ("ruler", "ruler-eval"),
+ ("ruler", "openpipe-art"),
("nemo_gym", "nemo-gym"),
("openenv", None),
])
diff --git a/tests/test_v07121.py b/tests/test_v07121.py
index 094fe8a6..83544782 100644
--- a/tests/test_v07121.py
+++ b/tests/test_v07121.py
@@ -861,7 +861,7 @@ class TestLaunchRolloutOpenenv:
class TestLaunchRolloutExternal:
@pytest.mark.parametrize(
("name", "pkg"),
- [("art", "openpipe-art"), ("ruler", "ruler-eval"), ("nemo_gym", "nemo-gym")],
+ [("art", "openpipe-art"), ("ruler", "openpipe-art"), ("nemo_gym", "nemo-gym")],
)
def test_missing_package_friendly(self, monkeypatch, name, pkg):
from soup_cli.utils import agent_rollout