Skip to content

Commit bbe12f5

Browse files
authored
do not shadow built-in property (#841)
Former-commit-id: fbe79a27984fc7c30d8838f02a994bc301222213
1 parent bce3686 commit bbe12f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/fairchem/core/trainers/ocp_trainer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ def _forward(self, batch):
258258
assert (
259259
"property" in self.output_targets[target_key]
260260
), 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]}"
261-
property = self.output_targets[target_key]["property"]
262-
pred = out[target_key][property]
261+
prop = self.output_targets[target_key]["property"]
262+
pred = out[target_key][prop]
263263

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

0 commit comments

Comments
 (0)