Skip to content

Commit

Permalink
fix mutable field issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ariG23498 committed Jan 23, 2025
1 parent c7a5511 commit 7638607
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trl/trainer/dpo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ class DPOConfig(TrainingArguments):
loss_weights: Optional[Dict[str, float]] = field(
default={"sigmoid": 1.0},
)
loss_weights: Optional[Dict[str, float]] = field(
default_factory=lambda: ["your_values"]
)
loss_type: List[str] | str = field(
default="sigmoid",
metadata={
Expand Down

0 comments on commit 7638607

Please sign in to comment.