GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge branch 'master' into dev · conradlee/python-aiplatform@45d5565

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github
    • sync-repo-settings.yaml
  • .gitignore
  • .kokoro
    • build.sh
    • test-samples-against-head.sh
    • test-samples-impl.sh
    • test-samples.sh
  • CHANGELOG.md
  • CONTRIBUTING.rst
  • MANIFEST.in
  • docs/aiplatform_v1beta1
    • services.rst
    • vizier_service.rst
  • google/cloud
    • aiplatform_v1beta1
      • __init__.py
      • services
        • dataset_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • endpoint_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • job_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • migration_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • model_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • pipeline_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • prediction_service
          • async_client.py
          • client.py
          • transports
            • grpc.py
        • specialist_pool_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • vizier_service
          • __init__.py
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • __init__.py
            • base.py
            • grpc.py
            • grpc_asyncio.py
      • types
        • __init__.py
        • accelerator_type.py
        • annotation.py
        • annotation_spec.py
        • batch_prediction_job.py
        • custom_job.py
        • data_item.py
        • data_labeling_job.py
        • dataset.py
        • dataset_service.py
        • endpoint.py
        • endpoint_service.py
        • explanation_metadata.py
        • io.py
        • job_service.py
        • job_state.py
        • machine_resources.py
        • migratable_resource.py
        • migration_service.py
        • model.py
        • model_service.py
        • pipeline_service.py
        • specialist_pool_service.py
        • study.py
        • training_pipeline.py
        • user_action_reference.py
        • vizier_service.py
    • aiplatform_v1
      • services
        • dataset_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • endpoint_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • job_service
          • async_client.py
          • pagers.py
          • transports
            • grpc.py
        • migration_service
          • async_client.py
          • client.py
          • pagers.py
          • transports
            • grpc.py
        • model_service
          • async_client.py
          • pagers.py
          • transports
            • grpc.py
        • pipeline_service
          • async_client.py
          • pagers.py
          • transports
            • grpc.py
        • prediction_service
          • async_client.py
          • client.py
          • transports
            • grpc.py
        • specialist_pool_service
          • async_client.py
          • pagers.py
          • transports
            • grpc.py
      • types
        • __init__.py
    • aiplatform
      • v1beta1/schema
        • predict
          • instance_v1beta1/types
            • video_action_recognition.py
            • video_classification.py
            • video_object_tracking.py
          • instance
            • __init__.py
          • params
            • __init__.py
          • prediction_v1beta1
            • __init__.py
            • types
              • __init__.py
              • image_segmentation.py
          • prediction
            • __init__.py
        • trainingjob
          • definition_v1beta1
            • __init__.py
            • types
              • __init__.py
              • automl_image_segmentation.py
              • automl_video_classification.py
              • export_evaluated_data_items_config.py
          • definition
            • __init__.py
      • v1/schema/trainingjob/definition_v1/types
        • __init__.py
  • noxfile.py
  • renovate.json
  • samples/snippets
    • create_data_labeling_job_active_learning_sample_test.py
    • create_data_labeling_job_image_segmentation_sample_test.py
    • create_data_labeling_job_images_sample_test.py
    • create_data_labeling_job_sample_test.py
    • create_data_labeling_job_specialist_pool_sample_test.py
    • create_data_labeling_job_video_sample_test.py
    • requirements.txt
  • setup.py
  • tests/unit/gapic
    • aiplatform_v1beta1
      • __init__.py
      • test_dataset_service.py
      • test_endpoint_service.py
      • test_job_service.py
      • test_migration_service.py
      • test_model_service.py
      • test_pipeline_service.py
      • test_prediction_service.py
      • test_specialist_pool_service.py
      • test_vizier_service.py
    • aiplatform_v1
      • __init__.py
      • test_dataset_service.py
      • test_endpoint_service.py
      • test_job_service.py
      • test_migration_service.py
      • test_model_service.py
      • test_pipeline_service.py
      • test_specialist_pool_service.py

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/sync-repo-settings.yaml‎

Copy file name to clipboardExpand all lines: .github/sync-repo-settings.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/sync-repo-settings
22
# Rules for master branch protection
3+
mergeCommitAllowed: true
34
branchProtectionRules:
45
# Identifies the protection rule pattern. Name of the branch to be protected.
56
# Defaults to `master`
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ docs.metadata
5151

5252
# Virtual environment
5353
env/
54+
55+
# Test logs
5456
coverage.xml
55-
sponge_log.xml
57+
*sponge_log.xml
5658

