Skip to content

Commit

Permalink
update step3 k
Browse files Browse the repository at this point in the history
  • Loading branch information
xingzhongyu committed Jun 8, 2024
1 parent 704d2b1 commit 671ffa2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dance/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,12 @@ 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)
step3_start_k=default(step2_pipeline_planer.config.step3_start_k, 0)
# 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.
for i in range(pipeline_top_k):
if i<step3_start_k:
continue
try:
pipeline_planer = PipelinePlaner.from_config_file(
f"{root_path}/config_yamls/{tune_mode}/{i}_test_acc_{tune_mode}_tuning_config.yaml")
Expand All @@ -1098,6 +1103,7 @@ def run_step3(root_path, evaluate_pipeline, step2_pipeline_planer: PipelinePlane
continue



# def get_params(preprocessing_pipeline:Pipeline,type,key,name):
# ans=[]
# pips=list(filter(lambda p: p.type==type, preprocessing_pipeline.config.pipeline))
Expand Down

0 comments on commit 671ffa2

Please sign in to comment.