Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEAM ?= intertwine
BUMP ?= patch

# Optional Hub environment name override (defaults to pyproject.toml name)
# Usage: make hub-deploy E=network-logs NAME=sv-env-network-logs-judge
# Usage: make hub-deploy E=netlogs-judge
NAME ?=

# ---------- Colors (portable) ----------
Expand Down
10 changes: 7 additions & 3 deletions configs/rl/e1_judge.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Prime RL hosted training config for E1 Judge Variant (sv-env-network-logs-judge)
# Prime RL hosted training config for E1 Judge Variant (sv-netlogs-judge)
# Launch: prime rl run configs/rl/e1_judge.toml
# Or via make: make lab-run-e1-judge
#
# Note: the original Hub name `sv-env-network-logs-judge` triggers a Prime
# Kubernetes label truncation bug (`sv-env-network-logs-` ends with a dash).
# We deploy this judge variant under the shorter Hub name `sv-netlogs-judge`.
#
# WP3c: LLM-judge reward comparison experiment
# This config is MATCHED to configs/rl/e1.toml for controlled comparison:
# - Same model, same LoRA, same budget (max_steps, batch_size, rollouts_per_example)
Expand All @@ -27,7 +31,7 @@ max_tokens = 2048
temperature = 0.7

[[env]]
id = "intertwine/sv-env-network-logs-judge"
id = "intertwine/sv-netlogs-judge"
args = { max_examples = 200 }

[wandb]
Expand All @@ -42,7 +46,7 @@ rollouts_per_example = 1
eval_base_model = true

[[eval.env]]
id = "intertwine/sv-env-network-logs-judge"
id = "intertwine/sv-netlogs-judge"
args = { max_examples = 50 }
num_examples = 50
rollouts_per_example = 1
Expand Down
17 changes: 17 additions & 0 deletions environments/sv-env-netlogs-judge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Network Logs Judge Variant (WP3c)

This is the short-name Hub package for the E1 LLM-judge variant.

Why this package exists:
- Prime RL truncates long environment names when deriving Kubernetes labels.
- The original env id `sv-env-network-logs-judge` truncates to `sv-env-network-logs-`, which is invalid because it ends with `-`.
- This package publishes the same judge environment under the shorter env id `sv-netlogs-judge`.

Install:
- `prime env install intertwine/sv-netlogs-judge`

Usage:
- `from verifiers import load_environment`
- `env = load_environment("sv-netlogs-judge")`

The environment reuses the same dataset, parser, and judge reward logic as the original E1 judge implementation.
49 changes: 49 additions & 0 deletions environments/sv-env-netlogs-judge/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[project]
name = "sv-netlogs-judge"
description = "RL Security Verifiers: Network Logs Judge Reward Variant"
tags = [
"intertwine",
"security-verifiers",
"security",
"cybersecurity",
"single-turn",
"network-security",
"anomaly-detection",
"logs",
"classification",
"judge",
"train",
"eval",
]
version = "0.2.17"
requires-python = ">=3.12"
dependencies = [
"verifiers>=0.1.9",
"security-verifiers-utils>=0.3.1",
]

[project.entry-points."verifiers.environments"]
sv-netlogs-judge = "sv_netlogs_judge:load_environment"

[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"ruff>=0.12.11",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
include = [
"sv_netlogs_judge.py",
"sv_netlogs_judge_impl.py",
]

[tool.pytest.ini_options]
python_files = ["*_test.py"]
testpaths = ["."]

[tool.ruff]
line-length = 120
20 changes: 20 additions & 0 deletions environments/sv-env-netlogs-judge/sv_netlogs_judge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Short-name wrapper for the network logs judge environment.

Prime RL currently truncates environment names to 20 characters when deriving
Kubernetes labels. The original judge env id (`sv-env-network-logs-judge`)
truncates to `sv-env-network-logs-`, which is invalid because it ends with a
hyphen. This wrapper exposes a shorter stable module/env id that avoids the
label bug while reusing the same judge environment implementation.
"""

from __future__ import annotations

from sv_netlogs_judge_impl import load_environment as _load_environment

SHORT_ENV_ID = "sv-netlogs-judge"


def load_environment(**kwargs):
"""Load the short-name alias of the E1 judge environment."""
kwargs.setdefault("env_name", SHORT_ENV_ID)
return _load_environment(**kwargs)
Loading