diff --git a/src/fairchem/core/trainers/ocp_trainer.py b/src/fairchem/core/trainers/ocp_trainer.py index 0fc5d1f7e..a50dc672c 100644 --- a/src/fairchem/core/trainers/ocp_trainer.py +++ b/src/fairchem/core/trainers/ocp_trainer.py @@ -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