Skip to content

fixed reg loss not being normalized by batch_split#61

Merged
mkofler96 merged 1 commit into
mainfrom
fix-reg-loss
May 20, 2026
Merged

fixed reg loss not being normalized by batch_split#61
mkofler96 merged 1 commit into
mainfrom
fix-reg-loss

Conversation

@mkofler96

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 20, 2026 07:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts latent-code regularization scaling so it remains consistent when training batches are split into multiple chunks (batch_split).

Changes:

  • Updates reg_loss normalization to use samples-per-split (num_sdf_samples / batch_split) instead of the full num_sdf_samples.
  • Reformats the reg_loss expression to span multiple lines for readability.

Comment on lines +603 to +605
reg_loss = (code_reg_lambda * min(1, epoch / 100) * l2_size_loss) / (
num_sdf_samples / batch_split
)
@deepsource-io

deepsource-io Bot commented May 20, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 8ed7a91...d5bfe00 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Python May 20, 2026 7:01a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@mkofler96 mkofler96 merged commit 7aeb9c2 into main May 20, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants