python/ray/ml/checkpoint.py
def _get_local_path(path: Optional[str]) -> Optional[str]:
    """Check if path is a local path. Otherwise return None."""
    if path is None or is_non_local_path_uri(path):
        return None
    if path.startswith("file://"):
        path = path[7:]
    if os.path.exists(path):
        return path
    return None
Check if path is a local path. Otherwise return None.
Check if path is a local path. Otherwise return None.
Check if path is a local path . Otherwise return None .
def _get_local_path(path: Optional[str]) -> Optional[str]:
    if path is None or is_non_local_path_uri(path):
        return None
    if path.startswith("file://"):
        path = path[7:]
    if os.path.exists(path):
        return path
    return None
def _get_local_path ( path : Optional [ str ] ) -> Optional [ str ] : if path is None or is_non_local_path_uri ( path ) : return None if path . startswith ( "file://" ) : path = path [ 7 : ] if os . path . exists ( path ) : return path return None
Check if path is a local path.
Check if path is a local path .
"""Check if path is a local path. Otherwise return None."""
path
Optional[str]