Skip to content

Commit df20d33

Browse files
authored
Fix Hypertune _parse_hypertune_token (#3492)
* fix Hypertune _parse_hypertune_token * Fix Hypertune _parse_hypertune_token
1 parent 3049c78 commit df20d33

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

examples/cpu/features/hypertune/resnet50.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ def inference(model, data):
2121
latency = duration / measure_iter
2222
throughput = measure_iter / duration
2323

24-
print(
25-
"@hypertune {'name': 'latency (ms)'}"
26-
) # Add print statement of the form @hypertune {'name': str, 'higher_is_better': bool, 'target_val': int or float}`
27-
print(
28-
latency
29-
) # Print the objective(s) you want to optimize. Make sure this is just an int or float to be minimzied or maximized.
24+
print("@hypertune {'name': 'latency (ms)'}")
25+
print(latency)
3026

3127

3228
def main(args):

intel_extension_for_pytorch/cpu/hypertune/example/resnet50.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,8 @@ def inference(model, data):
2121
latency = duration / measure_iter
2222
throughput = measure_iter / duration
2323

24-
print(
25-
"@hypertune {'name': 'latency (ms)'}"
26-
) # Add print statement of the form @hypertune {'name': str, 'higher_is_better': bool, 'target_val': int or float}`
27-
print(
28-
latency
29-
) # Print the objective(s) you want to optimize. Make sure this is just an int or float to be minimzied or maximized.
24+
print("@hypertune {'name': 'latency (ms)'}")
25+
print(latency)
3026

3127

3228
def main(args):

0 commit comments

Comments
 (0)