ation:

from zenml.enums import StackComponentTypefrom zenml.stack import StackComponent, StackComponentConfig

PathType = Union[bytes, str]

class BaseArtifactStoreConfig(StackComponentConfig):

"""Config class for `BaseArtifactStore`."""

path: str

SUPPORTED_SCHEMES: ClassVar[Set[str]]

class BaseArtifactStore(StackComponent):

"""Base class for all ZenML artifact stores."""

@abstractmethod

def open(self, name: PathType, mode: str = "r") -> Any:

"""Open a file at the given path."""

@abstractmethod

def copyfile(

self, src: PathType, dst: PathType, overwrite: bool = False

) -> None:

"""Copy a file from the source to the destination."""

@abstractmethod

def exists(self, path: PathType) -> bool:

"""Returns `True` if the given path exists."""

@abstractmethod

def glob(self, pattern: PathType) -> List[PathType]:

"""Return the paths that match a glob pattern."""

@abstractmethod

def isdir(self, path: PathType) -> bool:

"""Returns whether the given path points to a directory."""

@abstractmethod

def listdir(self, path: PathType) -> List[PathType]:

"""Returns a list of files under a given directory in the filesystem."""

@abstractmethod

def makedirs(self, path: PathType) -> None:

"""Make a directory at the given path, recursively creating parents."""

@abstractmethod

def mkdir(self, path: PathType) -> None:

"""Make a directory at the given path; parent directory must exist."""

@abstractmethod

def remove(self, path: PathType) -> None:

"""Remove the file at the given path. Dangerous operation."""

@abstractmethod

def rename(

self, src: PathType, dst: PathType, overwrite: bool = False

) -> None:

"""Rename source file to destination file."""

@abstractmethod

def rmtree(self, path: PathType) -> None:

"""Deletes dir recursively. Dangerous operation."""

@abstractmethod

def stat(self, path: PathType) -> Any:

"""Return the stat descriptor for a given file path."""

@abstractmethod

def walk(

self,

top: PathType,

topdown: bool = True,

onerror: Optional[Callable[..., None]] = None,