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

Fix for Issue #54 #81

Merged
merged 11 commits into from
Feb 13, 2025
Merged

Fix for Issue #54 #81

merged 11 commits into from
Feb 13, 2025

Conversation

anandhu-eng
Copy link
Contributor

No description provided.

@anandhu-eng anandhu-eng requested a review from a team as a code owner February 11, 2025 04:46
Copy link

github-actions bot commented Feb 11, 2025

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

mlc/main.py Outdated
if res["return"] > 0:
return res
logger.warning(f"{meta_yaml_path} not found. Could be due to accidental deletion of meta.yaml. Try to stash the changes or reclone by doing `rm repo` and `pull repo`. Skipping...")
# logger.warning(f"Deleting the {meta_yaml_path} entry from repos.json")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arjunsuresh , I have commented out this part as I'm not completely sure whether automatically deleting the repo is a good choice here. The repo is already registered, that means there should have been a meta.yaml in the beginning. So maybe one has accidentally deleted the yaml file or has checkout out to a branch in the same repository which does not have the meta.yml file.

Copy link
Contributor

Choose a reason for hiding this comment

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

In rm repo we are not physically deleting the repository right? In that case it is fine. Meanwhile it'll be good to add an explicit option for physically deleting the repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently the rm repo does the following things:

  • Deletes the repo folder if its present
  • Deletes the repo entry from repos.json

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Anandhu. So the commented code can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think its safe to remove. Have made changes in latest commit

@anandhu-eng anandhu-eng marked this pull request as draft February 11, 2025 14:08
- name: Test 21 - Test autoremoval of corrupt entries from repos.json while running a script
run: |
rm -r $HOME/MLC/repos/mlcommons@mlperf-automations
mlc run script --tags=detect,os
Copy link
Contributor

Choose a reason for hiding this comment

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

script automation won't exist after the previous removal right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad :)

In the latest commit, a new corrupt entry has been added manually using jq library.

@anandhu-eng anandhu-eng marked this pull request as ready for review February 12, 2025 06:00
@@ -195,3 +195,9 @@ jobs:
mlc list cache


- name: Test 21 - Test autoremoval of corrupt entries from repos.json while running a script
run: |
sudo apt-get install -y jq
Copy link
Contributor

Choose a reason for hiding this comment

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

Ubuntu only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently the test is covering only ubuntu. When I think about this, I'm getting four ways to proceed with this test.

  1. We could create a sample MLC repo , clone it and manually remove it which creates a corrupt entry.
  2. We could create a corrupt entry in the current way by using system libraries, but we might have to handle the os specific conditions.
  3. We could create a python file and simply call that file to modify the repos entry.
  4. We could create a helper function in mlc itself to proceed with this, but ig that would need some work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed test 21 as per latest discussion. Could add in future if needed

@arjunsuresh arjunsuresh merged commit e010075 into mlcommons:dev Feb 13, 2025
29 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants