Edit on GitHub


Get a view of the MLEM project by listing all of its MLEM Objects

def ls(
    project: str = ".",
    rev: Optional[str] = None,
    fs: Optional[AbstractFileSystem] = None,
    type_filter: Union[
        Type[MlemObject], Iterable[Type[MlemObject]], None
    ] = None,
    include_links: bool = True,
) -> Dict[Type[MlemObject], List[MlemObject]]


from mlem.api import ls

objects = ls(".", rev=None, type_filter=None, include_links=True)


Populates a dictionary where keys are different types of MlemObjects and values are a collection of MlemObjects of that type. This API is internally used by the CLI command list.


  • project (required) - Path or URL to project
  • rev (optional) - revision, could be Git commit SHA, branch name or tag.
  • fs (optional) - filesystem to load from. If not provided, will be inferred from project
  • type_filter (optional) - type of objects to be listed (eg: models / dataset / etc.)
  • include_links (optional) - whether to include links while fetching the list of MlemObjects. Defaults to True




from mlem.api import ls

objects = ls(".")

­čÉŤ Found an issue? Let us know! Or fix it:

Edit on GitHub

ÔŁô Have a question? Join our chat, we will help you:

Discord Chat