Skip to content
Open
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 agentlightning/verl/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ def _train_step(self, batch_dict: dict) -> dict:
rollout_data_dir = self.config.trainer.get("rollout_data_dir", None)
if rollout_data_dir:
with _timer("dump_rollout_generations", timing_raw):
print(batch.batch.keys())
inputs = self.tokenizer.batch_decode(batch.batch["prompts"], skip_special_tokens=True)
outputs = self.tokenizer.batch_decode(batch.batch["responses"], skip_special_tokens=True)
scores = batch.batch["token_level_scores"].sum(-1).cpu().tolist()
self._dump_generations(
inputs=inputs,
outputs=outputs,
gts=None,
scores=scores,
reward_extra_infos_dict=reward_extra_infos_dict,
dump_path=rollout_data_dir,
Comment on lines 420 to 426
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,13 @@ def _train_step(self, batch_dict: dict) -> dict:
rollout_data_dir = self.config.trainer.get("rollout_data_dir", None)
if rollout_data_dir:
with _timer("dump_rollout_generations", timing_raw):
print(batch.batch.keys())
inputs = self.tokenizer.batch_decode(batch.batch["prompts"], skip_special_tokens=True)
outputs = self.tokenizer.batch_decode(batch.batch["responses"], skip_special_tokens=True)
scores = batch.batch["token_level_scores"].sum(-1).cpu().tolist()
self._dump_generations(
inputs=inputs,
outputs=outputs,
gts=None,
scores=scores,
reward_extra_infos_dict=reward_extra_infos_dict,
dump_path=rollout_data_dir,
Comment on lines 520 to 526
Expand Down