-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add Openai FT samples #53697
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
Add Openai FT samples #53697
Conversation
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
nick863
left a comment
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.
Please provide the implementation for GetFineTuningClients method.
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
…re/azure-sdk-for-net into shrivastavp/ft_samples
…re/azure-sdk-for-net into shrivastavp/ft_samples
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsAsync.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsAsync.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsAsync.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsAsync.cs
Outdated
Show resolved
Hide resolved
…re/azure-sdk-for-net into shrivastavp/ft_samples
sdk/ai/Azure.AI.Projects/samples/Sample16_FineTuning_Supervised.md
Outdated
Show resolved
Hide resolved
| FileUploadPurpose.FineTune); | ||
| Console.WriteLine($"Uploaded validation file with ID: {validationFile.Id}"); | ||
|
|
||
| // Note: In production, you should wait for files to complete processing before creating a fine-tuning job. |
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.
We need to move this note to the markdown file and provide the snippet of WaitForFileProcessingAsync .
```C# Snippet:AI_Projects_FineTuning_WaitForFileProcessingHelper
```
Does this code work like shown above if we will just run it? Will the file be in the FileStatus.Processed state?
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample17_FineTuning_DPO.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample19_FineTuning_OSS.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample18_FineTuning_Reinforcement.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample18_FineTuning_Reinforcement.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample16_FineTuning_Supervised.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample16_FineTuning_Supervised.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample15_Files.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample15_Files.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample15_Files.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/Samples/FineTuning/Sample15_Files.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
sdk/ai/Azure.AI.Projects/tests/FineTuning/FineTuningTestsBase.cs
Outdated
Show resolved
Hide resolved
|
|
||
| ## Wait for File Processing | ||
|
|
||
| In production, you should wait for files to complete processing before creating a fine-tuning job. See the helper methods in `Sample16_FineTuning_Supervised.md` for `WaitForFileProcessingAsync` and `WaitForFileProcessing` implementations. |
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.
Let us add the WaitForFileProcessing for all sample to make sure that the sample is always passing.
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 equivalent .cs files do include the WaitForFileProcessing helper and always pass. The .md files are meant to document and I think this should convey the idea. Let's keep it this way, unless you think otherwise
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.
We need to demonstrate the right practice for customer. The problem is that the code above may fail without ensuring that UploadFile has actually uploaded the file. We still have the section about File Processing, saying the WaitForFileProcessing needs to present in the production code. Lat us add WaitForFileProcessing in each sample to make sure that customer understands, what should be done. Our goal is that customer can copy our sample code and use it in production.
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
Co-authored-by: Nikolay Rovinskiy <[email protected]>
…re/azure-sdk-for-net into shrivastavp/ft_samples
…hrivastav18/azure-sdk-for-net into shrivastavp/ft_samples
|
|
||
| ## Wait for File Processing | ||
|
|
||
| In production, you should wait for files to complete processing before creating a fine-tuning job. See the helper methods in `Sample16_FineTuning_Supervised.md` for `WaitForFileProcessingAsync` and `WaitForFileProcessing` implementations. |
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.
We need to demonstrate the right practice for customer. The problem is that the code above may fail without ensuring that UploadFile has actually uploaded the file. We still have the section about File Processing, saying the WaitForFileProcessing needs to present in the production code. Lat us add WaitForFileProcessing in each sample to make sure that customer understands, what should be done. Our goal is that customer can copy our sample code and use it in production.
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.