Skip to content

Conversation

@mooskagh
Copy link
Member

@mooskagh mooskagh commented Oct 5, 2025

No description provided.

@mooskagh mooskagh marked this pull request as ready for review October 5, 2025 18:38
@mooskagh mooskagh requested a review from Copilot October 5, 2025 18:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements handling for negative orig_m values in training data by clamping them to 0.0f instead of failing validation. The change removes a strict validation assertion and adds a normalization function that warns about and corrects negative values.

  • Removes strict validation that rejected negative orig_m values
  • Adds NormalizeOriginalMetrics function to clamp negative orig_m values to 0.0f with warnings
  • Integrates the normalization step into the file processing pipeline

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/trainingdata/rescorer.cc Removes validation assertion and adds normalization function for orig_m values
libs/lczero-common Updates subproject commit reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 512 to 513
std::cerr << "Warning: negative orig_m (" << chunk.orig_m
<< ") encountered; clamping to 0" << std::endl;
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

Using std::cerr for warnings may not be appropriate for production code. Consider using a proper logging framework or configuration-controlled warning system instead of direct stderr output.

Copilot uses AI. Check for mistakes.
@Tilps
Copy link
Contributor

Tilps commented Oct 5, 2025

I think this is the wrong approach, we should just drop weird data. If we want to fix something it should be on the generating side.

@borg323
Copy link
Member

borg323 commented Oct 5, 2025

The backend bug (mish instead of relu as final activation) is fixed, but is the orig_m value this critical?

@Tilps
Copy link
Contributor

Tilps commented Oct 6, 2025

its not critical at the current time, but we have copious amounts of data which passes all these checks, so it seems unnecessary to try and allow this small amount of extra data through at rescorer time - and increase the chance that we miss such a bug again in future.

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.

3 participants