From 3b7c91097f6135d060d3cea3c436b15d629e81e7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:52:06 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dance/pipeline.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dance/pipeline.py b/dance/pipeline.py index 7b342ffc..27a8d677 100644 --- a/dance/pipeline.py +++ b/dance/pipeline.py @@ -1084,13 +1084,14 @@ def run_step3(root_path, evaluate_pipeline, step2_pipeline_planer: PipelinePlane pipeline_top_k = default(step2_pipeline_planer.config.pipeline_tuning_top_k, DEFAULT_PIPELINE_TUNING_TOP_K) step3_k = default(step2_pipeline_planer.config.parameter_tuning_freq_n, DEFAULT_PARAMETER_TUNING_FREQ_N) - # Skip some of the already run step3 because in pandas, when you sort columns with exactly the same values, the results are not random. + # Skip some of the already run step3 because in pandas, when you sort columns with exactly the same values, the results are not random. # Instead, pandas preserves the order of the original data. So we can skip it without causing any impact. - step3_start_k=default(step2_pipeline_planer.config.step3_start_k, 0) + step3_start_k = default(step2_pipeline_planer.config.step3_start_k, 0) #Some sweep_ids of step3 that have already been run - step3_sweep_ids=step2_pipeline_planer.config.step3_sweep_ids - step3_sweep_ids=[None] * len(pipeline_top_k) if step3_sweep_ids is None else (step3_sweep_ids + [None] * (pipeline_top_k - len(step3_sweep_ids))) - + step3_sweep_ids = step2_pipeline_planer.config.step3_sweep_ids + step3_sweep_ids = [None] * len(pipeline_top_k) if step3_sweep_ids is None else ( + step3_sweep_ids + [None] * (pipeline_top_k - len(step3_sweep_ids))) + for i in range(pipeline_top_k): if i < step3_start_k: continue