Skip to content

Commit

Permalink
prevent loading of properties when training without conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasGebauer committed Jun 1, 2023
1 parent acbe70e commit ba0b526
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/schnetpack_gschnet/data/datamodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def load_partitions(self):
)

def register_properties(self, properties: List[str]):
if properties is not None and len(properties) > 0:
if properties is not None:
available_properties = self.dataset.available_properties
for p in properties:
if p not in available_properties:
Expand Down
2 changes: 1 addition & 1 deletion src/schnetpack_gschnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def predict_distances(

def get_required_data_properties(self):
if self.conditioning_module is None:
return None
return []
else:
return self.conditioning_module.required_data_properties

Expand Down

0 comments on commit ba0b526

Please sign in to comment.