|
31 | 31 | from google.cloud.aiplatform.metadata import execution
|
32 | 32 | from google.cloud.aiplatform.metadata import experiment_resources
|
33 | 33 | from google.cloud.aiplatform.metadata import experiment_run_resource
|
34 |
| -from google.cloud.aiplatform.metadata.schema import base_execution |
35 | 34 | from google.cloud.aiplatform.tensorboard import tensorboard_resource
|
36 | 35 |
|
37 | 36 | _LOGGER = base.Logger(__name__)
|
@@ -513,12 +512,10 @@ def start_execution(
|
513 | 512 | metadata: Optional[Dict[str, Any]] = None,
|
514 | 513 | schema_version: Optional[str] = None,
|
515 | 514 | description: Optional[str] = None,
|
516 |
| - metadata_store_id: Optional[str] = "default", |
517 | 515 | resume: bool = False,
|
518 | 516 | project: Optional[str] = None,
|
519 | 517 | location: Optional[str] = None,
|
520 | 518 | credentials: Optional[auth_credentials.Credentials] = None,
|
521 |
| - base_execution_schema: Optional["base_execution.BaseExecutionSchema"] = None, |
522 | 519 | ) -> execution.Execution:
|
523 | 520 | """
|
524 | 521 | Create and starts a new Metadata Execution or resumes a previously created Execution.
|
@@ -568,9 +565,6 @@ def start_execution(
|
568 | 565 | credentials (auth_credentials.Credentials):
|
569 | 566 | Optional. Custom credentials used to create this Execution. Overrides
|
570 | 567 | credentials set in aiplatform.init.
|
571 |
| - base_execution_schema (BaseExecutionSchema): |
572 |
| - Optional. An instance of the BaseExecutionSchema class that can be provided instead of providing schema specific parameters. It overrides |
573 |
| - the values provided for schema_title, resource_id, state, display_name, schema_version, description, and metadata. |
574 | 568 |
|
575 | 569 | Returns:
|
576 | 570 | Execution: Instantiated representation of the managed Metadata Execution.
|
@@ -611,32 +605,22 @@ def start_execution(
|
611 | 605 |
|
612 | 606 | run_execution.update(state=gca_execution.Execution.State.RUNNING)
|
613 | 607 | else:
|
614 |
| - if base_execution_schema: |
615 |
| - run_execution = execution.Execution.create_from_base_execution_schema( |
616 |
| - base_execution_schema=base_execution_schema, |
617 |
| - metadata_store_id=metadata_store_id, |
618 |
| - project=project, |
619 |
| - location=location, |
620 |
| - credentials=credentials, |
| 608 | + if not schema_title: |
| 609 | + raise ValueError( |
| 610 | + "schema_title must be provided when starting a new Execution" |
621 | 611 | )
|
622 |
| - else: |
623 |
| - if not schema_title: |
624 |
| - raise ValueError( |
625 |
| - "schema_title or base_execution_schema must be provided when starting a new Execution" |
626 |
| - ) |
627 | 612 |
|
628 |
| - run_execution = execution.Execution.create( |
629 |
| - display_name=display_name, |
630 |
| - schema_title=schema_title, |
631 |
| - schema_version=schema_version, |
632 |
| - metadata=metadata, |
633 |
| - description=description, |
634 |
| - metadata_store_id=metadata_store_id, |
635 |
| - resource_id=resource_id, |
636 |
| - project=project, |
637 |
| - location=location, |
638 |
| - credentials=credentials, |
639 |
| - ) |
| 613 | + run_execution = execution.Execution.create( |
| 614 | + display_name=display_name, |
| 615 | + schema_title=schema_title, |
| 616 | + schema_version=schema_version, |
| 617 | + metadata=metadata, |
| 618 | + description=description, |
| 619 | + resource_id=resource_id, |
| 620 | + project=project, |
| 621 | + location=location, |
| 622 | + credentials=credentials, |
| 623 | + ) |
640 | 624 |
|
641 | 625 | if self.experiment_run:
|
642 | 626 | if self.experiment_run._is_legacy_experiment_run():
|
|
0 commit comments