Override criterion weights at run time in RewardKit

Open
#4,485 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Sauvi72 is already working on this.

Since Nov 26, 2026.

  • #4497 by @Sauvi72 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
67/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reading how REWARDKIT_JUDGE, REWARDKIT_MODEL, and REWARDKIT_REASONING_EFFORT are applied during a run, then trace where criterion weights from judge.toml are loaded and written to reward-details.json. Add a per-run override keyed by criterion id while preserving configured weights for criteria absent from the map. Done when the example JSON overrides are reflected in reward-details.json and unspecified criteria retain their judge.toml weights.

Written by the indexing model from the issue text.

Description

TLDR: let a run set criterion weights without editing judge.toml

A criterion's weight only comes from weight in judge.toml. The judge, model and reasoning effort can be overridden per run (REWARDKIT_JUDGE, REWARDKIT_MODEL, REWARDKIT_REASONING_EFFORT), but weights can't.

Ask: a run-time override keyed by criterion id, for example an env var that holds a JSON map:

harbor run ... --ve 'REWARDKIT_CRITERION_WEIGHTS={"a": 2, "b": 0.5}'

Criteria not in the map keep their judge.toml weight, and reward-details.json reports the weight used.

Why: the same task often needs to be scored under more than one weighting. Today that means editing judge.toml or keeping a copy of the task per weighting.

related issues: #4440

Dominant language
Python
Stars
5.6k
Forks
1.9k
Avg merge
1d 17h
Merged PRs (30d)
156

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from harbor-framework/harbor

All issues in harbor-framework/harbor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.