@@ -53,7 +53,9 @@ def save_upload_results(
5353 }
5454 out .write (json .dumps (upload_stats , indent = 2 ))
5555
56- def run_experiment (self , dataset : Dataset , skip_upload : bool = False ):
56+ def run_experiment (
57+ self , dataset : Dataset , skip_upload : bool = False , skip_search : bool = False
58+ ):
5759 execution_params = self .configurator .execution_params (
5860 distance = dataset .config .distance , vector_size = dataset .config .vector_size
5961 )
@@ -77,14 +79,15 @@ def run_experiment(self, dataset: Dataset, skip_upload: bool = False):
7779 },
7880 )
7981
80- print ("Experiment stage: Search" )
81- for search_id , searcher in enumerate (self .searchers ):
82- search_params = {** searcher .search_params }
83- search_stats = searcher .search_all (
84- dataset .config .distance , reader .read_queries ()
85- )
86- self .save_search_results (
87- dataset .config .name , search_stats , search_id , search_params
88- )
82+ if not skip_search :
83+ print ("Experiment stage: Search" )
84+ for search_id , searcher in enumerate (self .searchers ):
85+ search_params = {** searcher .search_params }
86+ search_stats = searcher .search_all (
87+ dataset .config .distance , reader .read_queries ()
88+ )
89+ self .save_search_results (
90+ dataset .config .name , search_stats , search_id , search_params
91+ )
8992 print ("Experiment stage: Done" )
9093 print ("Results saved to: " , RESULTS_DIR )
0 commit comments