Skip to content

Commit

Permalink
Fix typo and reformat code to satisfy now-caught flake8 linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase authored Apr 12, 2024
1 parent 1602704 commit a21178b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nequip/data/_dataset/_base_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ def process(self):
# Check bad key combinations, but don't require that this be a graph yet.
AtomicDataDict.validate_keys(all_keys, graph_required=False)

# check dimesionality
# check dimensionality
num_examples = set([len(a) for a in fields.values()])
if not len(num_examples) == 1:
shape_dict = {f: v.shape for f, v in fields.items()}
raise ValueError(
f"This dataset is invalid: expected all fields to have same length (same number of examples), but they had shapes { {f: v.shape for f, v in fields.items() } }"
f"This dataset is invalid: expected all fields to have same length (same number of examples), but they had shapes {shape_dict}"
)
num_examples = next(iter(num_examples))

Expand Down

0 comments on commit a21178b

Please sign in to comment.