Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gcloud storage buckets create --location=$REGION --project=$PROJECT_ID $BUCKET_URI"
]
},
{
Expand All @@ -557,7 +557,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
"! gcloud storage ls --all-versions --long $BUCKET_URI"
]
},
{
Expand Down Expand Up @@ -627,9 +627,9 @@
},
"outputs": [],
"source": [
"! gsutil iam ch serviceAccount:{SERVICE_ACCOUNT}:roles/storage.objectCreator $BUCKET_URI\n",
"! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectCreator\n",
"\n",
"! gsutil iam ch serviceAccount:{SERVICE_ACCOUNT}:roles/storage.objectViewer $BUCKET_URI"
"! gcloud storage buckets add-iam-policy-binding $BUCKET_URI --member=serviceAccount:{SERVICE_ACCOUNT} --role=roles/storage.objectViewer"
]
},
{
Expand Down Expand Up @@ -1736,7 +1736,7 @@
"delete_bucket = False\n",
"\n",
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
" ! gsutil rm -rf {BUCKET_URI}"
" ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION gs://$BUCKET_NAME"
"! gcloud storage buckets create --location $REGION gs://$BUCKET_NAME"
]
},
{
Expand All @@ -332,7 +332,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al gs://$BUCKET_NAME"
"! gcloud storage ls --all-versions --long gs://$BUCKET_NAME"
]
},
{
Expand Down Expand Up @@ -668,7 +668,7 @@
"! rm -f custom.tar custom.tar.gz\n",
"! tar cvf custom.tar custom\n",
"! gzip custom.tar\n",
"! gsutil cp custom.tar.gz gs://$BUCKET_NAME/census.tar.gz"
"! gcloud storage cp custom.tar.gz gs://$BUCKET_NAME/census.tar.gz"
]
},
{
Expand Down Expand Up @@ -1923,7 +1923,7 @@
" print(e)\n",
"\n",
"if delete_bucket and \"BUCKET_NAME\" in globals():\n",
" ! gsutil rm -r gs://$BUCKET_NAME"
" ! gcloud storage rm --recursive gs://$BUCKET_NAME"
]
}
],
Expand Down
24 changes: 12 additions & 12 deletions notebooks/community/ml_ops/stage1/mlops_data_management.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION $BUCKET_URI"
"! gcloud storage buckets create --location $REGION $BUCKET_URI"
]
},
{
Expand All @@ -485,7 +485,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
"! gcloud storage ls --all-versions --long $BUCKET_URI"
]
},
{
Expand Down Expand Up @@ -1093,7 +1093,7 @@
") as f:\n",
" json.dump(metadata, f)\n",
"\n",
"! gsutil cat $BUCKET_URI/metadata.jsonl"
"! gcloud storage cat $BUCKET_URI/metadata.jsonl"
]
},
{
Expand Down Expand Up @@ -1178,7 +1178,7 @@
") as f:\n",
" json.dump(metadata, f)\n",
"\n",
"! gsutil cat $BUCKET_URI/metadata.jsonl"
"! gcloud storage cat $BUCKET_URI/metadata.jsonl"
]
},
{
Expand Down Expand Up @@ -1527,12 +1527,12 @@
"run_pipeline(args)\n",
"print(\"Data preprocessing completed.\")\n",
"\n",
"! gsutil ls $TRANSFORMED_DATA_PREFIX/train\n",
"! gsutil ls $TRANSFORMED_DATA_PREFIX/val\n",
"! gsutil ls $TRANSFORMED_DATA_PREFIX/test\n",
"! gsutil ls $TRANSFORM_ARTIFACTS_DIR\n",
"! gsutil ls {EXPORTED_JSONL_PREFIX}*\n",
"! gsutil ls $EXPORTED_TFREC_PREFIX"
"! gcloud storage ls $TRANSFORMED_DATA_PREFIX/train\n",
"! gcloud storage ls $TRANSFORMED_DATA_PREFIX/val\n",
"! gcloud storage ls $TRANSFORMED_DATA_PREFIX/test\n",
"! gcloud storage ls $TRANSFORM_ARTIFACTS_DIR\n",
"! gcloud storage ls {EXPORTED_JSONL_PREFIX}*\n",
"! gcloud storage ls $EXPORTED_TFREC_PREFIX"
]
},
{
Expand Down Expand Up @@ -1588,7 +1588,7 @@
") as f:\n",
" json.dump(metadata, f)\n",
"\n",
"! gsutil cat $BUCKET_URI/metadata.jsonl"
"! gcloud storage cat $BUCKET_URI/metadata.jsonl"
]
},
{
Expand Down Expand Up @@ -1626,7 +1626,7 @@
" print(e)\n",
"\n",
" if \"BUCKET_URI\" in globals():\n",
" ! gsutil rm -r $BUCKET_URI"
" ! gcloud storage rm --recursive $BUCKET_URI"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION $BUCKET_URI"
"! gcloud storage buckets create --location $REGION $BUCKET_URI"
]
},
{
Expand All @@ -466,7 +466,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
"! gcloud storage ls --all-versions --long $BUCKET_URI"
]
},
{
Expand Down Expand Up @@ -1098,7 +1098,7 @@
},
"outputs": [],
"source": [
"! gsutil cp gs://cloud-ml-data/img/flower_photos/daisy/100080576_f52e8ee070_n.jpg test.jpg"
"! gcloud storage cp gs://cloud-ml-data/img/flower_photos/daisy/100080576_f52e8ee070_n.jpg test.jpg"
]
},
{
Expand Down Expand Up @@ -1296,7 +1296,7 @@
" f.write(\"\\n\")\n",
" json.dump(instances[0], f)\n",
"\n",
"! gsutil cp test.jsonl {BUCKET_URI}/test.jsonl"
"! gcloud storage cp test.jsonl {BUCKET_URI}/test.jsonl"
]
},
{
Expand Down Expand Up @@ -1459,7 +1459,7 @@
" print(e)\n",
"\n",
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
" ! gsutil rm -rf {BUCKET_URI}"
" ! gcloud storage rm --recursive --continue-on-error {BUCKET_URI}"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gcloud storage buckets create --location=$REGION --project=$PROJECT_ID $BUCKET_URI"
]
},
{
Expand All @@ -516,7 +516,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
"! gcloud storage ls --all-versions --long $BUCKET_URI"
]
},
{
Expand Down Expand Up @@ -687,8 +687,8 @@
"outputs": [],
"source": [
"%cd ..\n",
"!gsutil cp {LOCAL_MODEL_ARTIFACTS_DIR}/* {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/\n",
"!gsutil ls {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/"
"!gcloud storage cp {LOCAL_MODEL_ARTIFACTS_DIR}/* {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/\n",
"!gcloud storage ls {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/"
]
},
{
Expand Down Expand Up @@ -1809,7 +1809,7 @@
"delete_bucket = False\n",
"\n",
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
" ! gsutil rm -r $BUCKET_URI"
" ! gcloud storage rm --recursive $BUCKET_URI"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION -p $PROJECT_ID $BUCKET_URI"
"! gcloud storage buckets create --location=$REGION --project=$PROJECT_ID $BUCKET_URI"
]
},
{
Expand All @@ -510,7 +510,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_URI"
"! gcloud storage ls --all-versions --long $BUCKET_URI"
]
},
{
Expand Down Expand Up @@ -918,8 +918,8 @@
},
"outputs": [],
"source": [
"!gsutil cp -r {LOCAL_MODEL_ARTIFACTS_DIR}/* {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/\n",
"!gsutil ls {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/"
"!gcloud storage cp --recursive {LOCAL_MODEL_ARTIFACTS_DIR}/* {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/\n",
"!gcloud storage ls {BUCKET_URI}/{MODEL_ARTIFACT_DIR}/"
]
},
{
Expand Down Expand Up @@ -1869,7 +1869,7 @@
"delete_bucket = False\n",
"\n",
"if delete_bucket or os.getenv(\"IS_TESTING\"):\n",
" ! gsutil rm -r $BUCKET_URI"
" ! gcloud storage rm --recursive $BUCKET_URI"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION $BUCKET_NAME"
"! gcloud storage buckets create --location $REGION $BUCKET_NAME"
]
},
{
Expand All @@ -495,7 +495,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_NAME"
"! gcloud storage ls --all-versions --long $BUCKET_NAME"
]
},
{
Expand Down Expand Up @@ -917,7 +917,7 @@
"! rm -f custom.tar custom.tar.gz\n",
"! tar cvf custom.tar custom\n",
"! gzip custom.tar\n",
"! gsutil cp custom.tar.gz $BUCKET_NAME/trainer_cifar10.tar.gz"
"! gcloud storage cp custom.tar.gz $BUCKET_NAME/trainer_cifar10.tar.gz"
]
},
{
Expand Down Expand Up @@ -1544,7 +1544,7 @@
" print(e)\n",
"\n",
" if \"BUCKET_NAME\" in globals():\n",
" ! gsutil rm -r $BUCKET_NAME"
" ! gcloud storage rm --recursive $BUCKET_NAME"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
},
"outputs": [],
"source": [
"! gsutil mb -l $REGION $BUCKET_NAME"
"! gcloud storage buckets create --location=$REGION $BUCKET_NAME"
]
},
{
Expand All @@ -495,7 +495,7 @@
},
"outputs": [],
"source": [
"! gsutil ls -al $BUCKET_NAME"
"! gcloud storage ls --all-versions --long $BUCKET_NAME"
]
},
{
Expand Down Expand Up @@ -944,7 +944,7 @@
"! rm -f custom.tar custom.tar.gz\n",
"! tar cvf custom.tar custom\n",
"! gzip custom.tar\n",
"! gsutil cp custom.tar.gz $BUCKET_NAME/trainer_cifar10.tar.gz"
"! gcloud storage cp custom.tar.gz $BUCKET_NAME/trainer_cifar10.tar.gz"
]
},
{
Expand Down Expand Up @@ -1535,7 +1535,7 @@
" print(e)\n",
"\n",
" if \"BUCKET_NAME\" in globals():\n",
" ! gsutil rm -r $BUCKET_NAME"
" ! gcloud storage rm --recursive $BUCKET_NAME"
]
}
],
Expand Down
Loading