Skip to content

Commit 5367fbb

Browse files
Ark-kuncopybara-github
authored andcommitted
fix: GenAI - Fixed the TuningJob dashboard URL
PiperOrigin-RevId: 622345226
1 parent bf33fb3 commit 5367fbb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

vertexai/tuning/_tuning.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,11 @@ def list(cls, filter: Optional[str] = None) -> List["TuningJob"]:
236236
"""
237237
return cls._list(filter=filter)
238238

239-
_dashboard_url = jobs._Job._dashboard_uri
239+
def _dashboard_url(self) -> str:
240+
"""Returns the Google Cloud console URL where job can be viewed."""
241+
fields = self._parse_resource_name(self.resource_name)
242+
location = fields.pop("location")
243+
project = fields.pop("project")
244+
job = list(fields.values())[0]
245+
url = f"https://console.cloud.google.com/vertex-ai/generative/language/locations/{location}/tuning/tuningJob/{job}?project={project}"
246+
return url

0 commit comments

Comments
 (0)