|
| 1 | +# Copyright 2026 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +"""The agentplatform resources module.""" |
| 16 | + |
| 17 | +from google.cloud.aiplatform import initializer |
| 18 | + |
| 19 | +from google.cloud.aiplatform.datasets import ( |
| 20 | + ImageDataset, |
| 21 | + TabularDataset, |
| 22 | + TextDataset, |
| 23 | + TimeSeriesDataset, |
| 24 | + VideoDataset, |
| 25 | +) |
| 26 | +from google.cloud.aiplatform import explain |
| 27 | +from google.cloud.aiplatform import gapic |
| 28 | +from google.cloud.aiplatform import hyperparameter_tuning |
| 29 | +from google.cloud.aiplatform.featurestore import ( |
| 30 | + EntityType, |
| 31 | + Feature, |
| 32 | + Featurestore, |
| 33 | +) |
| 34 | +from google.cloud.aiplatform.matching_engine import ( |
| 35 | + MatchingEngineIndex, |
| 36 | + MatchingEngineIndexEndpoint, |
| 37 | +) |
| 38 | +from google.cloud.aiplatform import metadata |
| 39 | +from google.cloud.aiplatform.tensorboard import uploader_tracker |
| 40 | +from google.cloud.aiplatform.models import DeploymentResourcePool |
| 41 | +from google.cloud.aiplatform.models import Endpoint |
| 42 | +from google.cloud.aiplatform.models import PrivateEndpoint |
| 43 | +from google.cloud.aiplatform.models import Model |
| 44 | +from google.cloud.aiplatform.models import ModelRegistry |
| 45 | +from google.cloud.aiplatform.model_evaluation import ModelEvaluation |
| 46 | +from google.cloud.aiplatform.jobs import ( |
| 47 | + BatchPredictionJob, |
| 48 | + CustomJob, |
| 49 | + HyperparameterTuningJob, |
| 50 | + ModelDeploymentMonitoringJob, |
| 51 | +) |
| 52 | +from google.cloud.aiplatform.pipeline_jobs import PipelineJob |
| 53 | +from google.cloud.aiplatform.pipeline_job_schedules import ( |
| 54 | + PipelineJobSchedule, |
| 55 | +) |
| 56 | +from google.cloud.aiplatform.tensorboard import ( |
| 57 | + Tensorboard, |
| 58 | + TensorboardExperiment, |
| 59 | + TensorboardRun, |
| 60 | + TensorboardTimeSeries, |
| 61 | +) |
| 62 | +from google.cloud.aiplatform.training_jobs import ( |
| 63 | + CustomTrainingJob, |
| 64 | + CustomContainerTrainingJob, |
| 65 | + CustomPythonPackageTrainingJob, |
| 66 | + AutoMLTabularTrainingJob, |
| 67 | + AutoMLForecastingTrainingJob, |
| 68 | + SequenceToSequencePlusForecastingTrainingJob, |
| 69 | + TemporalFusionTransformerForecastingTrainingJob, |
| 70 | + TimeSeriesDenseEncoderForecastingTrainingJob, |
| 71 | + AutoMLImageTrainingJob, |
| 72 | + AutoMLTextTrainingJob, |
| 73 | + AutoMLVideoTrainingJob, |
| 74 | +) |
| 75 | + |
| 76 | +from google.cloud.aiplatform import helpers |
| 77 | + |
| 78 | +""" |
| 79 | +Usage: |
| 80 | +import agentplatform |
| 81 | +
|
| 82 | +agentplatform.init(project='my_project') |
| 83 | +""" |
| 84 | +init = initializer.global_config.init |
| 85 | + |
| 86 | +get_pipeline_df = metadata.metadata._LegacyExperimentService.get_pipeline_df |
| 87 | + |
| 88 | +log_params = metadata.metadata._experiment_tracker.log_params |
| 89 | +log_metrics = metadata.metadata._experiment_tracker.log_metrics |
| 90 | +log_classification_metrics = ( |
| 91 | + metadata.metadata._experiment_tracker.log_classification_metrics |
| 92 | +) |
| 93 | +log_model = metadata.metadata._experiment_tracker.log_model |
| 94 | +get_experiment_df = metadata.metadata._experiment_tracker.get_experiment_df |
| 95 | +start_run = metadata.metadata._experiment_tracker.start_run |
| 96 | +autolog = metadata.metadata._experiment_tracker.autolog |
| 97 | +start_execution = metadata.metadata._experiment_tracker.start_execution |
| 98 | +log = metadata.metadata._experiment_tracker.log |
| 99 | +log_time_series_metrics = metadata.metadata._experiment_tracker.log_time_series_metrics |
| 100 | +end_run = metadata.metadata._experiment_tracker.end_run |
| 101 | + |
| 102 | +upload_tb_log = uploader_tracker._tensorboard_tracker.upload_tb_log |
| 103 | +start_upload_tb_log = uploader_tracker._tensorboard_tracker.start_upload_tb_log |
| 104 | +end_upload_tb_log = uploader_tracker._tensorboard_tracker.end_upload_tb_log |
| 105 | + |
| 106 | +save_model = metadata._models.save_model |
| 107 | +get_experiment_model = metadata.schema.google.artifact_schema.ExperimentModel.get |
| 108 | + |
| 109 | +Experiment = metadata.experiment_resources.Experiment |
| 110 | +ExperimentRun = metadata.experiment_run_resource.ExperimentRun |
| 111 | +Artifact = metadata.artifact.Artifact |
| 112 | +Execution = metadata.execution.Execution |
| 113 | +Context = metadata.context.Context |
| 114 | + |
| 115 | + |
| 116 | +__all__ = ( |
| 117 | + "end_run", |
| 118 | + "explain", |
| 119 | + "gapic", |
| 120 | + "init", |
| 121 | + "helpers", |
| 122 | + "hyperparameter_tuning", |
| 123 | + "log", |
| 124 | + "log_params", |
| 125 | + "log_metrics", |
| 126 | + "log_classification_metrics", |
| 127 | + "log_model", |
| 128 | + "log_time_series_metrics", |
| 129 | + "get_experiment_df", |
| 130 | + "get_pipeline_df", |
| 131 | + "start_run", |
| 132 | + "start_execution", |
| 133 | + "save_model", |
| 134 | + "get_experiment_model", |
| 135 | + "autolog", |
| 136 | + "upload_tb_log", |
| 137 | + "start_upload_tb_log", |
| 138 | + "end_upload_tb_log", |
| 139 | + "Artifact", |
| 140 | + "AutoMLImageTrainingJob", |
| 141 | + "AutoMLTabularTrainingJob", |
| 142 | + "AutoMLForecastingTrainingJob", |
| 143 | + "AutoMLTextTrainingJob", |
| 144 | + "AutoMLVideoTrainingJob", |
| 145 | + "BatchPredictionJob", |
| 146 | + "CustomJob", |
| 147 | + "CustomTrainingJob", |
| 148 | + "CustomContainerTrainingJob", |
| 149 | + "CustomPythonPackageTrainingJob", |
| 150 | + "DeploymentResourcePool", |
| 151 | + "Endpoint", |
| 152 | + "EntityType", |
| 153 | + "Execution", |
| 154 | + "Experiment", |
| 155 | + "ExperimentRun", |
| 156 | + "Feature", |
| 157 | + "Featurestore", |
| 158 | + "MatchingEngineIndex", |
| 159 | + "MatchingEngineIndexEndpoint", |
| 160 | + "ImageDataset", |
| 161 | + "HyperparameterTuningJob", |
| 162 | + "Model", |
| 163 | + "ModelRegistry", |
| 164 | + "ModelEvaluation", |
| 165 | + "ModelDeploymentMonitoringJob", |
| 166 | + "PipelineJob", |
| 167 | + "PipelineJobSchedule", |
| 168 | + "PrivateEndpoint", |
| 169 | + "SequenceToSequencePlusForecastingTrainingJob", |
| 170 | + "TabularDataset", |
| 171 | + "Tensorboard", |
| 172 | + "TensorboardExperiment", |
| 173 | + "TensorboardRun", |
| 174 | + "TensorboardTimeSeries", |
| 175 | + "TextDataset", |
| 176 | + "TemporalFusionTransformerForecastingTrainingJob", |
| 177 | + "TimeSeriesDataset", |
| 178 | + "TimeSeriesDenseEncoderForecastingTrainingJob", |
| 179 | + "VideoDataset", |
| 180 | +) |
0 commit comments