-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update fine-tuning test recordings with ID sanitizers #44334
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
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 enables test recording for fine-tuning tests by adding support for HTTP call recording/playback, migrating environment variable access to the test framework's kwargs pattern, and adding sanitizers for sensitive data. The changes allow these tests to be recorded and replayed without requiring live Azure resources.
Key Changes
- Added
RecordedTransportparameters to recording decorators to capture both Azure Core and HTTPX transport calls - Migrated from direct
os.getenv()calls to kwargs-based parameter access via theservicePreparerfixture - Added sanitizers for fine-tuning job IDs, file IDs, checkpoint IDs, and CSV content-type headers in test recordings
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| sdk/ai/azure-ai-projects/tests/test_base.py | Added new test parameter definitions for fine-tuning job IDs, subscription ID, and resource group to support recorded test playback |
| sdk/ai/azure-ai-projects/tests/finetuning/test_finetuning_async.py | Updated async tests to support recording with RecordedTransport parameters (inconsistently applied), migrated from environment variables to kwargs, corrected print statement prefixes, and updated status assertions for pause/resume operations |
| sdk/ai/azure-ai-projects/tests/finetuning/test_finetuning.py | Updated sync tests with similar recording support (missing RecordedTransport on one test), migrated to kwargs pattern, corrected print statements, and updated status assertions |
| sdk/ai/azure-ai-projects/tests/conftest.py | Added regex sanitizers for fine-tuning job IDs, file IDs, checkpoint IDs, and normalized CSV content-type headers for consistent test recordings across platforms |
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines