Skip to content

Conversation

@achauhan-scc
Copy link
Member

This pull request enhances the support for graders in reinforcement fine-tuning jobs within the Azure AI Fine Tuning extension. The main improvements include adding grader details to the job cloning process, allowing submission of jobs with various graders, and introducing robust conversion utilities for grader data between internal models, YAML, and the OpenAI SDK. These changes improve the flexibility and fidelity of fine-tuning job configuration and export.

Grader handling and conversion improvements:

  • Added extraction of grader details from OpenAI SDK responses and included them in the internal job model, enabling grader information to be preserved when cloning or exporting jobs. [1] [2] [3] [4]
  • Implemented ExtractGraderFromOpenAI and ConvertGraderMapToSDKParam utility functions to reliably convert grader data between OpenAI SDK types and internal/YAML representations. This supports multiple grader types (e.g., python, string_check, text_similarity, score_model, multi) and handles their specific fields.

Job cloning and YAML export:

  • Enhanced the YAML export logic to include grader details under the grader section for reinforcement method jobs, with proper YAML formatting and indentation.

Job submission with graders:

  • Updated the job creation logic to accept grader definitions from YAML and convert them into the appropriate OpenAI SDK parameter types, allowing submission of jobs with different graders in reinforcement fine-tuning.

Metadata and versioning:

  • Updated the extension version to 0.0.14-preview and documented the new grader capabilities in the changelog and metadata files. [1] [2] [3]

Dependency:

  • Added the github.com/braydonk/yaml package import to support YAML marshalling for grader details.

Copy link
Contributor

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 pull request enhances the Azure AI Fine Tuning extension to support graders in reinforcement fine-tuning (RFT) jobs. The changes enable users to clone jobs with grader configurations preserved and submit new jobs with different grader types. The implementation adds grader extraction from OpenAI SDK responses, conversion utilities between different data formats, and YAML export functionality for grader configurations.

Changes:

  • Added grader field to FineTuningJobDetail model as json.RawMessage to store grader configurations
  • Implemented conversion utilities (ExtractGraderFromOpenAI and ConvertGraderMapToSDKParam) to transform grader data between OpenAI SDK types and internal representations
  • Enhanced job cloning to include grader details in generated YAML configurations with proper indentation
  • Version bumped to 0.0.14-preview with updated CHANGELOG

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
version.txt Version bumped from 0.0.13-preview to 0.0.14-preview
extension.yaml Updated version metadata to 0.0.14-preview
CHANGELOG.md Added release notes for grader support features
pkg/models/finetune.go Added Grader field as json.RawMessage to FineTuningJobDetail struct
internal/providers/openai/conversions.go Implemented grader extraction and conversion utilities, integrated into job conversion logic, added helper functions for type-safe conversions
internal/cmd/init.go Added yaml package import and grader YAML generation logic for job cloning

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

@achauhan-scc achauhan-scc enabled auto-merge (squash) January 28, 2026 13:07
@achauhan-scc achauhan-scc merged commit 0bb5928 into Azure:main Jan 28, 2026
25 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