Skip to content

Commit

Permalink
docs: Include imports in experiment_tracking samples directly in clou…
Browse files Browse the repository at this point in the history
…d.google.com snippets.

PiperOrigin-RevId: 641995241
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Jun 10, 2024
1 parent 641faec commit 3ffb6cb
Show file tree
Hide file tree
Showing 53 changed files with 53 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_assign_artifact_as_execution_input_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_assign_artifact_as_execution_input_sample]
def assign_artifact_as_execution_input_sample(
execution: aiplatform.Execution,
artifact: aiplatform.Artifact,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_assign_artifact_as_execution_output_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_assign_artifact_as_execution_output_sample]
def assign_artifact_as_execution_output_sample(
execution: aiplatform.Execution,
artifact: aiplatform.Artifact,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_autologging_with_auto_run_creation_sample]
from typing import Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_autologging_with_auto_run_creation_sample]
def autologging_with_auto_run_creation_sample(
experiment_name: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_autologging_with_manual_run_creation_sample]
from typing import Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_autologging_with_manual_run_creation_sample]
def autologging_with_manual_run_creation_sample(
experiment_name: str,
run_name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_artifact_sample]
from typing import Dict, Optional

from google.cloud import aiplatform


# [START aiplatform_sdk_create_artifact_sample]
def create_artifact_sample(
schema_title: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_artifact_with_sdk_sample]
from typing import Dict, Optional

from google.cloud.aiplatform.metadata.schema.system import artifact_schema


# [START aiplatform_sdk_create_artifact_with_sdk_sample]
def create_artifact_sample(
project: str,
location: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_context_with_sdk_sample]
from typing import Any, Dict, Optional

from google.cloud import aiplatform
from google.cloud.aiplatform.metadata.schema.system import context_schema


# [START aiplatform_sdk_create_context_with_sdk_sample]
def create_context_sample(
display_name: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_execution_with_sdk_sample]
from typing import Any, Dict, List, Optional

from google.cloud import aiplatform
from google.cloud.aiplatform.metadata.schema.system import execution_schema


# [START aiplatform_sdk_create_execution_with_sdk_sample]
def create_execution_sample(
display_name: str,
input_artifacts: List[aiplatform.Artifact],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_experiment_default_tensorboard_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_create_experiment_default_tensorboard_sample]
def create_experiment_default_tensorboard_sample(
experiment_name: str,
experiment_description: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_experiment_run_sample]
from typing import Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_create_experiment_run_sample]
def create_experiment_run_sample(
experiment_name: str,
run_name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_experiment_sample]
from typing import Optional, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_create_experiment_sample]
def create_experiment_sample(
experiment_name: str,
experiment_description: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_create_experiment_without_default_tensorboard_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_create_experiment_without_default_tensorboard_sample]
def create_experiment_without_default_tensorboard_sample(
experiment_name: str,
experiment_description: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_delete_artifact_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_delete_artifact_sample]
def delete_artifact_sample(
artifact_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_delete_context_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_delete_context_sample]
def delete_context_sample(
context_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_delete_execution_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_delete_execution_sample]
def delete_execution_sample(
execution_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_delete_experiment_run_sample]
from typing import Union

from google.cloud import aiplatform


# [START aiplatform_sdk_delete_experiment_run_sample]
def delete_experiment_run_sample(
run_name: str,
experiment: Union[str, aiplatform.Experiment],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# [START aiplatform_sdk_delete_experiment_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_delete_experiment_sample]
def delete_experiment_sample(
experiment_name: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# [START aiplatform_sdk_end_experiment_run_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_end_experiment_run_sample]
def end_experiment_run_sample(
experiment_name: str,
run_name: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_artifact_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_artifact_sample]
def get_artifact_sample(
artifact_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_artifact_with_uri_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_artifact_with_uri_sample]
def get_artifact_with_uri_sample(
uri: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_context_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_context_sample]
def get_context_sample(
context_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_execution_input_artifacts_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_execution_input_artifacts_sample]
def get_execution_input_artifacts_sample(
execution: aiplatform.Execution
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_execution_output_artifacts_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_execution_output_artifacts_sample]
def get_execution_output_artifacts_sample(
execution: aiplatform.Execution
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_execution_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_execution_sample]
def get_execution_sample(
execution_id: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# [START aiplatform_sdk_get_experiments_data_frame_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_experiments_data_frame_sample]
def get_experiments_data_frame_sample(
experiment: str,
project: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_experiment_model_sample]
from google.cloud import aiplatform


# [START aiplatform_sdk_get_experiment_model_sample]
def get_experiment_model_sample(
project: str,
location: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_experiment_run_artifacts_sample]
from typing import List, Union

from google.cloud import aiplatform
from google.cloud.aiplatform.metadata import artifact


# [START aiplatform_sdk_get_experiment_run_artifacts_sample]
def get_experiment_run_artifacts_sample(
run_name: str,
experiment: Union[str, aiplatform.Experiment],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_experiment_run_classification_metrics_sample]
from typing import Dict, List, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_get_experiment_run_classification_metrics_sample]
def get_experiment_run_classification_metrics_sample(
run_name: str,
experiment: Union[str, aiplatform.Experiment],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_experiment_run_metrics_sample]
from typing import Dict, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_get_experiment_run_metrics_sample]
def get_experiment_run_metrics_sample(
run_name: str,
experiment: Union[str, aiplatform.Experiment],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START aiplatform_sdk_get_experiment_run_models_sample]
from typing import List, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_get_experiment_run_models_sample]
def get_experiment_run_models_sample(
run_name: str,
experiment: Union[str, aiplatform.Experiment],
Expand Down
Loading

0 comments on commit 3ffb6cb

Please sign in to comment.