Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def data_path(bucket_name: str) -> str:
def model_path(bucket_name: str) -> str:
# This is a different path than where Vertex AI saves its model.
gcs_path = f"gs://{bucket_name}/pretrained-model"
conftest.run_cmd("gsutil", "-m", "cp", "-r", "./pretrained-model", gcs_path)
conftest.run_cmd("gcloud", "storage", "cp", "--recursive", "./pretrained-model", gcs_path)
return gcs_path


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,7 @@
},
"outputs": [],
"source": [
"!gsutil ls -lh gs://{bucket}/weather/data-small"
],
"!gcloud storage ls --long --readable-sizes gs://{bucket}/weather/data-small" ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The automated migration has merged two lines into one, which harms the readability and structural consistency of the notebook's JSON source. While this is likely still valid JSON, it's better to keep the array closing bracket on its own line for clarity and to match the style of the rest of the file.

Suggested change
"!gcloud storage ls --long --readable-sizes gs://{bucket}/weather/data-small" ],
"!gcloud storage ls --long --readable-sizes gs://{bucket}/weather/data-small"
],

"id": "F43OAIlrDosG"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
"data_path_gcs = f\"gs://{bucket}/weather/data\"\n",
"\n",
"!mkdir -p data-training\n",
"!gsutil -m cp {data_path_gcs}/* data-training"
"!gcloud storage cp {data_path_gcs}/* data-training"
],
"metadata": {
"id": "h_IUpnqvO-sa"
Expand Down Expand Up @@ -1336,7 +1336,7 @@
"cell_type": "code",
"source": [
"# Stage the `weather-model` package in Cloud Storage.\n",
"!gsutil cp serving/weather-model/dist/weather-model-1.0.0.tar.gz gs://{bucket}/weather/"
"!gcloud storage cp serving/weather-model/dist/weather-model-1.0.0.tar.gz gs://{bucket}/weather/"
],
"metadata": {
"id": "JA1k9ky02dsx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@
"model_path_gcs = f\"gs://{bucket}/weather/model\"\n",
"\n",
"!mkdir -p model\n",
"!gsutil cp {model_path_gcs}/* model"
],
"!gcloud storage cp {model_path_gcs}/* model" ],
"metadata": {
"id": "5w_uNjluhDMG"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_name() -> str:
@pytest.fixture(scope="session")
def model_path_gcs(bucket_name: str) -> str:
path_gcs = f"gs://{bucket_name}/model"
conftest.run_cmd("gsutil", "cp", "serving/model/*", path_gcs)
conftest.run_cmd("gcloud", "storage", "cp", "serving/model/*", path_gcs)
return path_gcs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def data_path_gcs(bucket_name: str) -> str:
inputs_batch = [inputs] * batch_size
labels_batch = [labels] * batch_size
np.savez_compressed(f, inputs=inputs_batch, labels=labels_batch)
conftest.run_cmd("gsutil", "cp", f.name, f"{path_gcs}/example.npz")
conftest.run_cmd("gcloud", "storage", "cp", f.name, f"{path_gcs}/example.npz")
return path_gcs


Expand Down