From 5ae2a9f3f3a703b32bad6f74f57038d5cdf9ad10 Mon Sep 17 00:00:00 2001 From: anandhu-eng Date: Wed, 9 Apr 2025 14:26:47 +0530 Subject: [PATCH] Handle situation when cache is not present --- .../clean-nvidia-mlperf-inference-scratch-space/customize.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py index ce054e99c..83f1d2ed0 100644 --- a/script/clean-nvidia-mlperf-inference-scratch-space/customize.py +++ b/script/clean-nvidia-mlperf-inference-scratch-space/customize.py @@ -37,7 +37,9 @@ def preprocess(i): r = mlc_cache.access({'action': 'rm', 'target': 'cache', 'tags': cache_rm_tags, 'f': True}) print(r) - if r['return'] != 0 and r['return'] != 16: # ignore missing ones + # Check if return code is 0 (success) + # currently, the warning code is not being checked as the possibility arises only for missing cache entry + if r['return'] != 0: return r if r['return'] == 0: # cache entry found if clean_cmd != '':