Skip to content

Commit 3ffb6cb

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
docs: Include imports in experiment_tracking samples directly in cloud.google.com snippets.
PiperOrigin-RevId: 641995241
1 parent 641faec commit 3ffb6cb

File tree

53 files changed

+53
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+53
-58
lines changed

samples/model-builder/experiment_tracking/assign_artifact_as_execution_input_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_assign_artifact_as_execution_input_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_assign_artifact_as_execution_input_sample]
1919
def assign_artifact_as_execution_input_sample(
2020
execution: aiplatform.Execution,
2121
artifact: aiplatform.Artifact,

samples/model-builder/experiment_tracking/assign_artifact_as_execution_output_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_assign_artifact_as_execution_output_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_assign_artifact_as_execution_output_sample]
1919
def assign_artifact_as_execution_output_sample(
2020
execution: aiplatform.Execution,
2121
artifact: aiplatform.Artifact,

samples/model-builder/experiment_tracking/autologging_with_auto_run_creation_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_autologging_with_auto_run_creation_sample]
1516
from typing import Optional, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_autologging_with_auto_run_creation_sample]
2121
def autologging_with_auto_run_creation_sample(
2222
experiment_name: str,
2323
project: str,

samples/model-builder/experiment_tracking/autologging_with_manual_run_creation_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_autologging_with_manual_run_creation_sample]
1516
from typing import Optional, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_autologging_with_manual_run_creation_sample]
2121
def autologging_with_manual_run_creation_sample(
2222
experiment_name: str,
2323
run_name: str,

samples/model-builder/experiment_tracking/create_artifact_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_artifact_sample]
1516
from typing import Dict, Optional
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_create_artifact_sample]
2121
def create_artifact_sample(
2222
schema_title: str,
2323
project: str,

samples/model-builder/experiment_tracking/create_artifact_with_sdk_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_artifact_with_sdk_sample]
1516
from typing import Dict, Optional
1617

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

1920

20-
# [START aiplatform_sdk_create_artifact_with_sdk_sample]
2121
def create_artifact_sample(
2222
project: str,
2323
location: str,

samples/model-builder/experiment_tracking/create_context_with_sdk_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_context_with_sdk_sample]
1516
from typing import Any, Dict, Optional
1617

1718
from google.cloud import aiplatform
1819
from google.cloud.aiplatform.metadata.schema.system import context_schema
1920

2021

21-
# [START aiplatform_sdk_create_context_with_sdk_sample]
2222
def create_context_sample(
2323
display_name: str,
2424
project: str,

samples/model-builder/experiment_tracking/create_execution_with_sdk_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_execution_with_sdk_sample]
1516
from typing import Any, Dict, List, Optional
1617

1718
from google.cloud import aiplatform
1819
from google.cloud.aiplatform.metadata.schema.system import execution_schema
1920

2021

21-
# [START aiplatform_sdk_create_execution_with_sdk_sample]
2222
def create_execution_sample(
2323
display_name: str,
2424
input_artifacts: List[aiplatform.Artifact],

samples/model-builder/experiment_tracking/create_experiment_default_tensorboard_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_experiment_default_tensorboard_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_create_experiment_default_tensorboard_sample]
1919
def create_experiment_default_tensorboard_sample(
2020
experiment_name: str,
2121
experiment_description: str,

samples/model-builder/experiment_tracking/create_experiment_run_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_experiment_run_sample]
1516
from typing import Optional, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_create_experiment_run_sample]
2121
def create_experiment_run_sample(
2222
experiment_name: str,
2323
run_name: str,

samples/model-builder/experiment_tracking/create_experiment_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_experiment_sample]
1516
from typing import Optional, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_create_experiment_sample]
2121
def create_experiment_sample(
2222
experiment_name: str,
2323
experiment_description: str,

samples/model-builder/experiment_tracking/create_experiment_without_default_tensorboard_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_create_experiment_without_default_tensorboard_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_create_experiment_without_default_tensorboard_sample]
1919
def create_experiment_without_default_tensorboard_sample(
2020
experiment_name: str,
2121
experiment_description: str,

samples/model-builder/experiment_tracking/delete_artifact_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_delete_artifact_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_delete_artifact_sample]
1919
def delete_artifact_sample(
2020
artifact_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/delete_context_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_delete_context_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_delete_context_sample]
1919
def delete_context_sample(
2020
context_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/delete_execution_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_delete_execution_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_delete_execution_sample]
1919
def delete_execution_sample(
2020
execution_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/delete_experiment_run_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_delete_experiment_run_sample]
1516
from typing import Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_delete_experiment_run_sample]
2121
def delete_experiment_run_sample(
2222
run_name: str,
2323
experiment: Union[str, aiplatform.Experiment],

samples/model-builder/experiment_tracking/delete_experiment_sample.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START aiplatform_sdk_delete_experiment_sample]
1616
from google.cloud import aiplatform
1717

