Skip to content

Commit

Permalink
[Usability] PPO exp wandb naming fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizhen committed Jun 12, 2024
1 parent 58ec809 commit 59873b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/lmflow/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,6 @@ class PPOArguments(FinetunerArguments):
[trl.trainer.ppov2_config.py](https://github.com/huggingface/trl/blob/main/trl/trainer/ppov2_config.py).
"""
# common config
exp_name: str = os.path.basename(__file__)[: -len(".py")]
"""the name of this experiment"""
run_name: Optional[str] = None
"""a unique name of this run"""
sanity_check: bool = False
"""wether to run in debug mode"""

Expand Down
1 change: 0 additions & 1 deletion src/lmflow/pipeline/utils/ppo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def __init__(
self.args.num_updates = int(self.args.total_episodes // self.args.batch_size)
time_tensor = torch.tensor(int(time.time()), device=accelerator.device)
time_int = broadcast(time_tensor, 0).item() # avoid different timestamps across processes
self.args.run_name = f"{self.args.exp_name}__{self.args.seed}__{time_int}"
self.local_seed = self.args.seed + accelerator.process_index * 100003 # Prime
if self.args.num_sample_generations > 0:
self.sample_generations_freq = max(1, self.args.num_updates // self.args.num_sample_generations)
Expand Down

0 comments on commit 59873b3

Please sign in to comment.