Skip to content
Snippets Groups Projects
Commit 2477abd6 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Fixed a bug in qos computation with model p1

parent 8d344c4e
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ tuner.tune( ...@@ -47,6 +47,7 @@ tuner.tune(
qos_keep_threshold=3.0, # QoS threshold for which we actually keep the thresholds 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 is_threshold_relative=True, # Thresholds are relative to baseline -- baseline_acc - 2.1
cost_model="cost_linear", # Use linear performance predictor cost_model="cost_linear", # Use linear performance predictor
qos_model="qos_p1", # Use P1 QoS predictor
) )
# Save configs here when you're done # Save configs here when you're done
tuner.dump_configs("tuner_results/vgg16_cifar10_configs.json") tuner.dump_configs("tuner_results/vgg16_cifar10_configs.json")
......
...@@ -153,6 +153,7 @@ class TorchApp(ModeledApp, abc.ABC): ...@@ -153,6 +153,7 @@ class TorchApp(ModeledApp, abc.ABC):
target = move_to_device_recursively(target, self.device) target = move_to_device_recursively(target, self.device)
qos = self.tensor_to_qos(tensor_output[begin:end], target) qos = self.tensor_to_qos(tensor_output[begin:end], target)
qoses.append(qos) qoses.append(qos)
begin = end
return self.combine_qos(np.array(qoses)) return self.combine_qos(np.array(qoses))
p1_storage = self.model_storage / "p1.pkl" if self.model_storage else None p1_storage = self.model_storage / "p1.pkl" if self.model_storage else None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment