Skip to content

Commit

Permalink
borrowing fixes from merge branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Aug 6, 2024
1 parent 6c90cc7 commit 478921c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def validateDlioWorkload(workload: dict, name: str):
return False

dlioWorkload = workload['dlioWorkload']
for requiredAttribute, _type in {
for requiredAttribute, expectedType in {
'numFilesTrain': int,
'recordLength': int,
'batchSizes': list,
Expand All @@ -32,10 +32,11 @@ def validateDlioWorkload(workload: dict, name: str):
f' {requiredAttribute} in it'
)
return False
if not type(dlioWorkload[requiredAttribute]) is _type:
if not type(dlioWorkload[requiredAttribute]) is expectedType:
print(
f'In {name}, dlioWorkload[{requiredAttribute}] is of type'
f' {type(dlioWorkload[requiredAttribute])}, not of type {_type} '
f' {type(dlioWorkload[requiredAttribute])}, expected:'
f' {expectedType} '
)
return False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def validateFioWorkload(workload: dict, name: str):
return False

fioWorkload = workload['fioWorkload']
for requiredAttribute, _type in {
for requiredAttribute, expectedType in {
'fileSize': str,
'blockSize': str,
'filesPerThread': int,
Expand All @@ -30,10 +30,11 @@ def validateFioWorkload(workload: dict, name: str):
if requiredAttribute not in fioWorkload:
print(f'In {name}, fioWorkload does not have {requiredAttribute} in it')
return False
if not type(fioWorkload[requiredAttribute]) is _type:
if not type(fioWorkload[requiredAttribute]) is expectedType:
print(
f'In {name}, fioWorkload[{requiredAttribute}] is of type'
f' {type(fioWorkload[requiredAttribute])}, not of type {_type} '
f' {type(fioWorkload[requiredAttribute])}, expected:'
f' {expectedType} '
)
return False

Expand Down

0 comments on commit 478921c

Please sign in to comment.