Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: moves manual enhanced lib edits outside of generated files #198

Merged
merged 3 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions google/cloud/aiplatform/gapic/schema/__init__.py
Original file line number Diff line number Diff line change
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)
Original file line number Diff line number Diff line change
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)
Original file line number Diff line number Diff line change
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)
Original file line number Diff line number Diff line change
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)
Original file line number Diff line number Diff line change
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)