Skip to content

Commit 5788c50

Browse files
yyyu-googlecopybara-github
authored andcommitted
feat: migrate resources to agentplatform
PiperOrigin-RevId: 909002274
1 parent f48e54b commit 5788c50

34 files changed

Lines changed: 11712 additions & 23 deletions
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
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+
)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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 preview module."""
16+
17+
from google.cloud.aiplatform.preview.jobs import (
18+
CustomJob,
19+
HyperparameterTuningJob,
20+
)
21+
from google.cloud.aiplatform.preview.models import (
22+
Prediction,
23+
DeploymentResourcePool,
24+
Endpoint,
25+
Model,
26+
)
27+
from google.cloud.aiplatform.preview.featurestore.entity_type import (
28+
EntityType,
29+
)
30+
from google.cloud.aiplatform.preview.persistent_resource import (
31+
PersistentResource,
32+
)
33+
from google.cloud.aiplatform.preview.pipelinejobschedule.pipeline_job_schedules import (
34+
PipelineJobSchedule,
35+
)
36+
37+
from agentplatform.resources.preview.feature_store import (
38+
Feature,
39+
FeatureGroup,
40+
FeatureGroupBigQuerySource,
41+
FeatureMonitor,
42+
FeatureOnlineStore,
43+
FeatureOnlineStoreType,
44+
FeatureView,
45+
FeatureViewBigQuerySource,
46+
FeatureViewReadResponse,
47+
FeatureViewRegistrySource,
48+
FeatureViewVertexRagSource,
49+
IndexConfig,
50+
TreeAhConfig,
51+
BruteForceConfig,
52+
DistanceMeasureType,
53+
AlgorithmConfig,
54+
)
55+
56+
from agentplatform.resources.preview.ml_monitoring import (
57+
ModelMonitor,
58+
ModelMonitoringJob,
59+
)
60+
61+
__all__ = (
62+
"CustomJob",
63+
"HyperparameterTuningJob",
64+
"Prediction",
65+
"DeploymentResourcePool",
66+
"Endpoint",
67+
"Model",
68+
"PersistentResource",
69+
"EntityType",
70+
"PipelineJobSchedule",
71+
"Feature",
72+
"FeatureGroup",
73+
"FeatureGroupBigQuerySource",
74+
"FeatureMonitor",
75+
"FeatureOnlineStoreType",
76+
"FeatureOnlineStore",
77+
"FeatureView",
78+
"FeatureViewBigQuerySource",
79+
"FeatureViewReadResponse",
80+
"FeatureViewVertexRagSource",
81+
"FeatureViewRegistrySource",
82+
"IndexConfig",
83+
"TreeAhConfig",
84+
"BruteForceConfig",
85+
"DistanceMeasureType",
86+
"AlgorithmConfig",
87+
"ModelMonitor",
88+
"ModelMonitoringJob",
89+
)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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 preview module."""
16+
17+
from agentplatform.resources.preview.feature_store.feature import (
18+
Feature,
19+
)
20+
21+
from agentplatform.resources.preview.feature_store.feature_group import (
22+
FeatureGroup,
23+
)
24+
25+
from agentplatform.resources.preview.feature_store.feature_monitor import (
26+
FeatureMonitor,
27+
)
28+
29+
from agentplatform.resources.preview.feature_store.feature_online_store import (
30+
FeatureOnlineStore,
31+
FeatureOnlineStoreType,
32+
)
33+
34+
from agentplatform.resources.preview.feature_store.feature_view import (
35+
FeatureView,
36+
)
37+
38+
from agentplatform.resources.preview.feature_store.utils import (
39+
FeatureGroupBigQuerySource,
40+
FeatureViewBigQuerySource,
41+
FeatureViewReadResponse,
42+
FeatureViewVertexRagSource,
43+
FeatureViewRegistrySource,
44+
IndexConfig,
45+
TreeAhConfig,
46+
BruteForceConfig,
47+
DistanceMeasureType,
48+
AlgorithmConfig,
49+
)
50+
51+
__all__ = (
52+
"Feature",
53+
"FeatureGroup",
54+
"FeatureGroupBigQuerySource",
55+
"FeatureMonitor",
56+
"FeatureOnlineStoreType",
57+
"FeatureOnlineStore",
58+
"FeatureView",
59+
"FeatureViewBigQuerySource",
60+
"FeatureViewReadResponse",
61+
"FeatureViewVertexRagSource",
62+
"FeatureViewRegistrySource",
63+
"IndexConfig",
64+
"TreeAhConfig",
65+
"BruteForceConfig",
66+
"DistanceMeasureType",
67+
"AlgorithmConfig",
68+
)

0 commit comments

Comments
 (0)