diff --git a/python/mlcroissant/README.md b/python/mlcroissant/README.md index 0c23f5c5..e6912d9b 100644 --- a/python/mlcroissant/README.md +++ b/python/mlcroissant/README.md @@ -72,6 +72,12 @@ All tests can be run from the Makefile: make tests ``` +Note that `git lfs` should be installed to successfully pass all tests: + +```bash +git lfs install +``` + ## Design The most important modules in the library are: diff --git a/python/mlcroissant/mlcroissant/_src/core/git.py b/python/mlcroissant/mlcroissant/_src/core/git.py index ce6670f0..1367baa3 100644 --- a/python/mlcroissant/mlcroissant/_src/core/git.py +++ b/python/mlcroissant/mlcroissant/_src/core/git.py @@ -34,4 +34,10 @@ def download_git_lfs_file(file: Path): logging.info( "Downloading git-lfs file: %s in working dir: %s", fullpath, working_dir ) - repo.execute(["git", "lfs", "pull", "--include", fullpath]) + try: + repo.execute(["git", "lfs", "pull", "--include", fullpath]) + except deps.git.exc.GitCommandError as ex: + raise RuntimeError("Problem when launching `git lfs`. " + "Possible problems: Have you installed git lfs " + f"locally? Is '{fullpath}' a valid `git lfs` " + "repository?") from ex