@@ -64,6 +64,7 @@ type ResultsJSONBenchmark struct {
6464 Limit int `json:"limit"`
6565 ImportTime float64 `json:"importTime"`
6666 RunID string `json:"run_id"`
67+ IterationRunID string `json:"iteration"`
6768 Dataset string `json:"dataset_file"`
6869 Recall float64 `json:"recall"`
6970 NDCG float64 `json:"ndcg"`
@@ -713,7 +714,7 @@ func parseEfValues(s string) ([]int, error) {
713714}
714715
715716func runQueries (cfg * Config , importTime time.Duration , testData [][]float32 , neighbors [][]int , filters []int ) {
716- baseRunID := strconv .FormatInt (time .Now ().Unix (), 10 )
717+ runID := strconv .FormatInt (time .Now ().Unix (), 10 )
717718
718719 efCandidates , err := parseEfValues (cfg .EfArray )
719720 if err != nil {
@@ -742,13 +743,9 @@ func runQueries(cfg *Config, importTime time.Duration, testData [][]float32, nei
742743 }
743744
744745 iteration ++
745- runID := fmt .Sprintf ("%s-%d" , baseRunID , iteration )
746+ iterationRunID := fmt .Sprintf ("%d" , iteration )
746747 isFinalIteration := ! cfg .WaitForBackground || shouldStop
747748
748- if isFinalIteration {
749- runID = fmt .Sprintf ("%s-true" , runID )
750- }
751-
752749 benchmarkResultsMap := make ([]map [string ]interface {}, 0 , len (efCandidates ))
753750 for _ , ef := range efCandidates {
754751 updateEf (ef , cfg , client )
@@ -797,6 +794,7 @@ func runQueries(cfg *Config, importTime time.Duration, testData [][]float32, nei
797794 Limit : cfg .Limit ,
798795 ImportTime : importTime .Seconds (),
799796 RunID : runID ,
797+ IterationRunID : iterationRunID ,
800798 Dataset : dataset ,
801799 NDCG : result .NDCG ,
802800 Recall : result .Recall ,
@@ -862,9 +860,9 @@ func shouldStopRunQueries(iteration int, cfg *Config) bool {
862860 return false
863861 }
864862
865- metrics , err := readSPFreshMetrics (cfg )
863+ metrics , err := readHFreshMetrics (cfg )
866864 if err != nil {
867- log .WithError (err ).Warn ("Failed to read SPFresh pending operations metrics" )
865+ log .WithError (err ).Warn ("Failed to read HFresh pending operations metrics" )
868866 return false
869867 }
870868
@@ -875,16 +873,16 @@ func shouldStopRunQueries(iteration int, cfg *Config) bool {
875873 if noPendingOps {
876874 log .WithFields (log.Fields {
877875 "iteration" : iteration ,
878- }).Info ("All SPFresh background operations complete" )
876+ }).Info ("All HFresh background operations complete" )
879877 return true
880878 }
881879
882880 secs := 30
883881
884882 for {
885- metrics , err := readSPFreshMetrics (cfg )
883+ metrics , err := readHFreshMetrics (cfg )
886884 if err != nil {
887- log .WithError (err ).Warn ("Failed to read SPFresh pending operations metrics" )
885+ log .WithError (err ).Warn ("Failed to read HFresh pending operations metrics" )
888886 return false
889887 }
890888
@@ -893,7 +891,7 @@ func shouldStopRunQueries(iteration int, cfg *Config) bool {
893891 "pendingSplitOperations" : metrics .PendingSplitOperations ,
894892 "pendingMergeOperations" : metrics .PendingMergeOperations ,
895893 "pendingReassignOperations" : metrics .PendingReassignOperations ,
896- }).Info ("SPFresh background operations still running, checking again in " , secs , " seconds" )
894+ }).Info ("HFresh background operations still running, checking again in " , secs , " seconds" )
897895 noPendingOps := metrics .PendingSplitOperations == 0 &&
898896 metrics .PendingMergeOperations == 0 &&
899897 metrics .PendingReassignOperations == 0
@@ -1078,7 +1076,7 @@ func initAnnBenchmark() {
10781076 annBenchmarkCommand .PersistentFlags ().StringVar (& globalConfig .EfArray ,
10791077 "efArray" , "16,24,32,48,64,96,128,256,512" , "Array of ef parameters as comma separated list" )
10801078 annBenchmarkCommand .PersistentFlags ().StringVar (& globalConfig .IndexType ,
1081- "indexType" , "hnsw" , "Index type (hnsw, flat or spfresh )" )
1079+ "indexType" , "hnsw" , "Index type (hnsw, flat or hfresh )" )
10821080 annBenchmarkCommand .PersistentFlags ().IntVar (& globalConfig .MaxConnections ,
10831081 "maxConnections" , 16 , "Set Weaviate efConstruction parameter (default 16)" )
10841082 annBenchmarkCommand .PersistentFlags ().IntVar (& globalConfig .Shards ,
@@ -1142,13 +1140,13 @@ func initAnnBenchmark() {
11421140 annBenchmarkCommand .PersistentFlags ().StringVar (& globalConfig .Dataset ,
11431141 "dataset" , "" , "Dataset name e.g. dbpedia-openai-ada002-1536-float32-angular-100k" )
11441142 annBenchmarkCommand .PersistentFlags ().IntVar (& globalConfig .MaxPostingSize ,
1145- "maxPostingSize" , 0 , "Max posting size for SPFresh index (default 0)" )
1143+ "maxPostingSize" , 0 , "Max posting size for HFresh index (default 0)" )
11461144 annBenchmarkCommand .PersistentFlags ().IntVar (& globalConfig .MinPostingSize ,
1147- "minPostingSize" , 10 , "Min posting size for SPFresh index (default 10)" )
1145+ "minPostingSize" , 10 , "Min posting size for HFresh index (default 10)" )
11481146 annBenchmarkCommand .PersistentFlags ().IntVar (& globalConfig .Replicas ,
1149- "replicas" , 8 , "Number of replicas for SPFresh index (default 8)" )
1147+ "replicas" , 8 , "Number of replicas for HFresh index (default 8)" )
11501148 annBenchmarkCommand .PersistentFlags ().Float64Var (& globalConfig .RngFactor ,
1151- "rngFactor" , 10.0 , "RNG factor for SPFresh index (default 10.0)" )
1149+ "rngFactor" , 10.0 , "RNG factor for HFresh index (default 10.0)" )
11521150}
11531151
11541152func benchmarkANN (cfg Config , queries Queries , neighbors Neighbors , filters []int ) Results {
0 commit comments