Skip to content

Conversation

@sujik18
Copy link
Member

@sujik18 sujik18 commented Jan 2, 2026

βœ… PR Checklist

  • Target branch is dev

πŸ“Œ Note: PRs must be raised against dev. Do not commit directly to main.

βœ… Testing & CI

  • Have tested the changes in my local environment, else have properly conveyed in the PR description
  • The change includes a GitHub Action to test the script(if it is possible to be added).
  • No existing GitHub Actions are failing because of this change.

πŸ“š Documentation

  • README or help docs are updated for new features or changes.
  • CLI help messages are meaningful and complete.

πŸ“ File Hygiene & Output Handling

  • No unintended files (e.g., logs, cache, temp files, pycache, output folders) are committed.

πŸ›‘οΈ Safety & Security

  • No secrets or credentials are committed.
  • Paths, shell commands, and environment handling are safe and portable.

πŸ™Œ Contribution Hygiene

  • PR title and description are concise and clearly state the purpose of the change.
  • Related issues (if any) are properly referenced using Fixes # or Closes #.
  • All reviewer feedback has been addressed.

Fixes #209
Logs:

(mlcflow) sujith@ideapad-g3:~$ mlc pull repo mlcommons@mlperf-automations -v
[2026-01-02 22:35:18,593 repo_action.py:368 INFO] - Repository mlperf-automations already exists at /home/sujith/MLC/repos/mlcommons@mlperf-automations. Checking for local changes...
[2026-01-02 22:35:18,656 repo_action.py:379 INFO] - No local changes detected. Pulling latest changes...
Already up to date.
[2026-01-02 22:35:20,422 repo_action.py:381 INFO] - Repository successfully pulled.
[2026-01-02 22:35:20,422 repo_action.py:395 INFO] - Registering the repo in repos.json
[2026-01-02 22:35:20,424 repo_action.py:168 INFO] - Added new repo path: /home/sujith/MLC/repos/mlcommons@mlperf-automations
[2026-01-02 22:35:20,425 repo_action.py:173 DEBUG] - Forcing Index rebuild ...
[2026-01-02 22:35:20,427 index.py:32 DEBUG] - Repos path for Index: /home/sujith/MLC/repos
[2026-01-02 22:35:20,427 index.py:187 DEBUG] - repos.json modified. Clearing index ........
[2026-01-02 22:35:23,966 index.py:285 DEBUG] - Changes detected, saving updated index and modified times.
[2026-01-02 22:35:23,979 repo_action.py:197 DEBUG] - repos.json and index file has been updated
(mlcflow) sujith@ideapad-g3:~$ 

@sujik18 sujik18 requested a review from a team as a code owner January 2, 2026 17:07
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ βœ…

repos.append(Repo(path=p, meta=meta))

# rebuild index via constructor
Index(self.repos_path, repos)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are building the index for all the repos here right? So, if a repo has a dependency we'll rebuild the index twice right? Is it possible to rebuild the index per repo? And we also need to fix the index on unregister_repo right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are building the index for all the repos here right? So, if a repo has a dependency we'll rebuild the index twice right? Is it possible to rebuild the index per repo?

I think that would require refactoring of index.py and all the places where Index class is being accessed, because currently index gets build whenever Index class is being accessed as build_index() is called in init function of Index class.

And we also need to fix the index on unregister_repo right?

If we intend to continue script execution after unregister_repo then yes we would need that, but I guess ideally that wont be the case and otherwise whenever the next time a mlc command is run which access Index class, index will be forcefully rebuilded as it will pickup that repo.json is modified

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujik18 we can have a custom update function in the Index class to selectively update the entries for a given repo right?

The requirement for handling unregister_repo is when we do pull or a MLC repo which has a fork already registered in mlcflow. Then mlcflow automatically unregisters the fork and pull the new one. But here, the Index entries may not be consistent anymore.

Copy link
Member Author

@sujik18 sujik18 Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requirement for handling unregister_repo is when we do pull or a MLC repo which has a fork already registered in mlcflow. Then mlcflow automatically unregisters the fork and pull the new one. But here, the Index entries may not be consistent anymore.

@arjunsuresh I have added a remove_repo_from_index function to remove index entries of a repo when the repo is deleted, currently called only in mlc rm command, if it looks good same function can be reused to update index entries while unregistering a repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants