Skip to content

Commit

Permalink
Fix x_tensors key in evaluation_nesymres.py
Browse files Browse the repository at this point in the history
  • Loading branch information
psaegert committed Feb 9, 2025
1 parent 38e7404 commit a2479e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flash_ansr/compat/evaluation_nesymres.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def evaluate(
results_dict['x_val'].append(batch['x_tensors'].cpu().numpy()[:, self.n_support:])
results_dict['y_val'].append(batch['y_tensors'].cpu().numpy()[:, self.n_support:])

results_dict['n_support'].append([batch['x_tensor'].shape[1] // 2] * batch['x_tensor'].shape[0])
results_dict['n_support'].append([batch['x_tensors'].shape[1] // 2] * batch['x_tensors'].shape[0])

# Create the labels for the next token prediction task (i.e. shift the batch['input_ids'] by one position to the right)
labels = batch['labels'].clone()
Expand Down

0 comments on commit a2479e4

Please sign in to comment.