File tree Expand file tree Collapse file tree 11 files changed +114
-15
lines changed
Expand file tree Collapse file tree 11 files changed +114
-15
lines changed Original file line number Diff line number Diff line change 1616#
1717
1818from google .cloud .aiplatform import gapic
19+ from google .cloud .aiplatform import schema
1920
20- __all__ = (gapic ,)
21+
22+ __all__ = (gapic , schema )
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ # Copyright 2020 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+
18+ from google .cloud .aiplatform .v1beta1 .schema import predict
19+ from google .cloud .aiplatform .v1beta1 .schema import trainingjob
20+
21+
22+ __all__ = (
23+ "predict" ,
24+ "trainingjob" ,
25+ )
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ # Copyright 2020 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+
18+ from google .cloud .aiplatform .v1beta1 .schema import predict
19+ from google .cloud .aiplatform .v1beta1 .schema import trainingjob
20+
21+
22+ __all__ = (
23+ "predict" ,
24+ "trainingjob" ,
25+ )
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ # Copyright 2020 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+
18+ from google .cloud .aiplatform .v1beta1 .schema .predict import instance
19+ from google .cloud .aiplatform .v1beta1 .schema .predict import params
20+ from google .cloud .aiplatform .v1beta1 .schema .predict import prediction
21+
22+ __all__ = (
23+ "instance" ,
24+ "params" ,
25+ "prediction" ,
26+ )
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717from google .cloud .aiplatform .helpers import _decorators
18- import google .cloud .aiplatform .v1beta1 .schema .predict .instance_v1beta1 . types as pkg
18+ from google .cloud .aiplatform .v1beta1 .schema .predict .instance_v1beta1 import types as pkg
1919
2020from google .cloud .aiplatform .v1beta1 .schema .predict .instance_v1beta1 .types .image_classification import (
2121 ImageClassificationPredictionInstance ,
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717from google .cloud .aiplatform .helpers import _decorators
18- import google .cloud .aiplatform .v1beta1 .schema .predict .params_v1beta1 . types as pkg
18+ from google .cloud .aiplatform .v1beta1 .schema .predict .params_v1beta1 import types as pkg
1919
2020from google .cloud .aiplatform .v1beta1 .schema .predict .params_v1beta1 .types .image_classification import (
2121 ImageClassificationPredictionParams ,
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717from google .cloud .aiplatform .helpers import _decorators
18- import google .cloud .aiplatform .v1beta1 .schema .predict .prediction_v1beta1 .types as pkg
18+ from google .cloud .aiplatform .v1beta1 .schema .predict .prediction_v1beta1 import (
19+ types as pkg ,
20+ )
1921
2022from google .cloud .aiplatform .v1beta1 .schema .predict .prediction_v1beta1 .types .classification import (
2123 ClassificationPredictionResult ,
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ # Copyright 2020 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+
18+ from google .cloud .aiplatform .v1beta1 .schema .trainingjob import definition
19+
20+ __all__ = ("definition" ,)
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616#
1717from google .cloud .aiplatform .helpers import _decorators
18- import google .cloud .aiplatform .v1beta1 .schema .trainingjob .definition_v1beta1 .types as pkg
18+ from google .cloud .aiplatform .v1beta1 .schema .trainingjob .definition_v1beta1 import (
19+ types as pkg ,
20+ )
1921
2022from google .cloud .aiplatform .v1beta1 .schema .trainingjob .definition_v1beta1 .types .automl_forecasting import (
2123 AutoMlForecasting ,
Original file line number Diff line number Diff line change 1414
1515# [START aiplatform_create_training_pipeline_image_classification_sample]
1616from google .cloud import aiplatform
17- from google .cloud .aiplatform .v1beta1 .schema .trainingjob import definition
18- ModelType = definition .AutoMlImageClassificationInputs ().ModelType
17+ from google .cloud .aiplatform .schema import trainingjob
1918
2019
2120def create_training_pipeline_image_classification_sample (
@@ -32,9 +31,9 @@ def create_training_pipeline_image_classification_sample(
3231 # This client only needs to be created once, and can be reused for multiple requests.
3332 client = aiplatform .gapic .PipelineServiceClient (client_options = client_options )
3433
35- icn_training_inputs = definition .AutoMlImageClassificationInputs (
34+ icn_training_inputs = trainingjob . definition .AutoMlImageClassificationInputs (
3635 multi_label = True ,
37- model_type = ModelType .CLOUD ,
36+ model_type = trainingjob . definition . AutoMlImageClassificationInputs . ModelType .CLOUD ,
3837 budget_milli_node_hours = 8000 ,
3938 disable_early_stopping = False
4039 )
You can’t perform that action at this time.
0 commit comments