From 13641a003143814fa9b73403ec2e90cd71989bd1 Mon Sep 17 00:00:00 2001 From: Sam Porter <92305641+samdporter@users.noreply.github.com> Date: Mon, 8 Jun 2026 16:54:47 +0100 Subject: [PATCH] fix: make git cleanliness check look at parent repos to avoid errors when mlops not run from repo root --- mlops/Experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlops/Experiment.py b/mlops/Experiment.py index e8e56ff..eb904a2 100644 --- a/mlops/Experiment.py +++ b/mlops/Experiment.py @@ -96,7 +96,7 @@ def check_dirty(self) -> bool: :return: """ logger.debug('Comparing to remote git repository') - repo = Repo(self.project_path) + repo = Repo(self.project_path, search_parent_directories=True) head = repo.head.ref tracking = head.tracking_branch() local_commits_ahead_iter = head.commit.iter_items(repo, f'{tracking.path}..{head.path}')