Skip to content

Commit

Permalink
added gt urls, added configurable max points
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu authored and Ubuntu committed Nov 20, 2024
1 parent 99067a9 commit fe7103e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
24 changes: 16 additions & 8 deletions neurips23/runbooks/gen_expiration_time_runbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
timesteps: how long to wait before deleting for each ratio
seed: seed given to random generator
do_replace: whether to include replace in runbook or not
do_delete: whether to include delete in the runbook or not
max_pts: whether to set a max_pts higher than the max that occurs in the runbook (default None)
'''
def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ratios, timesteps, seed = 0, do_replace = False, gt_url = None, do_delete = True):
def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ratios, timesteps, seed = 0, do_replace = False, gt_url = None, do_delete = True, max_points = None):
random.seed(seed)
data = {dataset_name: {}}

Expand Down Expand Up @@ -99,7 +101,10 @@ def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ra
}
t+=1

data[dataset_name]["max_pts"]=max_num_points
if max_points != None & max_points >= max_num_points:
data[dataset_name]["max_pts"]=max_points
else:
data[dataset_name]["max_pts"]=max_num_points

if gt_url is not None:
data[dataset_name]["gt_url"] = gt_url
Expand Down Expand Up @@ -183,8 +188,9 @@ def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ra
dataset_name = 'msturingpq-1M'
dataset_size = 1000000
max_t = 100
gt_url = None
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, False, gt_url)
gt_url = "https://comp21storage.z5.web.core.windows.net/comp21/MSFT-TURING-ANNS/msturingpq-1M_expiration_time_runbook.yaml"
max_points = 450000
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, False, gt_url, max_points)

ratios = (0, 4, 18)
timesteps = (0, 100, 20)
Expand All @@ -193,8 +199,9 @@ def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ra
dataset_name = 'msturing-1M'
dataset_size = 1000000
max_t = 100
gt_url = None
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, True, gt_url, False)
gt_url = "https://comp21storage.z5.web.core.windows.net/comp21/MSFT-TURING-ANNS/msturingpq-1M_expiration_time_replace_only_runbook.yaml"
max_points = None
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, True, gt_url, False, max_points)

ratios = (1, 8, 18)
timesteps = (0, 100, 20)
Expand All @@ -203,6 +210,7 @@ def gen_exp_time_runbook(dataset_name, dataset_size, max_t, runbook_filename, ra
dataset_name = 'msturingpq-1M'
dataset_size = 1000000
max_t = 100
gt_url = None
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, True, gt_url)
gt_url = "https://comp21storage.z5.web.core.windows.net/comp21/MSFT-TURING-ANNS/msturingpq-1M_expiration_time_replace_delete_runbook.yaml"
max_points = 270000
gen_exp_time_runbook(dataset_name, dataset_size, max_t, dataset_file, ratios, timesteps, seed, True, gt_url, max_points)

2 changes: 1 addition & 1 deletion requirements_py3.10.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ansicolors==1.1.8
docker==7.1.0
h5py==3.10.0
matplotlib==3.3.4

numpy==1.24.2
pyyaml==6.0
psutil==5.9.4
Expand Down

0 comments on commit fe7103e

Please sign in to comment.