From 40026208ae7b5586f809a78697cd5c6a30ac7028 Mon Sep 17 00:00:00 2001 From: Zach Zhu Date: Tue, 24 Oct 2023 20:04:51 +0800 Subject: [PATCH] algo: no splitting error messages Signed-off-by: Zach Zhu --- algorithm/kapacity/portrait/horizontal/predictive/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/algorithm/kapacity/portrait/horizontal/predictive/main.py b/algorithm/kapacity/portrait/horizontal/predictive/main.py index 21884b0..268984d 100644 --- a/algorithm/kapacity/portrait/horizontal/predictive/main.py +++ b/algorithm/kapacity/portrait/horizontal/predictive/main.py @@ -137,12 +137,10 @@ def predict_replicas(args, metric_ctx, pred_traffics): int(args.re_time_delta_hours), int(args.re_test_dataset_size_in_seconds)) if 'NO_RESULT' in pred['rule_code'].unique(): - raise RuntimeError('there exist points that no replica number would meet the resource target, ' - 'please consider setting a more reasonable resource target') + raise RuntimeError('there exist points that no replica number would meet the resource target, please consider setting a more reasonable resource target') return pred except estimator.EstimationException as e: - raise RuntimeError("replicas estimation failed, this may be caused by" - "insufficient or irregular history data") from e + raise RuntimeError("replicas estimation failed, this may be caused by insufficient or irregular history data") from e def merge_history_dict(history_dict):