5759
# System test environment variables.
5860
system_tests/local_test_setup
Collapse file

‎.kokoro/build.sh‎

Copy file name to clipboardExpand all lines: .kokoro/build.sh
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ python3 -m pip uninstall --yes --quiet nox-automation
4040
python3 -m pip install --upgrade --quiet nox
4141
python3 -m nox --version
4242

43+
# If this is a continuous build, send the test log to the FlakyBot.
44+
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
45+
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
46+
cleanup() {
47+
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
48+
$KOKORO_GFILE_DIR/linux_amd64/flakybot
49+
}
50+
trap cleanup EXIT HUP
51+
fi
52+
4353
# If NOX_SESSION is set, it only runs the specified session,
4454
# otherwise run all the sessions.
4555
if [[ -n "${NOX_SESSION:-}" ]]; then
Collapse file

‎.kokoro/test-samples-against-head.sh‎

Copy file name to clipboard
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# A customized test runner for samples.
17+
#
18+
# For periodic builds, you can specify this file for testing against head.
19+
20+
# `-e` enables the script to automatically fail when a command fails
21+
# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero
22+
set -eo pipefail
23+
# Enables `**` to include files nested inside sub-folders
24+
shopt -s globstar
25+
26+
cd github/python-aiplatform
27+
28+
exec .kokoro/test-samples-impl.sh
Collapse file

‎.kokoro/test-samples-impl.sh‎

Copy file name to clipboard
+102Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#!/bin/bash
2+
# Copyright 2021 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
17+
# `-e` enables the script to automatically fail when a command fails
18+
# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero
19+
set -eo pipefail
20+
# Enables `**` to include files nested inside sub-folders
21+
shopt -s globstar
22+
23+
# Exit early if samples directory doesn't exist
24+
if [ ! -d "./samples" ]; then
25+
echo "No tests run. `./samples` not found"
26+
exit 0
27+
fi
28+
29+
# Disable buffering, so that the logs stream through.
30+
export PYTHONUNBUFFERED=1
31+
32+
# Debug: show build environment
33+
env | grep KOKORO
34+
35+
# Install nox
36+
python3.6 -m pip install --upgrade --quiet nox
37+
38+
# Use secrets acessor service account to get secrets
39+
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
40+
gcloud auth activate-service-account \
41+
--key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \
42+
--project="cloud-devrel-kokoro-resources"
43+
fi
44+
45+
# This script will create 3 files:
46+
# - testing/test-env.sh
47+
# - testing/service-account.json
48+
# - testing/client-secrets.json
49+
./scripts/decrypt-secrets.sh
50+
51+
source ./testing/test-env.sh
52+
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
53+
54+
# For cloud-run session, we activate the service account for gcloud sdk.
55+
gcloud auth activate-service-account \
56+
--key-file "${GOOGLE_APPLICATION_CREDENTIALS}"
57+
58+
export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json
59+
60+
echo -e "\n******************** TESTING PROJECTS ********************"
61+
62+
# Switch to 'fail at end' to allow all tests to complete before exiting.
63+
set +e
64+
# Use RTN to return a non-zero value if the test fails.
65+
RTN=0
66+
ROOT=$(pwd)
67+
# Find all requirements.txt in the samples directory (may break on whitespace).
68+
for file in samples/**/requirements.txt; do
69+
cd "$ROOT"
70+
# Navigate to the project folder.
71+
file=$(dirname "$file")
72+
cd "$file"
73+
74+
echo "------------------------------------------------------------"
75+
echo "- testing $file"
76+
echo "------------------------------------------------------------"
77+
78+
# Use nox to execute the tests for the project.
79+
python3.6 -m nox -s "$RUN_TESTS_SESSION"
80+
EXIT=$?
81+
82+
# If this is a periodic build, send the test log to the FlakyBot.
83+
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
84+
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
85+
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
86+
$KOKORO_GFILE_DIR/linux_amd64/flakybot
87+
fi
88+
89+
if [[ $EXIT -ne 0 ]]; then
90+
RTN=1
91+
echo -e "\n Testing failed: Nox returned a non-zero exit code. \n"
92+
else
93+
echo -e "\n Testing completed.\n"
94+
fi
95+
96+
done
97+
cd "$ROOT"
98+
99+
# Workaround for Kokoro permissions issue: delete secrets
100+
rm testing/{test-env.sh,client-secrets.json,service-account.json}
101+
102+
exit "$RTN"
Collapse file

‎.kokoro/test-samples.sh‎

