def gcs_option(args, run):
    """Add a Google Cloud Storage File observer to the experiment.

    The argument value should be `gs://<bucket>/path/to/exp`.
    """
    match_obj = re.match(r"gs:\/\/([^\/]*)\/(.*)", args)
    if match_obj is None or len(match_obj.groups()) != 2:
        raise ValueError(
            "Valid bucket specification not found. "
            "Enter bucket and directory path like: "
            "gs://<bucket>/path/to/exp"
        )
    bucket, basedir = match_obj.groups()
    run.observers.append(GoogleCloudStorageObserver(bucket=bucket, basedir=basedir))
Add a Google Cloud Storage File observer to the experiment.

    The argument value should be `gs://<bucket>/path/to/exp`.
    
sacred/observers/gcs_observer.py