Skip to content

Commit

Permalink
checking to see if dataset_name is in keys before attempting to remov…
Browse files Browse the repository at this point in the history
…e it #319
  • Loading branch information
Kshitij V. Mehta committed Feb 5, 2025
1 parent c62961d commit 4c3e53c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hydragnn/utils/datasets/adiosdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def save(self):
if len(self.dataset[label]) > 0:
data = self.dataset[label][0]
keys = data.keys() if callable(data.keys) else data.keys
keys.remove("dataset_name") # we dont need this to be added to the keys
if "dataset_name" in keys:
keys.remove(
"dataset_name"
) # we dont need this to be added to the keys
self.io.DefineAttribute("%s/keys" % label, keys)
keys = sorted(keys)
self.comm.allgather(keys)
Expand Down

0 comments on commit 4c3e53c

Please sign in to comment.