From 40c20458d419f4f8c00922d1605a1bf4aaf108bc Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 25 Feb 2025 03:44:24 +0530 Subject: [PATCH 1/6] Revert parent assignment in access function --- mlc/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlc/action.py b/mlc/action.py index 087fb729f..0a2eb6a21 100644 --- a/mlc/action.py +++ b/mlc/action.py @@ -48,7 +48,7 @@ def access(self, options): action_target_split = action_target.split(",") action_target = action_target_split[0] - action = get_action(action_target, self.parent if self.parent else self) + action = get_action(action_target, self) if action and hasattr(action, action_name): # Find the method and call it with the options From 551097ce5d0bbc5ff87940ebd84be1a83a7a976e Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 25 Feb 2025 03:44:38 +0530 Subject: [PATCH 2/6] Revert parent assignment in access function --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5ef1b87f0..ab9a5487d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "mlcflow" -version = "1.0.5" +version = "1.0.7" description = "An automation interface for ML applications" authors = [ { name = "MLCommons", email = "systems@mlcommons.org" } From 5242a5383d0b2a291c6c5e2bb66fca30919890aa Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 25 Feb 2025 03:49:58 +0530 Subject: [PATCH 3/6] Revert parent assignment in access function --- mlc/action_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlc/action_factory.py b/mlc/action_factory.py index fa930d206..a6deea272 100644 --- a/mlc/action_factory.py +++ b/mlc/action_factory.py @@ -5,7 +5,7 @@ # Factory to get the appropriate action class def get_action(target, parent): - action_class = actions.get(target) + action_class = actions.get(target, parent) return action_class(parent) if action_class else None actions = { From 0827fb2f98a28f1696884a7dbcf3c86e00f3f45a Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 25 Feb 2025 04:03:50 +0530 Subject: [PATCH 4/6] Fix parent assignment in access function --- mlc/action.py | 2 +- mlc/action_factory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mlc/action.py b/mlc/action.py index 0a2eb6a21..087fb729f 100644 --- a/mlc/action.py +++ b/mlc/action.py @@ -48,7 +48,7 @@ def access(self, options): action_target_split = action_target.split(",") action_target = action_target_split[0] - action = get_action(action_target, self) + action = get_action(action_target, self.parent if self.parent else self) if action and hasattr(action, action_name): # Find the method and call it with the options diff --git a/mlc/action_factory.py b/mlc/action_factory.py index a6deea272..fa930d206 100644 --- a/mlc/action_factory.py +++ b/mlc/action_factory.py @@ -5,7 +5,7 @@ # Factory to get the appropriate action class def get_action(target, parent): - action_class = actions.get(target, parent) + action_class = actions.get(target) return action_class(parent) if action_class else None actions = { From 7c44208be01b0b4d18481bae14ab4a2f40f68bb0 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Tue, 25 Feb 2025 04:28:59 +0530 Subject: [PATCH 5/6] Do a file save for index updates --- mlc/index.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mlc/index.py b/mlc/index.py index b1db888b9..2e6abbeff 100644 --- a/mlc/index.py +++ b/mlc/index.py @@ -48,6 +48,7 @@ def add(self, meta, folder_type, path, repo): "path": path, "repo": repo }) + self._save_indices() def get_index(self, folder_type, uid): for index in range(len(self.indices[folder_type])): @@ -71,6 +72,7 @@ def update(self, meta, folder_type, path, repo): "path": path, "repo": repo } + self._save_indices() def rm(self, meta, folder_type, path): uid = meta['uid'] @@ -79,6 +81,7 @@ def rm(self, meta, folder_type, path): logger.warning(f"Index is not having the {folder_type} item {path}") else: del(self.indices[folder_type][index]) + self._save_indices() def build_index(self): """ From f0742b237a35ea2f43b023fad5f0527acb1ea826 Mon Sep 17 00:00:00 2001 From: Arjun Suresh Date: Sat, 8 Mar 2025 18:01:16 +0000 Subject: [PATCH 6/6] Update repo_action.py | Support recursive pull of not github based repos --- mlc/repo_action.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlc/repo_action.py b/mlc/repo_action.py index 677fc2495..491fa334d 100644 --- a/mlc/repo_action.py +++ b/mlc/repo_action.py @@ -296,8 +296,8 @@ def pull(self, run_args): repo_url = run_args.get('repo', run_args.get('url', 'repo')) if not repo_url or repo_url == "repo": for repo_object in self.repos: - repo_folder_name = os.path.basename(repo_object.path) - if "@" in repo_folder_name: + if os.path.exists(os.path.join(repo_object.path, ".git")): + repo_folder_name = os.path.basename(repo_object.path) res = self.pull_repo(repo_folder_name) if res['return'] > 0: return res