"alphafold/vscode:/vscode.git/clone" did not exist on "4b726a2ecd81935a6ca9801fe72ce5dd80b1503d"
Commit b7f5febc authored by Yoach Lacombe's avatar Yoach Lacombe
Browse files

fix eval batch being None when sample size too smal

parent faef1c72
......@@ -1426,7 +1426,7 @@ def main():
vectorized_datasets["eval"],
collate_fn=data_collator,
batch_size=per_device_eval_batch_size,
drop_last=True,
drop_last=False,
num_workers=training_args.dataloader_pin_memory,
pin_memory=training_args.dataloader_pin_memory,
)
......@@ -1458,7 +1458,7 @@ def main():
eval_time = time.time() - eval_start
# normalize eval metrics
eval_metrics = {
key: torch.mean(torch.stack([d[key] for d in eval_metrics])) for key in eval_metrics[0]
key: torch.mean(torch.cat([d[key].unsqueeze(0) for d in eval_metrics])) for key in eval_metrics[0]
}
# compute metrics
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment