-
Notifications
You must be signed in to change notification settings - Fork 267
RFT grader fixes #6629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFT grader fixes #6629
Conversation
There was a problem hiding this 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
FineTuningJobDetailmodel asjson.RawMessageto store grader configurations - Implemented conversion utilities (
ExtractGraderFromOpenAIandConvertGraderMapToSDKParam) 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.
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:
ExtractGraderFromOpenAIandConvertGraderMapToSDKParamutility 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:
gradersection for reinforcement method jobs, with proper YAML formatting and indentation.Job submission with graders:
Metadata and versioning:
0.0.14-previewand documented the new grader capabilities in the changelog and metadata files. [1] [2] [3]Dependency:
github.com/braydonk/yamlpackage import to support YAML marshalling for grader details.