Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 96742c1

Browse filesBrowse files
authored
ppai/timeseries-classification: fix dependency versions (GoogleCloudPlatform#7072)
## Description Fixes GoogleCloudPlatform#7024 - Update Tensorflow to fix Keras incompatibility - Update BigQuery to latest version - Fix image links in the notebook ## Checklist - [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [ ] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent ed8a4c3 commit 96742c1
Copy full SHA for 96742c1

File tree

Expand file treeCollapse file tree

5 files changed

+448
-421
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+448
-421
lines changed

‎people-and-planet-ai/image-classification/e2e_test.py

Copy file name to clipboardExpand all lines: people-and-planet-ai/image-classification/e2e_test.py
+29-2Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,31 @@ def model_endpoint_id() -> str:
126126
client.delete_endpoint(name=endpoint_path).result()
127127

128128

129-
def test_create_images_database_table(bucket_name: str, bigquery_dataset: str) -> None:
129+
@pytest.fixture(scope="session")
130+
def cache_dependencies() -> None:
131+
# The Dataflow staging procedure involves downloading all the requirements and
132+
# rebuilding everything from scratch.
133+
# Recent Apache Beam versions include dependencies that require a C++ and Rust compiler
134+
# and compiling all the dependencies can take a long time.
135+
# We download the pre-compiled dependencies and then set PIP_NO_DEPS to force
136+
# pip to not rebuild any indirect dependencies.
137+
subprocess.run(
138+
[
139+
"pip",
140+
"download",
141+
"--dest",
142+
"/tmp/dataflow-requirements-cache",
143+
"-r",
144+
"requirements.txt",
145+
],
146+
check=True,
147+
)
148+
os.environ["PIP_NO_DEPS"] = "True"
149+
150+
151+
def test_create_images_database_table(
152+
bucket_name: str, bigquery_dataset: str, cache_dependencies: None
153+
) -> None:
130154
# The table is deleted when we delete the dataset.
131155
subprocess.run(
132156
[
@@ -146,7 +170,10 @@ def test_create_images_database_table(bucket_name: str, bigquery_dataset: str) -
146170

147171

148172
def test_train_model(
149-
bucket_name: str, bigquery_dataset: str, bigquery_table: str
173+
bucket_name: str,
174+
bigquery_dataset: str,
175+
bigquery_table: str,
176+
cache_dependencies: None,
150177
) -> None:
151178
subprocess.run(
152179
[
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Pillow==8.4.0
2-
apache-beam[gcp]==2.31.0
2+
apache-beam[gcp]==2.33.0
33
google-cloud-aiplatform==1.7.0
4-
google-cloud-bigquery==2.29.0 # Indirect dependency, but there is a version conflict that causes pip to hang unless we constraint this.
4+
google-cloud-bigquery==2.30.0 # Indirect dependency, but there is a version conflict that causes pip to hang unless we constraint this.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.