tensorflow/models · error · ValueError

Bucket path must be non-empty starting with 'gs://'

Error message

Bucket path must be non-empty starting with 'gs://'

What it means

Error "Bucket path must be non-empty starting with 'gs://'" thrown in tensorflow/models.

Source

Thrown at official/projects/waste_identification_ml/Deploy/pet_grading_cloud_deployment/inference_pipeline.py:151

          image=resized_image,
          state=state,
          detections=detections,
          source_frame_name=os.path.basename(image_path),
          crop_size=BOTTLE_EXTRACTION_CROP_SIZE,
          track_crop_records=batch_records,
      )

    yield batch_records


def main(_) -> None:
  if (
      not INPUT_DIRECTORY.value
      or not OUTPUT_DIRECTORY.value
      or not INPUT_DIRECTORY.value.startswith("gs://")
      or not OUTPUT_DIRECTORY.value.startswith("gs://")
  ):
    raise ValueError("Bucket path must be non-empty starting with 'gs://'")

  input_directory, prediction_folder, logger = (
      utils.setup_logger_and_directories(input_dir=INPUT_DIRECTORY.value)
  )

  checkpoint_path = os.path.join(prediction_folder, "prediction.csv")

  storage_manager = BigQueryManager(
      project_id=PROJECT_ID.value,
      dataset_id=BQ_DATASET_ID.value,
      table_id=BQ_TABLE_ID.value,
  )

  filepaths = utils.files_paths(os.path.basename(input_directory))
  num_batches = (len(filepaths) + BATCH_SIZE - 1) // BATCH_SIZE
  logger.info(
      f"Found {len(filepaths)} image files. Starting inference over"
      f" {num_batches} batches."

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/Deploy/pet_grading_cloud_deployment/inference_pipeline.py:151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/3e20c7107481b165. Report an issue: GitHub.