Skip to content

Commit 656a45e

Browse files
Merge pull request #76 from gurusai-voleti/br_4308
removed model_garden folder changes
2 parents 3292f95 + 750f261 commit 656a45e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

notebooks/community/model_garden/model_garden_jax_paligemma_finetuning.ipynb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,11 @@
461461
"temp_dir = tempfile.TemporaryDirectory()\n",
462462
"local_metrics_path = os.path.join(temp_dir.name, metrics_file_name)\n",
463463
"\n",
464-
"! gcloud storage cp $metrics_path $local_metrics_path\n",
464+
"! gsutil cp $metrics_path $local_metrics_path\n",
465465
"\n",
466466
"steps = []\n",
467467
"training_losses = []\n",
468-
"with open(local_metrics_path) as f:\n",
468+
"with open(local_metrics_path, \"r\") as f:\n",
469469
" for line in f:\n",
470470
" metric = json.loads(line)\n",
471471
" steps.append(metric[\"step\"])\n",
@@ -507,9 +507,9 @@
507507
"\n",
508508
"local_last_checkpoint_path = os.path.join(temp_dir.name, last_checkpoint_file_name)\n",
509509
"\n",
510-
"! gcloud storage cp $last_checkpoint_path $local_last_checkpoint_path\n",
510+
"! gsutil cp $last_checkpoint_path $local_last_checkpoint_path\n",
511511
"\n",
512-
"with open(local_last_checkpoint_path) as f:\n",
512+
"with open(local_last_checkpoint_path, \"r\") as f:\n",
513513
" final_checkpoint_name = \"checkpoint.bv-\" + f.read()\n",
514514
" checkpoint_path = os.path.join(finetune_output_dir, final_checkpoint_name)\n",
515515
"\n",
@@ -633,9 +633,7 @@
633633
"\n",
634634
"# @markdown <img src=\"https://storage.googleapis.com/longcap100/91.jpeg\" width=\"400\" >\n",
635635
"\n",
636-
"image_url = (\n",
637-
" \"https://storage.googleapis.com/longcap100/91.jpeg\" # @param {type:\"string\"}\n",
638-
")\n",
636+
"image_url = \"https://storage.googleapis.com/longcap100/91.jpeg\" # @param {type:\"string\"}\n",
639637
"\n",
640638
"language_code = \"en\" # @param {type: \"string\"}\n",
641639
"\n",
@@ -695,7 +693,7 @@
695693
"\n",
696694
"delete_bucket = False # @param {type:\"boolean\"}\n",
697695
"if delete_bucket:\n",
698-
" ! gcloud storage rm --recursive $BUCKET_NAME"
696+
" ! gsutil -m rm -r $BUCKET_NAME"
699697
]
700698
}
701699
],

0 commit comments

Comments
 (0)