Skip to content

Use search and not find in script module #162

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

Merged
merged 6 commits into from
Jan 27, 2025
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
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
Loading