Skip to content

Commit

Permalink
feat: moves manual enhanced lib edits outside of generated files (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
telpirion committed Feb 8, 2021
1 parent 3ed0e09 commit a04a561
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
25 changes: 23 additions & 2 deletions google/cloud/aiplatform/gapic/schema/__init__.py
Expand Up @@ -14,12 +14,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from google.cloud.aiplatform.helpers import _decorators
from google.cloud.aiplatform.v1beta1.schema import predict
from google.cloud.aiplatform.v1beta1.schema import trainingjob

from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1 import (
types as instance,
)
from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1 import (
types as params,
)
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1 import (
types as prediction,
)
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1 import (
types as definition,
)

__all__ = (
"predict",
"trainingjob",
)

enhanced_types_packages = [
instance,
params,
prediction,
definition,
]

for pkg in enhanced_types_packages:
_decorators._add_methods_to_classes_in_package(pkg)
Expand Up @@ -14,9 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.aiplatform.helpers import _decorators
from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1 import types as pkg

from google.cloud.aiplatform.v1beta1.schema.predict.instance_v1beta1.types.image_classification import (
ImageClassificationPredictionInstance,
)
Expand Down Expand Up @@ -56,4 +53,3 @@
"VideoClassificationPredictionInstance",
"VideoObjectTrackingPredictionInstance",
)
_decorators._add_methods_to_classes_in_package(pkg)
Expand Up @@ -14,9 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.aiplatform.helpers import _decorators
from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1 import types as pkg

from google.cloud.aiplatform.v1beta1.schema.predict.params_v1beta1.types.image_classification import (
ImageClassificationPredictionParams,
)
Expand Down Expand Up @@ -44,4 +41,3 @@
"VideoClassificationPredictionParams",
"VideoObjectTrackingPredictionParams",
)
_decorators._add_methods_to_classes_in_package(pkg)
Expand Up @@ -14,11 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.aiplatform.helpers import _decorators
from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1 import (
types as pkg,
)

from google.cloud.aiplatform.v1beta1.schema.predict.prediction_v1beta1.types.classification import (
ClassificationPredictionResult,
)
Expand Down Expand Up @@ -66,4 +61,3 @@
"VideoClassificationPredictionResult",
"VideoObjectTrackingPredictionResult",
)
_decorators._add_methods_to_classes_in_package(pkg)
Expand Up @@ -14,11 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.aiplatform.helpers import _decorators
from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1 import (
types as pkg,
)

from google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.automl_forecasting import (
AutoMlForecasting,
)
Expand Down Expand Up @@ -134,4 +129,3 @@
"AutoMlVideoObjectTrackingInputs",
"ExportEvaluatedDataItemsConfig",
)
_decorators._add_methods_to_classes_in_package(pkg)

0 comments on commit a04a561

Please sign in to comment.