-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add finetuning samples and tests #36888
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?
Conversation
### 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 - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
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 comprehensive finetuning samples and tests for the Azure AI Projects SDK, demonstrating three fine-tuning methods: Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and Reinforcement Fine-Tuning (RFT). The changes include test files, sample code for both TypeScript and JavaScript, training/validation datasets, and updated documentation.
Key Changes:
- Added test infrastructure with helper utilities and comprehensive test suite covering all three fine-tuning methods
- Implemented sample code demonstrating job creation, deployment, and inference workflows
- Included training and validation datasets in JSONL format for all fine-tuning types
- Updated package dependencies to include Azure Cognitive Services Management Client
Reviewed changes
Copilot reviewed 39 out of 44 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/ai/ai-projects/test/public/node/finetuning/finetuningHelper.ts | Helper constants and enums for fine-tuning job types, training types, and test parameters |
| sdk/ai/ai-projects/test/public/node/finetuning/finetuning.spec.ts | Comprehensive test suite covering create, retrieve, list, cancel, pause, resume, events, checkpoints, deploy, and infer operations |
| sdk/ai/ai-projects/test/public/node/finetuning/data/*.jsonl | Training and validation datasets for SFT, DPO, and RFT methods |
| sdk/ai/ai-projects/samples/v2-beta/typescript/src/finetuning/*.ts | TypeScript samples for supervised, DPO, reinforcement, and OSS model fine-tuning |
| sdk/ai/ai-projects/samples/v2-beta/javascript/finetuning/*.js | JavaScript equivalents of TypeScript samples |
| sdk/ai/ai-projects/samples/v2-beta/*/package.json | Added @azure/arm-cognitiveservices dependency for model deployment |
| sdk/ai/ai-projects/samples/v2-beta/typescript/README.md | Updated documentation with links to new finetuning samples |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
|
JS SDK Finetuning samples and tests are complete and tested to work. |
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
Autorest/typescript repository and link it here)
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