Closed brainie closed 3 years ago
Seems like the error occurs when you were using parse_test_res.py
(more details would be helpful)? Take a look into the code, especially on where the error happens so you can know where you did it wrong
Looking through the code, I found this
metric1 = {
'name': 'accuracy',
'regex': re.compile(r'\* accuracy: ([\.\deE+-]+)%')
}
metric2 = {
'name': 'error',
'regex': re.compile(r'\* error: ([\.\deE+-]+)%')
}
Turns out that inside parse_function
, the regex isn't matched with what is in the log.txt
. This makes it not populate the output variable of the code shown below.
for metric in metrics:
match = metric['regex'].search(line)
if match and good_to_go:
print("good_to_go")
if 'file' not in output:
output['file'] = fpath
num = float(match.group(1))
name = metric['name']
output[name] = num
What am I doing wrong?
Good morning. Please i was trying to explore the semi supervised domain Generalization. I have followed the readme file to the last line but it came out with this line
Parsing files in output/ssdg_pacs/nlab_210/StyleMatch/resnet18/v1/art_painting Traceback (most recent call last): File "parse_test_res.py", line 188, in
main(args, end_signal)
File "parse_test_res.py", line 147, in main
end_signal=end_signal
File "parse_test_res.py", line 97, in parse_function
assert len(outputs) > 0, f'Nothing found in {directory}'
AssertionError: Nothing found in output/ssdg_pacs/nlab_210/StyleMatch/resnet18/v1/art_painting
Please what can i do?