File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -227,22 +227,22 @@ def store_metadata_file(metadata_filename: str):
227227 hardware_description_string = "[" + hardware_description_string + "]"
228228 metadata ["operating_system" ] = os_string
229229 except :
230- hardware_description_string = "[ error retrieving hardware description]"
230+ hardware_description_string = '[" error retrieving hardware description"]'
231231 metadata ["operating_system" ] = "unidentified OS"
232232 metadata ["hardware" ] = dict (hardware_description = json .loads (hardware_description_string ))
233233
234234 # attempts to use nvidia-smi or rocm-smi if present
235235 device_query = {}
236236 try :
237237 device_query ["nvidia-smi" ] = get_device_query ("nvidia" )
238- except FileNotFoundError :
239- # ignore if nvidia-smi is not found
238+ except Exception :
239+ # ignore if nvidia-smi is not found, or parse error occurs
240240 pass
241241
242242 try :
243243 device_query ["rocm-smi" ] = get_device_query ("amd" )
244- except FileNotFoundError :
245- # ignore if rocm-smi is not found
244+ except Exception :
245+ # ignore if rocm-smi is not found, or parse error occurs
246246 pass
247247
248248 metadata ["environment" ] = dict (device_query = device_query , requirements = get_dependencies ())
You can’t perform that action at this time.
0 commit comments