1818

19-
# [START aiplatform_sdk_delete_experiment_sample]
2019
def delete_experiment_sample(
2120
experiment_name: str,
2221
project: str,

samples/model-builder/experiment_tracking/end_experiment_run_sample.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START aiplatform_sdk_end_experiment_run_sample]
1616
from google.cloud import aiplatform
1717

1818

19-
# [START aiplatform_sdk_end_experiment_run_sample]
2019
def end_experiment_run_sample(
2120
experiment_name: str,
2221
run_name: str,

samples/model-builder/experiment_tracking/get_artifact_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_artifact_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_artifact_sample]
1919
def get_artifact_sample(
2020
artifact_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/get_artifact_with_uri_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_artifact_with_uri_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_artifact_with_uri_sample]
1919
def get_artifact_with_uri_sample(
2020
uri: str,
2121
project: str,

samples/model-builder/experiment_tracking/get_context_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_context_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_context_sample]
1919
def get_context_sample(
2020
context_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/get_execution_input_artifacts_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_execution_input_artifacts_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_execution_input_artifacts_sample]
1919
def get_execution_input_artifacts_sample(
2020
execution: aiplatform.Execution
2121
):

samples/model-builder/experiment_tracking/get_execution_output_artifacts_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_execution_output_artifacts_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_execution_output_artifacts_sample]
1919
def get_execution_output_artifacts_sample(
2020
execution: aiplatform.Execution
2121
):

samples/model-builder/experiment_tracking/get_execution_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_execution_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_execution_sample]
1919
def get_execution_sample(
2020
execution_id: str,
2121
project: str,

samples/model-builder/experiment_tracking/get_experiment_data_frame_sample.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
15+
# [START aiplatform_sdk_get_experiments_data_frame_sample]
1616
from google.cloud import aiplatform
1717

1818

19-
# [START aiplatform_sdk_get_experiments_data_frame_sample]
2019
def get_experiments_data_frame_sample(
2120
experiment: str,
2221
project: str,

samples/model-builder/experiment_tracking/get_experiment_model_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_experiment_model_sample]
1516
from google.cloud import aiplatform
1617

1718

18-
# [START aiplatform_sdk_get_experiment_model_sample]
1919
def get_experiment_model_sample(
2020
project: str,
2121
location: str,

samples/model-builder/experiment_tracking/get_experiment_run_artifacts_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_experiment_run_artifacts_sample]
1516
from typing import List, Union
1617

1718
from google.cloud import aiplatform
1819
from google.cloud.aiplatform.metadata import artifact
1920

2021

21-
# [START aiplatform_sdk_get_experiment_run_artifacts_sample]
2222
def get_experiment_run_artifacts_sample(
2323
run_name: str,
2424
experiment: Union[str, aiplatform.Experiment],

samples/model-builder/experiment_tracking/get_experiment_run_classification_metrics_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_experiment_run_classification_metrics_sample]
1516
from typing import Dict, List, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_get_experiment_run_classification_metrics_sample]
2121
def get_experiment_run_classification_metrics_sample(
2222
run_name: str,
2323
experiment: Union[str, aiplatform.Experiment],

samples/model-builder/experiment_tracking/get_experiment_run_metrics_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_experiment_run_metrics_sample]
1516
from typing import Dict, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_get_experiment_run_metrics_sample]
2121
def get_experiment_run_metrics_sample(
2222
run_name: str,
2323
experiment: Union[str, aiplatform.Experiment],

samples/model-builder/experiment_tracking/get_experiment_run_models_sample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START aiplatform_sdk_get_experiment_run_models_sample]
1516
from typing import List, Union
1617

1718
from google.cloud import aiplatform
1819

1920

20-
# [START aiplatform_sdk_get_experiment_run_models_sample]
2121
def get_experiment_run_models_sample(
2222
run_name: str,
2323
experiment: Union[str, aiplatform.Experiment],

0 commit comments

Comments
 (0)