-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: LLM - Made tuning asynchronous when tuning becomes GA
Previously, `tune_model` waited for the tuning is complete, then modified the model in-place. This behavior will change in the future GA (non-preview) classes: In the future, `tune_model` will become asynchronous: It will start tuning job and return a job object immediately without waiting. This will allow the user to do other work while the model is being tuned. This will also allow the user to perform multiple tuning jobs in parallel. Future breaking change: The model will no longer be updated in-place, so the user will need to get the tuned model from the job object. To make the transition easier and avoid breaking changes, the `.tune_model(...)` method will start returning the job object even in preview classes (although it will still wait for the job completion and update the model in-place too). This makes it possible to start writing future-proof code immediately. Usage: ``` tuning_job = model.tune_model(...) # Returns tuning job. In preview: Waits for the tuning job to finish tuned_model = tuning_job.get_tuned_model() # Returns tuned model after waiting for the tuning job to finish. ``` PiperOrigin-RevId: 558554561
- Loading branch information
1 parent
e6d1e95
commit 226ab8b
Showing
3 changed files
with
200 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters