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/Triton_TF_Cloud_Deployment/client/inference_pipeline.py:125

AREA_THRESHOLD = None
HEIGHT_TRACKING = 300
WIDTH_TRACKING = 300
CIRCLE_RADIUS = 7
FONT = cv2.FONT_HERSHEY_SIMPLEX
FONTSCALE = 1
COLOR = (255, 0, 0)


def main(_) -> None:
  # Check if the input and output directories are valid.
  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://'")

  # Copy the images folder from GCP to the present directory.
  input_directory = (INPUT_DIRECTORY.value).rstrip("/\\")
  command = f"gsutil -m cp -r {input_directory} ."
  subprocess.run(command, shell=True, check=True)

  # Create a folder to store the predictions.
  prediction_folder = os.path.basename(input_directory) + "_prediction"
  os.makedirs(prediction_folder, exist_ok=True)

  # Create a log directory and a logger for logging.
  log_name = os.path.basename(INPUT_DIRECTORY.value)
  log_folder = os.path.join(os.getcwd(), "logs")
  os.makedirs(log_folder, exist_ok=True)
  logger = utils.create_log_file(log_name, log_folder)

  # Read the labels which the model is trained on.
  labels_path = os.path.join(os.getcwd(), "labels.csv")

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/Triton_TF_Cloud_Deployment/client/inference_pipeline.py:125 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/1afb3c387ab6342f. Report an issue: GitHub.