Skip to content

Commit

Permalink
wee additions
Browse files Browse the repository at this point in the history
  • Loading branch information
Parry-Parry committed Nov 6, 2024
1 parent 0f7be8e commit b76ee6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rankers/train/training_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from dataclasses import field, fields, dataclass
from typing import List, Optional
from enum import Enum
import os
from .. import is_ir_measures_available, seed_everything


Expand Down Expand Up @@ -42,6 +43,9 @@ class RankerTrainingArguments(TrainingArguments):
def __post_init__(self):
super().__post_init__()
seed_everything(self.seed)

if self.wandb_project is not None:
os.environ['WANDB_PROJECT'] = self.wandb_project
assert self.group_size > 0, "Group size must be greater than 0"
if len(self.eval_metrics) > 0:
self.eval_metrics = [parse_ir_measure(metric) for metric in self.eval_metrics]
Expand Down

0 comments on commit b76ee6d

Please sign in to comment.