Skip to content

Conversation

@mooskagh
Copy link
Member

No description provided.

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 extends the rescorer to support V7 training data format by introducing the V7TrainingData struct and templatizing the rescoring functions to work with both V6 and V7 data formats.

  • Introduced V7TrainingData struct extending V6TrainingData with additional fields (d_st, opp_played_idx, next_played_idx, reserved[8])
  • Converted rescoring functions to templates to support both V6 and V7 data formats
  • Repurposed V6TrainingData's reserved field as q_st (Q standard deviation)

Reviewed changes

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

Show a summary per file
File Description
src/trainingdata/trainingdata_v7.h New header defining V7TrainingData struct with extended fields for improved training data representation
src/trainingdata/trainingdata_v6.h Repurposed reserved field as q_st for Q standard deviation tracking
src/trainingdata/trainingdata.cc Updated initialization to use q_st instead of reserved field
src/trainingdata/rescorer.h Templatized RescoreTrainingData function with explicit instantiations for V6 and V7
src/trainingdata/rescorer.cc Converted internal rescoring functions to templates supporting both V6 and V7 data types
src/trainingdata/reader.h Added PlanesFromTrainingData overload for V7TrainingData
src/trainingdata/reader.cc Implemented V7 overload and updated q_st field initialization in reader

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1132 to 1136
template <typename FrameType>
void WriteOutputs(const FileData<FrameType>& data, const std::string& file,
const std::string& outputDir) {
// Write processed training data
if (!outputDir.empty()) {
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

The WriteOutputs function calls writer.WriteChunk(chunk) with FrameType objects, but TrainingDataWriter::WriteChunk only accepts const V6TrainingData&. When FrameType is V7TrainingData, this will cause implicit slicing, losing V7-specific fields (d_st, opp_played_idx, next_played_idx, reserved). Consider adding a V7TrainingData overload to TrainingDataWriter or using a constrained template to prevent misuse.

Copilot uses AI. Check for mistakes.
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.

1 participant