diff --git a/examples/tune_vgg16_cifar10.py b/examples/tune_vgg16_cifar10.py index 9530bc0c66a38d2607a120dab7352d0988a669ce..1e6caa6ccc68abce58e316f24ec26943ac3e5458 100644 --- a/examples/tune_vgg16_cifar10.py +++ b/examples/tune_vgg16_cifar10.py @@ -47,6 +47,7 @@ tuner.tune( qos_keep_threshold=3.0, # QoS threshold for which we actually keep the thresholds is_threshold_relative=True, # Thresholds are relative to baseline -- baseline_acc - 2.1 cost_model="cost_linear", # Use linear performance predictor + qos_model="qos_p1", # Use P1 QoS predictor ) # Save configs here when you're done tuner.dump_configs("tuner_results/vgg16_cifar10_configs.json") diff --git a/predtuner/torchapp.py b/predtuner/torchapp.py index 33ceaad991b005d632b48497230ee28744c9b2df..dac293f4201fa5bc5930a32f846937f7643ddc4e 100644 --- a/predtuner/torchapp.py +++ b/predtuner/torchapp.py @@ -153,6 +153,7 @@ class TorchApp(ModeledApp, abc.ABC): target = move_to_device_recursively(target, self.device) qos = self.tensor_to_qos(tensor_output[begin:end], target) qoses.append(qos) + begin = end return self.combine_qos(np.array(qoses)) p1_storage = self.model_storage / "p1.pkl" if self.model_storage else None