Copy file name to clipboardExpand all lines: .kokoro/test-samples.sh
+16-80Lines changed: 16 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# The default test runner for samples.
17+
#
18+
# For periodic builds, we rewinds the repo to the latest release, and
19+
# run test-samples-impl.sh.
1620

1721
# `-e` enables the script to automatically fail when a command fails
1822
# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero
@@ -24,87 +28,19 @@ cd github/python-aiplatform
2428

2529
# Run periodic samples tests at latest release
2630
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
31+
# preserving the test runner implementation.
32+
cp .kokoro/test-samples-impl.sh "${TMPDIR}/test-samples-impl.sh"
33+
echo "--- IMPORTANT IMPORTANT IMPORTANT ---"
34+
echo "Now we rewind the repo back to the latest release..."
2735
LATEST_RELEASE=$(git describe --abbrev=0 --tags)
2836
git checkout $LATEST_RELEASE
29-
fi
30-
31-
# Exit early if samples directory doesn't exist
32-
if [ ! -d "./samples" ]; then
33-
echo "No tests run. `./samples` not found"
34-
exit 0
35-
fi
36-
37-
# Disable buffering, so that the logs stream through.
38-
export PYTHONUNBUFFERED=1
39-
40-
# Debug: show build environment
41-
env | grep KOKORO
42-
43-
# Install nox
44-
python3.6 -m pip install --upgrade --quiet nox
45-
46-
# Use secrets acessor service account to get secrets
47-
if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then
48-
gcloud auth activate-service-account \
49-
--key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \
50-
--project="cloud-devrel-kokoro-resources"
51-
fi
52-
53-
# This script will create 3 files:
54-
# - testing/test-env.sh
55-
# - testing/service-account.json
56-
# - testing/client-secrets.json
57-
./scripts/decrypt-secrets.sh
58-
59-
source ./testing/test-env.sh
60-
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json
61-
62-
# For cloud-run session, we activate the service account for gcloud sdk.
63-
gcloud auth activate-service-account \
64-
--key-file "${GOOGLE_APPLICATION_CREDENTIALS}"
65-
66-
export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json
67-
68-
echo -e "\n******************** TESTING PROJECTS ********************"
69-
70-
# Switch to 'fail at end' to allow all tests to complete before exiting.
71-
set +e
72-
# Use RTN to return a non-zero value if the test fails.
73-
RTN=0
74-
ROOT=$(pwd)
75-
# Find all requirements.txt in the samples directory (may break on whitespace).
76-
for file in samples/**/requirements.txt; do
77-
cd "$ROOT"
78-
# Navigate to the project folder.
79-
file=$(dirname "$file")
80-
cd "$file"
81-
82-
echo "------------------------------------------------------------"
83-
echo "- testing $file"
84-
echo "------------------------------------------------------------"
85-
86-
# Use nox to execute the tests for the project.
87-
python3.6 -m nox -s "$RUN_TESTS_SESSION"
88-
EXIT=$?
89-
90-
# If this is a periodic build, send the test log to the FlakyBot.
91-
# See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot.
92-
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then
93-
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
94-
$KOKORO_GFILE_DIR/linux_amd64/flakybot
37+
echo "The current head is: "
38+
echo $(git rev-parse --verify HEAD)
39+
echo "--- IMPORTANT IMPORTANT IMPORTANT ---"
40+
# move back the test runner implementation if there's no file.
41+
if [ ! -f .kokoro/test-samples-impl.sh ]; then
42+
cp "${TMPDIR}/test-samples-impl.sh" .kokoro/test-samples-impl.sh
9543
fi
44+
fi
9645

97-
if [[ $EXIT -ne 0 ]]; then
98-
RTN=1
99-
echo -e "\n Testing failed: Nox returned a non-zero exit code. \n"
100-
else
101-
echo -e "\n Testing completed.\n"
102-
fi
103-
104-
done
105-
cd "$ROOT"
106-
107-
# Workaround for Kokoro permissions issue: delete secrets
108-
rm testing/{test-env.sh,client-secrets.json,service-account.json}
109-
110-
exit "$RTN"
46+
exec .kokoro/test-samples-impl.sh
Collapse file

