fix(sdk): parse BashJob reward results (#1214)#1215
Draft
xdlkc wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #1214
Summary
rock.sdk.reward.resultrock.sdk.job.resultand Harbor result import paths backward-compatible via re-exports / thin wrappersBashTrial.collect()to discover<trial_name>/result.jsonunder Bash job artifact roots and parseverifier_result.rewards.rewardastrial.scoreexit_codeonto parsed reward-protocol trial resultsLOG_DIRfor BashJob sessions and keep stdoutscore:parsing as a compatibility fallback when no trial result file existsdocs/proposals/bashjob-reward-result-parsing.mddocs/dev/job/result-protocol.mdRoot cause
BashJob collection only converted process exit status into the base
TrialResult. The base result type has no verifier rewards, soTrialResult.scoreremains0.0even when the Bash job produced reward protocol artifacts.Validation
uv run --extra admin --group test pytest tests/unit/sdk/job tests/unit/sdk/agent/test_job.py tests/unit/sdk/agent/test_models.py -q- 296 passeduv run ruff check rock/sdk/job rock/sdk/bench rock/sdk/reward rock/sdk/result.py tests/unit/sdk/job/test_result.py tests/unit/sdk/agent/test_job.py tests/unit/sdk/agent/test_models.pyuv run ruff format --check rock/sdk/job rock/sdk/bench rock/sdk/reward rock/sdk/result.py tests/unit/sdk/job/test_result.py tests/unit/sdk/agent/test_job.py tests/unit/sdk/agent/test_models.pyrock.sdk.reward.result,rock.sdk.job.result, androck.sdk.bench.models.trial.resultcompatibility