Skip to content

Commit

Permalink
Adding eval on start and seed params
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Oct 3, 2024
1 parent 2227605 commit 046d4a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdelfin/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def run_train(config: TrainConfig):
model = get_peft_model(model=model, peft_config=peft_config)
log_trainable_parameters(model=model, logger=logger)

# Do final filtering, and prep for running model forward()
random.seed(config.train_data.seed)

# Training sets get all concatenated and shuffled
train_dataset = (
Expand Down Expand Up @@ -193,6 +193,7 @@ def run_train(config: TrainConfig):
label_names=["labels"], # fix from https://github.com/huggingface/transformers/issues/22885
max_grad_norm=config.hparams.clip_grad_norm,
remove_unused_columns=False,
eval_on_start=True,
)

# Set the collator
Expand Down

0 comments on commit 046d4a4

Please sign in to comment.