Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification Regarding RepoAction #51

Closed
Sid9993 opened this issue Feb 3, 2025 · 9 comments
Closed

Clarification Regarding RepoAction #51

Sid9993 opened this issue Feb 3, 2025 · 9 comments
Labels
question Further information is requested

Comments

@Sid9993
Copy link
Contributor

Sid9993 commented Feb 3, 2025

run_args.get('item', run_args.get('artifact'))

In this line, the keys item and artifact, are these passed when we call mlcflow functions from the script automation code.

@arjunsuresh
Copy link
Contributor

We normally don't call repo actions from script automation right? But, when we do we need to pass it.

@Sid9993
Copy link
Contributor Author

Sid9993 commented Feb 3, 2025

We normally don't call repo actions from script automation right? But, when we do we need to pass it.

Oh ok fine.
I would like to clarify the logic behind this find function in the RepoAction :
https://github.com/mlcommons/mlcflow/blob/23897070a011328190843104159a258d78ba866b/mlc/main.py#L939C5-L944C34

While I went through the code I found out that the command for finding the repo would be like :
find repo <repo_owner>@<repos_name>,<repo_uid>

Is this the right way to find the repo?

@arjunsuresh
Copy link
Contributor

arjunsuresh commented Feb 3, 2025

Actually we should support any identifier for a repo like below.

  1. <repo_owner>@<repos_name>
  2. <repo_url>
  3. <repo_uid>
  4. <repo_alias>
  5. <repo_alias>,<repo_uid>

@Sid9993
Copy link
Contributor Author

Sid9993 commented Feb 3, 2025

Actually we should support any identifier for a repo like below.

  1. <repo_owner>@<repos_name>
  2. <repo_url>
  3. <repo_uid>
  4. <repo_alias>
  5. <repo_alias>,<repo_uid>

Oh yes. Got it.
Thank You for the clarification.

@arjunsuresh arjunsuresh added the question Further information is requested label Feb 3, 2025
@anandhu-eng
Copy link
Contributor

Hi @arjunsuresh , is there any situation where a user tries the fifth option?

@Sid9993
Copy link
Contributor Author

Sid9993 commented Feb 4, 2025

elif repo_name == i.meta['alias']:

Suppose there is a scenario where I pull a forked repo and I find the same by using find repo <my_forked_repo_alias>. In that case, according to the above logic the alias in the meta.yaml file would be the original repo and not the forked one.
So I doubt whether that would result in a conflict while we use find repo command.

@arjunsuresh
Copy link
Contributor

Shouldn't cause a conflict as mlc pull repo will only register one repo and if a fork is pulled, the previous fork or the origin repo automatically gets unregistered.

@anandhu-eng
Copy link
Contributor

Hey folks,

I'm reopening this issue as we might have missed a tricky part while merging PR for mlc find repo.

here we have used repos_list which loads data from the function load_repos_and_meta. But for comparing the repo uid as well as alias, we are using repos variable that comes from Index class which only initialize at the beginning when calling mlc.

The above condition would be working without failures when we are using the pull and find as a seperate mlc command because the Index class gets initialized each time it is called, and the updation in repos.json would be reflected in repos variable.

For the situation where a person uses both pull and find action in same python script, this creates a problem as the Index class is not re-initialised. Example could be found in failed GitHub actions of this PR.

@anandhu-eng anandhu-eng reopened this Feb 12, 2025
@anandhu-eng
Copy link
Contributor

Closing this discussion as its been decided to not concentrate on repo modification actions through mlc access.

Feel free to reopen if you feel this feature is relevant to any of you use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

3 participants