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 16
16
#
17
17
18
18
from google .cloud .aiplatform import gapic
19
+ from google .cloud .aiplatform import schema
19
20
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 15
15
# limitations under the License.
16
16
#
17
17
from 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
19
19
20
20
from google .cloud .aiplatform .v1beta1 .schema .predict .instance_v1beta1 .types .image_classification import (
21
21
ImageClassificationPredictionInstance ,
Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
#
17
17
from 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
19
19
20
20
from google .cloud .aiplatform .v1beta1 .schema .predict .params_v1beta1 .types .image_classification import (
21
21
ImageClassificationPredictionParams ,
Original file line number Diff line number Diff line change 15
15
# limitations under the License.
16
16
#
17
17
from 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
+ )
19
21
20
22
from google .cloud .aiplatform .v1beta1 .schema .predict .prediction_v1beta1 .types .classification import (
21
23
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 15
15
# limitations under the License.
16
16
#
17
17
from 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
+ )
19
21
20
22
from google .cloud .aiplatform .v1beta1 .schema .trainingjob .definition_v1beta1 .types .automl_forecasting import (
21
23
AutoMlForecasting ,
Original file line number Diff line number Diff line change 14
14
15
15
# [START aiplatform_create_training_pipeline_image_classification_sample]
16
16
from 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
19
18
20
19
21
20
def create_training_pipeline_image_classification_sample (
@@ -32,9 +31,9 @@ def create_training_pipeline_image_classification_sample(
32
31
# This client only needs to be created once, and can be reused for multiple requests.
33
32
client = aiplatform .gapic .PipelineServiceClient (client_options = client_options )
34
33
35
- icn_training_inputs = definition .AutoMlImageClassificationInputs (
34
+ icn_training_inputs = trainingjob . definition .AutoMlImageClassificationInputs (
36
35
multi_label = True ,
37
- model_type = ModelType .CLOUD ,
36
+ model_type = trainingjob . definition . AutoMlImageClassificationInputs . ModelType .CLOUD ,
38
37
budget_milli_node_hours = 8000 ,
39
38
disable_early_stopping = False
40
39
)
You can’t perform that action at this time.
0 commit comments