Skip to content

Conversation

@jayesh-tanna
Copy link
Member

@jayesh-tanna jayesh-tanna commented Nov 15, 2025

…arity

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link
Contributor

Copilot AI left a 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 refactors the fine-tuning sample code by extracting inline operations into separate, reusable methods for better modularity. The main function is streamlined by commenting out most operation calls, allowing users to selectively test specific functionalities.

  • Extracted 7 fine-tuning operations into dedicated methods (pause, resume, deploy_and_inference, list_jobs, list_events, list_checkpoints, cancel, retrieve)
  • Simplified the main function by replacing inline code with commented calls to the extracted methods
  • Applied the same refactoring pattern consistently to both synchronous and asynchronous versions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
sample_finetuning_supervised_job_async.py Extracted async fine-tuning operations into separate methods and simplified main() with commented method calls
sample_finetuning_supervised_job.py Extracted sync fine-tuning operations into separate methods and simplified main() with commented method calls

print(resumed_job)


async def deploy_and_inference(openai_client, credential, job_id):
Copy link
Member

@kingernupur kingernupur Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayesh-tanna Can we separate deployment and inference in different methods also in both the files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants