Skip to content

Commit

Permalink
Use search and not find in script module (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Jan 27, 2025
1 parent 606c2b6 commit 3657548
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: MLPerf Inference Nvidia implementations

on:
schedule:
- cron: "54 23 * * *" #to be adjusted
- cron: "50 17 * * *" #to be adjusted

jobs:
run_nvidia:
Expand Down
23 changes: 4 additions & 19 deletions automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,6 @@ def _run(self, i):
return {
'return': 1, 'error': 'Current directory "{}" is not writable - please change it'.format(os.getcwd())}

'''
# Check if has default config
r = self.action_object.access({'action': 'load',
'automation': 'cfg,88dce9c160324c5d',
'artifact': 'default'})
if r['return'] == 0:
config = r['config']
script_input = config.get('script', {})
if len(script_input) > 0:
utils.merge_dicts({'dict1': i, 'dict2': script_input})
'''
recursion_int = int(i.get('recursion_int', 0)) + 1

start_time = time.time()
Expand Down Expand Up @@ -469,8 +456,6 @@ def _run(self, i):
# manage OS environment
if len(self.os_info) == 0:
r = get_host_os_info()
# r = self.access({'action': 'get_host_os_info',
# 'automation': 'utils,dc2743f8450541e3'})
if r['return'] > 0:
return r

Expand Down Expand Up @@ -677,8 +662,8 @@ def _run(self, i):
recursion_spaces +
' - Searching for cached script outputs with the following tags: {}'.format(cache_tags_without_tmp_string))

search_cache = {'action': 'find',
'automation': self.meta['deps']['cache'],
search_cache = {'action': 'search',
'target_name': 'cache',
'tags': cache_tags_without_tmp_string}
rc = self.action_object.access(search_cache)
if rc['return'] > 0:
Expand Down Expand Up @@ -4905,8 +4890,8 @@ def find_cached_script(i):
recursion_spaces +
' - Searching for cached script outputs with the following tags: {}'.format(search_tags))

r = self_obj.action_object.access({'action': 'find',
'automation': self_obj.meta['deps']['cache'],
r = self_obj.action_object.access({'action': 'search',
'target_name': 'cache',
'tags': search_tags})
if r['return'] > 0:
return r
Expand Down

0 comments on commit 3657548

Please sign in to comment.