File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/plugins/intel_cpu/tools/commit_slider/utils Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -137,21 +137,21 @@ def getBlobDiff(file1, file2):
137137 content = file .readlines ()
138138 with open (file2 ) as sampleFile :
139139 sampleContent = sampleFile .readlines ()
140- # ignore first line with memory address
141- i = - 1
142140 curMaxDiff = 0
143- for sampleLine in sampleContent :
144- i = i + 1
141+ for i , sampleLine in enumerate (sampleContent ):
142+ if i == 0 :
143+ # ignore first line with memory address
144+ continue
145145 if i >= len (sampleContent ):
146146 break
147147 line = content [i ]
148+ if "nan" in sampleLine .lower () or "nan" in line .lower ():
149+ import sys
150+ return sys .float_info .max
148151 sampleVal = 0
149152 val = 0
150- try :
151- sampleVal = float (sampleLine )
152- val = float (line )
153- except ValueError :
154- continue
153+ sampleVal = float (sampleLine )
154+ val = float (line )
155155 if val != sampleVal :
156156 curMaxDiff = max (curMaxDiff , abs (val - sampleVal ))
157157 return curMaxDiff
You can’t perform that action at this time.
0 commit comments