‎CHANGELOG.md‎

Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## [0.6.0](https://www.github.com/googleapis/python-aiplatform/compare/v0.5.1...v0.6.0) (2021-03-22)
4+
5+
6+
### Features
7+
8+
* add Vizier service ([#266](https://www.github.com/googleapis/python-aiplatform/issues/266)) ([e5c1b1a](https://www.github.com/googleapis/python-aiplatform/commit/e5c1b1a4909d701efeb27f29af43a95516c51475))
9+
10+
11+
### Bug Fixes
12+
13+
* skip create data labeling job sample tests ([#254](https://www.github.com/googleapis/python-aiplatform/issues/254)) ([116a29b](https://www.github.com/googleapis/python-aiplatform/commit/116a29b1efcebb15bad14c3c36d3591c09ef10be))
14+
15+
### [0.5.1](https://www.github.com/googleapis/python-aiplatform/compare/v0.5.0...v0.5.1) (2021-03-01)
16+
17+
18+
### Bug Fixes
19+
20+
* fix create data labeling job samples tests ([#244](https://www.github.com/googleapis/python-aiplatform/issues/244)) ([3c440de](https://www.github.com/googleapis/python-aiplatform/commit/3c440dea14ad4d04b05ebf17ba4bcb031fe95b3e))
21+
* fix predict sample tests for proto-plus==1.14.2 ([#250](https://www.github.com/googleapis/python-aiplatform/issues/250)) ([b1c9d88](https://www.github.com/googleapis/python-aiplatform/commit/b1c9d88646f00b034e2576890406325db5384f10))
22+
* fix update export model sample, and add sample test ([#239](https://www.github.com/googleapis/python-aiplatform/issues/239)) ([20b8859](https://www.github.com/googleapis/python-aiplatform/commit/20b88592da3dd7344c7053d7fe652115ed42e4aa))
23+
24+
25+
### Documentation
26+
27+
* update index.rst to include v1 ([#246](https://www.github.com/googleapis/python-aiplatform/issues/246)) ([82193ef](https://www.github.com/googleapis/python-aiplatform/commit/82193ef401258b17fd20895e2b0f6c95a39a24a1))
28+
329
## [0.5.0](https://www.github.com/googleapis/python-aiplatform/compare/v0.4.0...v0.5.0) (2021-02-17)
430

531

Collapse file

‎CONTRIBUTING.rst‎

Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+18-4Lines changed: 18 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
7070
- To test your changes, run unit tests with ``nox``::
7171

7272
$ nox -s unit-2.7
73-
$ nox -s unit-3.7
73+
$ nox -s unit-3.8
7474
$ ...
7575

76+
- Args to pytest can be passed through the nox command separated by a `--`. For
77+
example, to run a single test::
78+
79+
$ nox -s unit-3.8 -- -k <name of test>
80+
7681
.. note::
7782

7883
The unit tests and system tests are described in the
@@ -93,8 +98,12 @@ On Debian/Ubuntu::
9398
************
9499
Coding Style
95100
************
101+
- We use the automatic code formatter ``black``. You can run it using
102+
the nox session ``blacken``. This will eliminate many lint errors. Run via::
103+
104+
$ nox -s blacken
96105

97-
- PEP8 compliance, with exceptions defined in the linter configuration.
106+
- PEP8 compliance is required, with exceptions defined in the linter configuration.
98107
If you have ``nox`` installed, you can test that you have not introduced
99108
any non-compliant code via::
100109

@@ -133,13 +142,18 @@ Running System Tests
133142

134143
- To run system tests, you can execute::
135144

136-
$ nox -s system-3.7
145+
# Run all system tests
146+
$ nox -s system-3.8
137147
$ nox -s system-2.7
138148

149+
# Run a single system test
150+
$ nox -s system-3.8 -- -k <name of test>
151+
152+
139153
.. note::
140154

141155
System tests are only configured to run under Python 2.7 and
142-
Python 3.7. For expediency, we do not run them in older versions
156+
Python 3.8. For expediency, we do not run them in older versions
143157
of Python 3.
144158

145159
This alone will not run the tests. You'll need to change some local
Collapse file

‎MANIFEST.in‎

Copy file name to clipboardExpand all lines: MANIFEST.in
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
# Generated by synthtool. DO NOT EDIT!
1818
include README.rst LICENSE
19-
recursive-include google *.json *.proto
19+
recursive-include google *.json *.proto py.typed
2020
recursive-include tests *
2121
global-exclude *.py[co]
2222
global-exclude __pycache__
2323

2424
# Exclude scripts for samples readmegen
25-
prune scripts/readme-gen
25+
prune scripts/readme-gen
Collapse file

‎docs/aiplatform_v1beta1/services.rst‎

Copy file name to clipboardExpand all lines: docs/aiplatform_v1beta1/services.rst
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Services for Google Cloud Aiplatform v1beta1 API
1111
pipeline_service
1212
prediction_service
1313
specialist_pool_service
14+
vizier_service

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.