{"record":{"id":"3e20c7107481b165","repo":"tensorflow/models","slug":"bucket-path-must-be-non-empty-starting-with-gs-3e20c7","errorCode":null,"errorMessage":"Bucket path must be non-empty starting with 'gs://'","messagePattern":"Bucket path must be non-empty starting with 'gs://'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/Deploy/pet_grading_cloud_deployment/inference_pipeline.py","lineNumber":151,"sourceCode":"          image=resized_image,\n          state=state,\n          detections=detections,\n          source_frame_name=os.path.basename(image_path),\n          crop_size=BOTTLE_EXTRACTION_CROP_SIZE,\n          track_crop_records=batch_records,\n      )\n\n    yield batch_records\n\n\ndef main(_) -> None:\n  if (\n      not INPUT_DIRECTORY.value\n      or not OUTPUT_DIRECTORY.value\n      or not INPUT_DIRECTORY.value.startswith(\"gs://\")\n      or not OUTPUT_DIRECTORY.value.startswith(\"gs://\")\n  ):\n    raise ValueError(\"Bucket path must be non-empty starting with 'gs://'\")\n\n  input_directory, prediction_folder, logger = (\n      utils.setup_logger_and_directories(input_dir=INPUT_DIRECTORY.value)\n  )\n\n  checkpoint_path = os.path.join(prediction_folder, \"prediction.csv\")\n\n  storage_manager = BigQueryManager(\n      project_id=PROJECT_ID.value,\n      dataset_id=BQ_DATASET_ID.value,\n      table_id=BQ_TABLE_ID.value,\n  )\n\n  filepaths = utils.files_paths(os.path.basename(input_directory))\n  num_batches = (len(filepaths) + BATCH_SIZE - 1) // BATCH_SIZE\n  logger.info(\n      f\"Found {len(filepaths)} image files. Starting inference over\"\n      f\" {num_batches} batches.\"","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/Deploy/pet_grading_cloud_deployment/inference_pipeline.py#L133-L169","documentation":"Error \"Bucket path must be non-empty starting with 'gs://'\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/Deploy/pet_grading_cloud_deployment/inference_pipeline.py:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}