-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP] Add finetuning samples #36723
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
base: main
Are you sure you want to change the base?
[WIP] Add finetuning samples #36723
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 PR adds finetuning samples for the @azure/ai-projects SDK, introducing sample data files for various finetuning methods (supervised fine-tuning, reward fine-tuning, and direct preference optimization) and a TypeScript sample demonstrating their use.
Key changes:
- Added TypeScript sample for finetuning operations
- Added JSONL training/validation datasets for SFT, RFT, and DPO methods
- Includes training data for multiple finetuning approaches
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
sample_finetuning_supervised_job.ts |
TypeScript sample demonstrating finetuning workflow (currently shows file operations only) |
sft_training_set.jsonl |
Supervised fine-tuning training dataset with 10 examples |
sft_validation_set.jsonl |
Supervised fine-tuning validation dataset with 10 examples |
rft_training_set.jsonl |
Reward fine-tuning training dataset with 100 arithmetic problem examples |
rft_validation_set.jsonl |
Reward fine-tuning validation dataset with 50 arithmetic problem examples |
dpo_training_set.jsonl |
Direct preference optimization training dataset with 20 examples |
dpo_validation_set.jsonl |
Direct preference optimization validation dataset with 2 examples |
sdk/ai/ai-projects/samples-dev/finetuning/sample_finetuning_supervised_job.ts
Outdated
Show resolved
Hide resolved
|
|
||
| const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>"; | ||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
| const filePath = path.join(__dirname, "data", "training_set.jsonl"); |
Copilot
AI
Nov 24, 2025
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.
The variable filePath references "data", "training_set.jsonl" but the actual data file in this PR is named sft_training_set.jsonl (for supervised fine-tuning). The path should be corrected to path.join(__dirname, "data", "sft_training_set.jsonl") to match the actual file structure.
| const filePath = path.join(__dirname, "data", "training_set.jsonl"); | |
| const filePath = path.join(__dirname, "data", "sft_training_set.jsonl"); |
Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists