Skip to content

Commit

Permalink
feat: Added the Experiment.dashboard_url property
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 621957438
  • Loading branch information
Ark-kun authored and copybara-github committed Apr 4, 2024
1 parent c56edbd commit c8eec21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions google/cloud/aiplatform/metadata/experiment_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,12 @@ def _log_experiment_loggable(self, experiment_loggable: "_ExperimentLoggable"):
context = experiment_loggable._get_context()
self._metadata_context.add_context_children([context])

@property
def dashboard_url(self) -> Optional[str]:
"""Cloud console URL for this resource."""
url = f"https://console.cloud.google.com/vertex-ai/experiments/locations/{self._metadata_context.location}/experiments/{self._metadata_context.name}?project={self._metadata_context.project}"
return url


class _SetLoggerLevel:
"""Helper method to suppress logging."""
Expand Down

0 comments on commit c8eec21

Please sign in to comment.