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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,4 @@ package-lock.json
package.json
tau2-bench
*.err
eval-protocol
2 changes: 2 additions & 0 deletions eval_protocol/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ def parse_args(args=None):
rft_parser.add_argument("--evaluation-dataset", help="Optional separate eval dataset id")
rft_parser.add_argument("--eval-auto-carveout", dest="eval_auto_carveout", action="store_true", default=True)
rft_parser.add_argument("--no-eval-auto-carveout", dest="eval_auto_carveout", action="store_false")
# Rollout chunking
rft_parser.add_argument("--chunk-size", type=int, help="Data chunk size for rollout batching")
# Inference params
rft_parser.add_argument("--temperature", type=float)
rft_parser.add_argument("--top-p", type=float)
Expand Down
1 change: 1 addition & 0 deletions eval_protocol/cli_commands/create_rft.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ def create_rft_command(args) -> int:
"trainingConfig": training_config,
"inferenceParameters": inference_params or None,
"wandbConfig": wandb_config,
"chunkSize": getattr(args, "chunk_size", None),
"outputStats": None,
"outputMetrics": None,
"mcpServer": None,
Expand Down
5 changes: 5 additions & 0 deletions tests/pytest/gsm8k/test_pytest_math_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import os
from eval_protocol.data_loader.jsonl_data_loader import EvaluationRowJsonlDataLoader
from typing import List, Dict, Any, Optional
import logging

logger = logging.getLogger(__name__)


def extract_answer_digits(ground_truth: str) -> Optional[str]:
Expand Down Expand Up @@ -54,6 +57,7 @@ def test_math_dataset(row: EvaluationRow, **kwargs) -> EvaluationRow:
EvaluationRow with the evaluation result
"""
#### Get predicted answer value
logger.info(f"I am beginning to execute GSM8k rollout: {row.execution_metadata.rollout_id}")
prediction = extract_answer_digits(str(row.messages[2].content))
gt = extract_answer_digits(str(row.ground_truth))

Expand All @@ -77,5 +81,6 @@ def test_math_dataset(row: EvaluationRow, **kwargs) -> EvaluationRow:
is_score_valid=True, # Optional: Whether the score is valid, true by default
reason=reason, # Optional: The reason for the score
)
logger.info(f"I am done executing GSM8k rollout: {row.execution_metadata.rollout_id}")
row.evaluation_result = evaluation_result
return row
Loading