Skip to content

Commit

Permalink
do not shadow built-in property (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque authored Sep 13, 2024
1 parent 7d40b20 commit 83ab799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fairchem/core/trainers/ocp_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def _forward(self, batch):
assert (
"property" in self.output_targets[target_key]
), f"we need to know which property to match the target to, please specify the property field in the task config, current config: {self.output_targets[target_key]}"
property = self.output_targets[target_key]["property"]
pred = out[target_key][property]
prop = self.output_targets[target_key]["property"]
pred = out[target_key][prop]

## TODO: deprecate the following logic?
## Otherwise, assume target property is a derived output of the model. Construct the parent property
Expand Down

0 comments on commit 83ab799

Please sign in to comment.