From 207433eb307c1e53543bb73081595f52d718544e Mon Sep 17 00:00:00 2001
From: Yifan Zhao <yifanz16@illinois.edu>
Date: Thu, 8 Apr 2021 03:05:01 -0500
Subject: [PATCH] Updated example

---
 examples/tune_vgg16_cifar10.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/tune_vgg16_cifar10.py b/examples/tune_vgg16_cifar10.py
index ce8e5a8..63f0305 100644
--- a/examples/tune_vgg16_cifar10.py
+++ b/examples/tune_vgg16_cifar10.py
@@ -42,10 +42,11 @@ baseline, _ = app.measure_qos_cost({}, False)
 # Get a tuner object and start tuning!
 tuner = app.get_tuner()
 tuner.tune(
-    max_iter=500,  # TODO: In practice, use at least 5000, or 10000
-    qos_tuner_threshold=2.1,  # QoS threshold to guide tuner into
+    max_iter=1000,  # TODO: In practice, use at least 5000, or 10000
+    qos_tuner_threshold=2.0,  # QoS threshold to guide tuner into
     qos_keep_threshold=3.0,  # QoS threshold for which we actually keep the configurations
     is_threshold_relative=True,  # Thresholds are relative to baseline -- baseline_acc - 2.1
+    take_best_n=20,  # Take the best 20 configs (not just the "strictly" best ones)
     cost_model="cost_linear",  # Use linear performance predictor
     qos_model="qos_p1",  # Use P1 QoS predictor
 )
-- 
GitLab