Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions google/genai/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,45 @@ class FunctionInvocationError(ValueError):
pass


class InvalidTuningJobError(ValueError):
"""Raised when the tuning job is invalid."""

pass


class InvalidTuningJobNameError(ValueError):
"""Raised when the tuning job name is invalid."""

pass


class InvalidTuningJobStateError(ValueError):
"""Raised when the tuning job is in an invalid state."""

pass


class InvalidTuningJobExperimentError(ValueError):
"""Raised when the tuning job is not associated with an experiment."""

pass


class InvalidTuningJobExperimentNameError(ValueError):
"""Raised when the tuning job experiment name is invalid."""

pass


class InvalidTuningJobExperimentProjectError(ValueError):
"""Raised when the tuning job experiment project is invalid."""

pass


class InvalidTuningJobExperimentLocationError(ValueError):
"""Raised when the tuning job experiment location is invalid."""

pass

ExperimentalWarning = _common.ExperimentalWarning
4 changes: 4 additions & 0 deletions google/genai/tunings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,10 @@ def get(
experiment=job.experiment,
project=self._api_client.project,
)
elif job.experiment and self._api_client.vertexai and name is None:
_IpythonUtils.display_model_tuning_button(tuning_job_resource=job.name)
elif job.experiment and self._api_client.vertexai and job is None:
_IpythonUtils.display_model_tuning_button(tuning_job_resource=name)
return job

@_common.experimental_warning(
Expand Down