python/ray/ml/checkpoint.py
def to_uri(self, uri: str) -> str:
        """Write checkpoint data to location URI (e.g. cloud storage).

        Args:
            uri (str): Target location URI to write data to.

        Returns:
            str: Cloud location containing checkpoint data.
        """
        if uri.startswith("file://"):
            local_path = uri[7:]
            return self.to_directory(local_path)

        if not is_non_local_path_uri(uri):
            raise RuntimeError(
                f"Cannot upload checkpoint to URI: Provided URI "
                f"does not belong to a registered storage provider: `{uri}`. "
                f"Hint: {fs_hint(uri)}"
            )

        with self.as_directory() as local_path:
            upload_to_uri(local_path=local_path, uri=uri)

        return uri
Write checkpoint data to location URI (e.g. cloud storage).

        Args:
            uri (str): Target location URI to write data to.

        Returns:
            str: Cloud location containing checkpoint data.
        
Write checkpoint data to location URI .
Write checkpoint data to location URI .
def to_uri(self, uri: str) -> str:
        if uri.startswith("file://"):
            local_path = uri[7:]
            return self.to_directory(local_path)
        if not is_non_local_path_uri(uri):
            raise RuntimeError(
                f"Cannot upload checkpoint to URI: Provided URI "
                f"does not belong to a registered storage provider: `{uri}`. "
                f"Hint: {fs_hint(uri)}"
            )
        with self.as_directory() as local_path:
            upload_to_uri(local_path=local_path, uri=uri)
        return uri
def to_uri ( self , uri : str ) -> str : if uri . startswith ( "file://" ) : local_path = uri [ 7 : ] return self . to_directory ( local_path ) if not is_non_local_path_uri ( uri ) : raise RuntimeError ( f"Cannot upload checkpoint to URI: Provided URI " f"does not belong to a registered storage provider: `{uri}`. " f"Hint: {fs_hint(uri)}" ) with self . as_directory ( ) as local_path : upload_to_uri ( local_path = local_path , uri = uri ) return uri
Write checkpoint data to location URI (e.g.
Write checkpoint data to location URI ( e . g .
"""Write checkpoint data to location URI (e.g. cloud storage).

        Args:
            uri (str): Target location URI to write data to.

        Returns:
            str: Cloud location containing checkpoint data.
        """
Cloud location containing checkpoint data.
Cloud location containing checkpoint data .
str
self
uri
str
Target location URI to write data to.
Target location URI to write data to .