Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/test-mlc-core-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,15 @@ jobs:
run: |
mlc pull repo mlcommons@mlperf-automations --checkout=dev

- name: Test for rm cache - invalid cache entry tags(test succeeds if command fails)
run: |
! mlc rm cache --tags=sample,invalid,tags

- name: Test for rm cache when the cache folder is empty(only for mlc rm cache without specifying particular script)
run: |
mlc rm cache -f
mlc rm cache -f

- name: Run tests from test-mlc-access.py
run: |
cd .github/scripts && python -c "import test_mlc_access as test; test.run_tests()"
Expand Down
7 changes: 6 additions & 1 deletion mlc/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,12 @@ def rm(self, i):
return res

if len(res['list']) == 0:
return {'return': 16, 'error': f'No {target_name} found for {inp}'}
# Do not error out if fetch_all is used
if inp["fetch_all"] == True:
logger.warning(f"{target_name} is empty! nothing to be cleared!")
return {"return": 0}
else:
return {'return': 16, 'error': f'No {target_name} found for {inp}'}
elif len(res['list']) > 1:
logger.info(f"More than 1 {target_name} found for {inp}:")
if not i.get('all'):
Expand Down
Loading