diff --git a/neurips23/README.md b/neurips23/README.md index 4ed8168b..e7ea4caf 100644 --- a/neurips23/README.md +++ b/neurips23/README.md @@ -46,8 +46,8 @@ The baselines were run on an Azure Standard D8lds v5 (8 vcpus, 16 GiB memory) ma |---------|-------------|-----------------------------|---------| |Sparse | Linear Scan | 101 | `python3 run.py --dataset sparse-full --algorithm linscan --neurips23track sparse` | |Filter | faiss | 3200 | `python3 run.py --dataset yfcc-10M --algorithm faiss --neurips23track filter` | -|Streaming| DiskANN | 0.924 (recall@10), 23 mins | `python3 run.py --dataset msturing-10M-clustered --algorithm diskann --neurips23track streaming --runbook_path neurips23/runbooks/streaming/delete_runbook.yaml` | -|Streaming| DiskANN | 0.883 (recall@10), 45 mins | `python3 run.py --dataset msturing-30M-clustered --algorithm diskann --neurips23track streaming --runbook_path neurips23/runbooks/streaming/final_runbook.yaml` | +|Streaming| DiskANN | 0.924 (recall@10), 23 mins | `python3 run.py --dataset msturing-10M-clustered --algorithm diskann --neurips23track streaming --runbook_path neurips23/streaming/runbooks/delete_runbook.yaml` | +|Streaming| DiskANN | 0.883 (recall@10), 45 mins | `python3 run.py --dataset msturing-30M-clustered --algorithm diskann --neurips23track streaming --runbook_path neurips23/streaming/runbooks/final_runbook.yaml` | |OOD | DiskANN | 4882 | `python3 run.py --dataset text2image-10M --algorithm diskann --neurips23track ood` | ## For_Participants @@ -99,7 +99,7 @@ Test the benchmark and baseline using the algorithm's definition file on small t python run.py --neurips23track filter --algorithm faiss --dataset random-filter-s python run.py --neurips23track sparse --algorithm linscan --dataset sparse-small python run.py --neurips23track ood --algorithm diskann --dataset random-xs -python run.py --neurips23track streaming --algorithm diskann --dataset random-xs --runbook_path neurips23/runbooks/streaming/simple_runbook.yaml +python run.py --neurips23track streaming --algorithm diskann --dataset random-xs --runbook_path neurips23/streaming/runbooks/simple_runbook.yaml ``` For the competition dataset, run commands mentioned in the table above, for example: @@ -108,22 +108,22 @@ python run.py --neurips23track filter --algorithm faiss --dataset yfcc-10M python run.py --neurips23track sparse --algorithm linscan --dataset sparse-full python run.py --neurips23track ood --algorithm diskann --dataset text2image-10M # preliminary runbook for testing -python run.py --neurips23track streaming --algorithm diskann --dataset msturing-10M-clustered --runbook_path neurips23/runbooks/streaming/delete_runbook.yaml +python run.py --neurips23track streaming --algorithm diskann --dataset msturing-10M-clustered --runbook_path neurips23/streaming/runbooks/delete_runbook.yaml #Final runbook for evaluation -python run.py --neurips23track streaming --algorithm diskann --dataset msturing-30M-clustered --runbook_path neurips23/runbooks/streaming/final_runbook.yaml +python run.py --neurips23track streaming --algorithm diskann --dataset msturing-30M-clustered --runbook_path neurips23/streaming/runbooks/final_runbook.yaml ``` For streaming track, runbook specifies the order of operations to be executed by the algorithms. To download the ground truth for every search operation: (needs azcopy tool in your binary path): ``` -python -m benchmark.streaming.download_gt --runbook_file neurips23/runbooks/streaming/simple_runbook.yaml --dataset msspacev-10M -python -m benchmark.streaming.download_gt --runbook_file neurips23/runbooks/streaming/delete_runbook.yaml --dataset msturing-10M-clustered -python -m benchmark.streaming.download_gt --runbook_file neurips23/runbooks/streaming/final_runbook.yaml --dataset msturing-30M-clustered +python -m benchmark.streaming.download_gt --runbook_file neurips23/streaming/runbooks/simple_runbook.yaml --dataset msspacev-10M +python -m benchmark.streaming.download_gt --runbook_file neurips23/streaming/runbooks/delete_runbook.yaml --dataset msturing-10M-clustered +python -m benchmark.streaming.download_gt --runbook_file neurips23/streaming/runbooks/final_runbook.yaml --dataset msturing-30M-clustered ``` Alternately, to compute ground truth for an arbitrary runbook, [clone and build DiskANN repo](https://github.com/Microsoft/DiskANN) and use the command line tool to compute ground truth at various search checkpoints. The `--gt_cmdline_tool` points to the directory with DiskANN commandline tools. ``` -python benchmark/streaming/compute_gt.py --dataset msspacev-10M --runbook neurips23/runbooks/streaming/simple_runbook.yaml --gt_cmdline_tool ~/DiskANN/build/apps/utils/compute_groundtruth +python benchmark/streaming/compute_gt.py --dataset msspacev-10M --runbook neurips23/streaming/runbooks/simple_runbook.yaml --gt_cmdline_tool ~/DiskANN/build/apps/utils/compute_groundtruth ``` -Consider also the examples in runbooks [here]]neurips23/runbooks/streaming/clustered_runbook.yaml) and [here](neurips23/runbooks/streaming/delete_runbook.yaml). The datasets here are [generated](neurips23/runbooks/streaming/clustered_data_gen.py) by clustering the original dataset with k-means and packing points in the same cluster into contiguous indices. Then insertions are then performed one cluster at a time. This runbook tests if an indexing algorithm can adapt to data draft. The `max_pts` entry for the dataset in the runbook indicates an upper bound on the number of active points that the index must support during the runbook execution. +Consider also the examples in runbooks [here]]neurips23/streaming/runbooks/clustered_runbook.yaml) and [here](neurips23/streaming/runbooks/delete_runbook.yaml). The datasets here are [generated](neurips23/streaming/runbooks/clustered_data_gen.py) by clustering the original dataset with k-means and packing points in the same cluster into contiguous indices. Then insertions are then performed one cluster at a time. This runbook tests if an indexing algorithm can adapt to data draft. The `max_pts` entry for the dataset in the runbook indicates an upper bound on the number of active points that the index must support during the runbook execution. To make the results available for post-processing, change permissions of the results folder diff --git a/neurips23/streaming/runbooks/gen_expiration_time_runbook.py b/neurips23/streaming/runbooks/gen_expiration_time_runbook.py index 2b9b7fd8..74952ee7 100644 --- a/neurips23/streaming/runbooks/gen_expiration_time_runbook.py +++ b/neurips23/streaming/runbooks/gen_expiration_time_runbook.py @@ -113,6 +113,15 @@ def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ra max_t = 350 gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, False) +ratios = (0, 4, 18) +timesteps = (0, 100, 20) +seed = 1232 +dataset_file = 'wikipedia-1M_expiration_time_runbook.yaml' +dataset_name = 'wikipedia-1M' +dataset_size = 1000000 +max_t = 100 +gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, False) + ratios = (0, 4, 18) timesteps = (0, 100, 20) seed = 809 diff --git a/neurips23/streaming/runbooks/wikipedia-1M_expiration_time_runbook.yaml b/neurips23/streaming/runbooks/wikipedia-1M_expiration_time_runbook.yaml new file mode 100644 index 00000000..fb5359f8 --- /dev/null +++ b/neurips23/streaming/runbooks/wikipedia-1M_expiration_time_runbook.yaml @@ -0,0 +1,842 @@ +wikipedia-1M: + 1: + end: 10000 + operation: insert + start: 0 + 2: + operation: search + 3: + end: 20000 + operation: insert + start: 10000 + 4: + operation: search + 5: + end: 30000 + operation: insert + start: 20000 + 6: + operation: search + 7: + end: 40000 + operation: insert + start: 30000 + 8: + operation: search + 9: + end: 50000 + operation: insert + start: 40000 + 10: + operation: search + 11: + end: 60000 + operation: insert + start: 50000 + 12: + operation: search + 13: + end: 70000 + operation: insert + start: 60000 + 14: + operation: search + 15: + end: 80000 + operation: insert + start: 70000 + 16: + operation: search + 17: + end: 90000 + operation: insert + start: 80000 + 18: + operation: search + 19: + end: 100000 + operation: insert + start: 90000 + 20: + operation: search + 21: + end: 110000 + operation: insert + start: 100000 + 22: + operation: search + 23: + end: 120000 + operation: insert + start: 110000 + 24: + operation: search + 25: + end: 130000 + operation: insert + start: 120000 + 26: + operation: search + 27: + end: 140000 + operation: insert + start: 130000 + 28: + operation: search + 29: + end: 150000 + operation: insert + start: 140000 + 30: + operation: search + 31: + end: 160000 + operation: insert + start: 150000 + 32: + operation: search + 33: + end: 170000 + operation: insert + start: 160000 + 34: + operation: search + 35: + end: 180000 + operation: insert + start: 170000 + 36: + operation: search + 37: + end: 190000 + operation: insert + start: 180000 + 38: + operation: search + 39: + end: 200000 + operation: insert + start: 190000 + 40: + operation: search + 41: + end: 210000 + operation: insert + start: 200000 + 42: + end: 10000 + operation: delete + start: 0 + 43: + operation: search + 44: + end: 220000 + operation: insert + start: 210000 + 45: + end: 20000 + operation: delete + start: 10000 + 46: + operation: search + 47: + end: 230000 + operation: insert + start: 220000 + 48: + end: 30000 + operation: delete + start: 20000 + 49: + operation: search + 50: + end: 240000 + operation: insert + start: 230000 + 51: + end: 40000 + operation: delete + start: 30000 + 52: + operation: search + 53: + end: 250000 + operation: insert + start: 240000 + 54: + end: 50000 + operation: delete + start: 40000 + 55: + operation: search + 56: + end: 260000 + operation: insert + start: 250000 + 57: + operation: search + 58: + end: 270000 + operation: insert + start: 260000 + 59: + end: 70000 + operation: delete + start: 60000 + 60: + operation: search + 61: + end: 280000 + operation: insert + start: 270000 + 62: + end: 80000 + operation: delete + start: 70000 + 63: + operation: search + 64: + end: 290000 + operation: insert + start: 280000 + 65: + end: 90000 + operation: delete + start: 80000 + 66: + operation: search + 67: + end: 300000 + operation: insert + start: 290000 + 68: + operation: search + 69: + end: 310000 + operation: insert + start: 300000 + 70: + operation: search + 71: + end: 320000 + operation: insert + start: 310000 + 72: + end: 120000 + operation: delete + start: 110000 + 73: + operation: search + 74: + end: 330000 + operation: insert + start: 320000 + 75: + operation: search + 76: + end: 340000 + operation: insert + start: 330000 + 77: + end: 140000 + operation: delete + start: 130000 + 78: + operation: search + 79: + end: 350000 + operation: insert + start: 340000 + 80: + end: 150000 + operation: delete + start: 140000 + 81: + operation: search + 82: + end: 360000 + operation: insert + start: 350000 + 83: + end: 160000 + operation: delete + start: 150000 + 84: + operation: search + 85: + end: 370000 + operation: insert + start: 360000 + 86: + operation: search + 87: + end: 380000 + operation: insert + start: 370000 + 88: + end: 180000 + operation: delete + start: 170000 + 89: + operation: search + 90: + end: 390000 + operation: insert + start: 380000 + 91: + end: 190000 + operation: delete + start: 180000 + 92: + operation: search + 93: + end: 400000 + operation: insert + start: 390000 + 94: + end: 200000 + operation: delete + start: 190000 + 95: + operation: search + 96: + end: 410000 + operation: insert + start: 400000 + 97: + end: 210000 + operation: delete + start: 200000 + 98: + operation: search + 99: + end: 420000 + operation: insert + start: 410000 + 100: + operation: search + 101: + end: 430000 + operation: insert + start: 420000 + 102: + end: 230000 + operation: delete + start: 220000 + 103: + operation: search + 104: + end: 440000 + operation: insert + start: 430000 + 105: + end: 240000 + operation: delete + start: 230000 + 106: + operation: search + 107: + end: 450000 + operation: insert + start: 440000 + 108: + end: 250000 + operation: delete + start: 240000 + 109: + operation: search + 110: + end: 460000 + operation: insert + start: 450000 + 111: + operation: search + 112: + end: 470000 + operation: insert + start: 460000 + 113: + end: 270000 + operation: delete + start: 260000 + 114: + operation: search + 115: + end: 480000 + operation: insert + start: 470000 + 116: + end: 280000 + operation: delete + start: 270000 + 117: + operation: search + 118: + end: 490000 + operation: insert + start: 480000 + 119: + end: 290000 + operation: delete + start: 280000 + 120: + operation: search + 121: + end: 500000 + operation: insert + start: 490000 + 122: + end: 300000 + operation: delete + start: 290000 + 123: + operation: search + 124: + end: 510000 + operation: insert + start: 500000 + 125: + end: 310000 + operation: delete + start: 300000 + 126: + operation: search + 127: + end: 520000 + operation: insert + start: 510000 + 128: + end: 320000 + operation: delete + start: 310000 + 129: + operation: search + 130: + end: 530000 + operation: insert + start: 520000 + 131: + end: 330000 + operation: delete + start: 320000 + 132: + operation: search + 133: + end: 540000 + operation: insert + start: 530000 + 134: + end: 340000 + operation: delete + start: 330000 + 135: + operation: search + 136: + end: 550000 + operation: insert + start: 540000 + 137: + end: 350000 + operation: delete + start: 340000 + 138: + operation: search + 139: + end: 560000 + operation: insert + start: 550000 + 140: + end: 360000 + operation: delete + start: 350000 + 141: + operation: search + 142: + end: 570000 + operation: insert + start: 560000 + 143: + operation: search + 144: + end: 580000 + operation: insert + start: 570000 + 145: + operation: search + 146: + end: 590000 + operation: insert + start: 580000 + 147: + end: 390000 + operation: delete + start: 380000 + 148: + operation: search + 149: + end: 600000 + operation: insert + start: 590000 + 150: + end: 400000 + operation: delete + start: 390000 + 151: + operation: search + 152: + end: 610000 + operation: insert + start: 600000 + 153: + end: 410000 + operation: delete + start: 400000 + 154: + operation: search + 155: + end: 620000 + operation: insert + start: 610000 + 156: + end: 420000 + operation: delete + start: 410000 + 157: + operation: search + 158: + end: 630000 + operation: insert + start: 620000 + 159: + end: 430000 + operation: delete + start: 420000 + 160: + operation: search + 161: + end: 640000 + operation: insert + start: 630000 + 162: + end: 440000 + operation: delete + start: 430000 + 163: + operation: search + 164: + end: 650000 + operation: insert + start: 640000 + 165: + end: 450000 + operation: delete + start: 440000 + 166: + operation: search + 167: + end: 660000 + operation: insert + start: 650000 + 168: + end: 460000 + operation: delete + start: 450000 + 169: + operation: search + 170: + end: 670000 + operation: insert + start: 660000 + 171: + end: 470000 + operation: delete + start: 460000 + 172: + operation: search + 173: + end: 680000 + operation: insert + start: 670000 + 174: + end: 480000 + operation: delete + start: 470000 + 175: + operation: search + 176: + end: 690000 + operation: insert + start: 680000 + 177: + end: 490000 + operation: delete + start: 480000 + 178: + operation: search + 179: + end: 700000 + operation: insert + start: 690000 + 180: + operation: search + 181: + end: 710000 + operation: insert + start: 700000 + 182: + operation: search + 183: + end: 720000 + operation: insert + start: 710000 + 184: + end: 520000 + operation: delete + start: 510000 + 185: + operation: search + 186: + end: 730000 + operation: insert + start: 720000 + 187: + operation: search + 188: + end: 740000 + operation: insert + start: 730000 + 189: + end: 540000 + operation: delete + start: 530000 + 190: + operation: search + 191: + end: 750000 + operation: insert + start: 740000 + 192: + operation: search + 193: + end: 760000 + operation: insert + start: 750000 + 194: + end: 560000 + operation: delete + start: 550000 + 195: + operation: search + 196: + end: 770000 + operation: insert + start: 760000 + 197: + end: 570000 + operation: delete + start: 560000 + 198: + operation: search + 199: + end: 780000 + operation: insert + start: 770000 + 200: + operation: search + 201: + end: 790000 + operation: insert + start: 780000 + 202: + end: 590000 + operation: delete + start: 580000 + 203: + operation: search + 204: + end: 800000 + operation: insert + start: 790000 + 205: + end: 600000 + operation: delete + start: 590000 + 206: + operation: search + 207: + end: 810000 + operation: insert + start: 800000 + 208: + end: 610000 + operation: delete + start: 600000 + 209: + operation: search + 210: + end: 820000 + operation: insert + start: 810000 + 211: + operation: search + 212: + end: 830000 + operation: insert + start: 820000 + 213: + end: 630000 + operation: delete + start: 620000 + 214: + operation: search + 215: + end: 840000 + operation: insert + start: 830000 + 216: + end: 640000 + operation: delete + start: 630000 + 217: + operation: search + 218: + end: 850000 + operation: insert + start: 840000 + 219: + end: 650000 + operation: delete + start: 640000 + 220: + operation: search + 221: + end: 860000 + operation: insert + start: 850000 + 222: + end: 660000 + operation: delete + start: 650000 + 223: + operation: search + 224: + end: 870000 + operation: insert + start: 860000 + 225: + operation: search + 226: + end: 880000 + operation: insert + start: 870000 + 227: + end: 680000 + operation: delete + start: 670000 + 228: + operation: search + 229: + end: 890000 + operation: insert + start: 880000 + 230: + end: 690000 + operation: delete + start: 680000 + 231: + operation: search + 232: + end: 900000 + operation: insert + start: 890000 + 233: + end: 700000 + operation: delete + start: 690000 + 234: + operation: search + 235: + end: 910000 + operation: insert + start: 900000 + 236: + end: 710000 + operation: delete + start: 700000 + 237: + operation: search + 238: + end: 920000 + operation: insert + start: 910000 + 239: + operation: search + 240: + end: 930000 + operation: insert + start: 920000 + 241: + end: 730000 + operation: delete + start: 720000 + 242: + operation: search + 243: + end: 940000 + operation: insert + start: 930000 + 244: + operation: search + 245: + end: 950000 + operation: insert + start: 940000 + 246: + end: 750000 + operation: delete + start: 740000 + 247: + operation: search + 248: + end: 960000 + operation: insert + start: 950000 + 249: + end: 760000 + operation: delete + start: 750000 + 250: + operation: search + 251: + end: 970000 + operation: insert + start: 960000 + 252: + end: 770000 + operation: delete + start: 760000 + 253: + operation: search + 254: + end: 980000 + operation: insert + start: 970000 + 255: + operation: search + 256: + end: 990000 + operation: insert + start: 980000 + 257: + operation: search + 258: + end: 1000000 + operation: insert + start: 990000 + 259: + end: 800000 + operation: delete + start: 790000 + 260: + operation: search + max_pts: 410000