File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,33 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
17+
from google.cloud.aiplatform.helpers import _decorators
1818
from google.cloud.aiplatform.v1beta1.schema import predict
1919
from google.cloud.aiplatform.v1beta1.schema import trainingjob
20-
20+
from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1 import (
21+
types as instance,
22+
)
23+
from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1 import (
24+
types as params,
25+
)
26+
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1 import (
27+
types as prediction,
28+
)
29+
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1 import (
30+
types as definition,
31+
)
2132

2233
__all__ = (
2334
"predict",
2435
"trainingjob",
2536
)
37+
38+
enhanced_types_packages = [
39+
instance,
40+
params,
41+
prediction,
42+
definition,
43+
]
44+
45+
for pkg in enhanced_types_packages:
46+
_decorators._add_methods_to_classes_in_package(pkg)
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
from google.cloud.aiplatform.helpers import _decorators
18-
from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1 import types as pkg
19-
2017
from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.image_classification import (
2118
ImageClassificationPredictionInstance,
2219
)
@@ -56,4 +53,3 @@
5653
"VideoClassificationPredictionInstance",
5754
"VideoObjectTrackingPredictionInstance",
5855
)
59-
_decorators._add_methods_to_classes_in_package(pkg)
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
from google.cloud.aiplatform.helpers import _decorators
18-
from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1 import types as pkg
19-
2017
from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.image_classification import (
2118
ImageClassificationPredictionParams,
2219
)
@@ -44,4 +41,3 @@
4441
"VideoClassificationPredictionParams",
4542
"VideoObjectTrackingPredictionParams",
4643
)
47-
_decorators._add_methods_to_classes_in_package(pkg)
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
from google.cloud.aiplatform.helpers import _decorators
18-
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1 import (
19-
types as pkg,
20-
)
21-
2217
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.classification import (
2318
ClassificationPredictionResult,
2419
)
@@ -66,4 +61,3 @@
6661
"VideoClassificationPredictionResult",
6762
"VideoObjectTrackingPredictionResult",
6863
)
69-
_decorators._add_methods_to_classes_in_package(pkg)
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
from google.cloud.aiplatform.helpers import _decorators
18-
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1 import (
19-
types as pkg,
20-
)
21-
2217
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_forecasting import (
2318
AutoMlForecasting,
2419
)
@@ -134,4 +129,3 @@
134129
"AutoMlVideoObjectTrackingInputs",
135130
"ExportEvaluatedDataItemsConfig",
136131
)
137-
_decorators._add_methods_to_classes_in_package(pkg)

0 commit comments

Comments
 (0)