Skip to content

Commit

Permalink
fixing early return returning a float and not a tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Aug 13, 2024
1 parent c44da10 commit 92de2bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netam/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ def joint_train(
)
self.reset_optimization(new_lr)
loss_history_l.append(self.train(epochs, out_prefix=out_prefix))
if cycle < cycle_count - 1:
optimize_branch_lengths()
# We standardize and optimize the branch lengths after each cycle, even the last one.
optimize_branch_lengths()
self.mark_branch_lengths_optimized(cycle + 1)

return pd.concat(loss_history_l, ignore_index=True)
Expand Down Expand Up @@ -932,7 +932,7 @@ def _find_optimal_branch_length(
**optimization_kwargs,
):
if torch.sum(mutation_indicator) == 0:
return 0.0
return 0.0, False

rates, _ = self.model(
encoded_parent.unsqueeze(0),
Expand Down

0 comments on commit 92de2bf

Please sign in to comment.