diff --git a/predtuner/modeledapp.py b/predtuner/modeledapp.py index a5d904a6a4234be6a609afad16def14795f260b8..a66a1c03619fd3f1b747657aa9126269d2ff218a 100644 --- a/predtuner/modeledapp.py +++ b/predtuner/modeledapp.py @@ -449,6 +449,13 @@ class ApproxModeledTuner(ApproxTuner): f"No tuning session has been run; call self.tune() first." ) + # For empirical tuning there's no `validated_qos`. + # We first check, and if that's the case, we pass on to our parent class instead. + val_qos_nones = [conf.validated_qos is None for conf in self.kept_configs] + if any(val_qos_nones): + assert all(val_qos_nones) + return super().plot_configs(show_qos_loss, connect_best_points, False) + def get_points(confs, validated): def qos_speedup(conf): return conf.validated_qos if validated else conf.qos, conf.speedup