Skip to content

Commit 90b341b

Browse files
speedstorm1copybara-github
authored andcommitted
chore: add presubmit coverage check.
PiperOrigin-RevId: 788929755
1 parent f1852e6 commit 90b341b

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

google/genai/errors.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,45 @@ class FunctionInvocationError(ValueError):
186186
pass
187187

188188

189+
class InvalidTuningJobError(ValueError):
190+
"""Raised when the tuning job is invalid."""
191+
192+
pass
193+
194+
195+
class InvalidTuningJobNameError(ValueError):
196+
"""Raised when the tuning job name is invalid."""
197+
198+
pass
199+
200+
201+
class InvalidTuningJobStateError(ValueError):
202+
"""Raised when the tuning job is in an invalid state."""
203+
204+
pass
205+
206+
207+
class InvalidTuningJobExperimentError(ValueError):
208+
"""Raised when the tuning job is not associated with an experiment."""
209+
210+
pass
211+
212+
213+
class InvalidTuningJobExperimentNameError(ValueError):
214+
"""Raised when the tuning job experiment name is invalid."""
215+
216+
pass
217+
218+
219+
class InvalidTuningJobExperimentProjectError(ValueError):
220+
"""Raised when the tuning job experiment project is invalid."""
221+
222+
pass
223+
224+
225+
class InvalidTuningJobExperimentLocationError(ValueError):
226+
"""Raised when the tuning job experiment location is invalid."""
227+
228+
pass
229+
189230
ExperimentalWarning = _common.ExperimentalWarning

google/genai/tunings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,10 @@ def get(
10381038
experiment=job.experiment,
10391039
project=self._api_client.project,
10401040
)
1041+
elif job.experiment and self._api_client.vertexai and name is None:
1042+
_IpythonUtils.display_model_tuning_button(tuning_job_resource=job.name)
1043+
elif job.experiment and self._api_client.vertexai and job is None:
1044+
_IpythonUtils.display_model_tuning_button(tuning_job_resource=name)
10411045
return job
10421046

10431047
@_common.experimental_warning(

0 commit comments

Comments
 (0)