Skip to content

Commit

Permalink
fix decomposition in output logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lbluque committed Sep 18, 2024
1 parent d697822 commit 0eebde7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/fairchem/core/trainers/ocp_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,8 @@ def _forward(self, batch):
), 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]}"
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
elif self.output_targets[target_key] == "decomposition":
# TODO clean up this logic to reconstruct a tensor from its predicted decomposition
elif "decomposition" in self.output_targets[target_key]:
_max_rank = 0
for subtarget_key in self.output_targets[target_key]["decomposition"]:
_max_rank = max(
Expand Down

0 comments on commit 0eebde7

Please sign in to comment.