Skip to content

Commit

Permalink
feat: LLM - Made the tuning location parameters truly optional
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 631312780
  • Loading branch information
Ark-kun authored and Copybara-Service committed May 7, 2024
1 parent 88188d2 commit bae8429
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vertexai/language_models/_language_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ def tune_model(
ValueError: If the "tuned_model_location" value is not supported
RuntimeError: If the model does not support tuning
"""
if tuning_job_location is None:
tuning_job_location = aiplatform_initializer.global_config.location
if tuned_model_location is None:
tuned_model_location = aiplatform_initializer.global_config.location

tuning_parameters = {}
if batch_size is not None:
tuning_parameters["batch_size"] = batch_size
Expand Down Expand Up @@ -623,7 +628,6 @@ def _tune_model_rlhf(
Args:
tuning_parameters: Tuning pipeline parameter values.
tuning_job_location: GCP location where the tuning job should be run.
Returns:
A `LanguageModelTuningJob` object that represents the tuning job.
Expand Down

0 comments on commit bae8429

Please sign in to comment.