Skip to content

Commit

Permalink
edit runbook_gen
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha-simhadri committed Oct 13, 2023
1 parent 79649f0 commit d8ddce4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions benchmark/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ def run(definition, dataset, count, run_count, rebuild,
X = ds.get_private_queries()
power_stats = power_capture.run(algo, X, distance, count,
run_count, search_type, descriptor)
print('start store results')
store_results(dataset, count, definition,
query_arguments, descriptor,
results, search_type, neurips23track, runbook_path)
print('end store results')
finally:
algo.done()

Expand Down
8 changes: 3 additions & 5 deletions neurips23/streaming/final_runbook_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ def create_runbook(
max_pts = 0
active_points_in_cluster = np.zeros(num_clusters)

num_rounds = 5
search_entry = [{'operation': str('search')}]

num_rounds = 1
for round in range(num_rounds):
#insertions
for c in range(num_clusters):
Expand All @@ -95,7 +93,7 @@ def create_runbook(
entry = [{'operation': 'insert'}, {'start': int(ins_cursor_start[c])}, {'end': int(ins_cursor_end[c])}]
operation_list.append((num_operations, entry))
num_operations += 1
operation_list.append((num_operations, search_entry))
operation_list.append((num_operations, [{'operation': str('search')}]))
num_operations += 1
ins_cursor_start[c] = ins_cursor_end[c]

Expand All @@ -112,7 +110,7 @@ def create_runbook(
entry = [{'operation': 'delete'}, {'start': int(del_cursor_start[c])}, {'end': int(del_cursor_end[c])}]
operation_list.append((num_operations, entry))
num_operations += 1
operation_list.append((num_operations, search_entry))
operation_list.append((num_operations, [{'operation': 'search'}]))
num_operations += 1
del_cursor_start[c] = del_cursor_end[c]

Expand Down
3 changes: 2 additions & 1 deletion neurips23/streaming/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def build(algo, dataset, max_pts):
algo.setup(ds.dtype, max_pts, ndims)
print('Algorithm set up')
return time.time() - t0



def run_task(algo, ds, distance, count, run_count, search_type, private_query, runbook):
Expand Down Expand Up @@ -73,7 +74,7 @@ def run_task(algo, ds, distance, count, run_count, search_type, private_query, r

for k, v in result_map.items():
attrs['step_' + str(k)] = v

additional = algo.get_additional()
for k in additional:
attrs[k] = additional[k]
Expand Down

0 comments on commit d8ddce4

Please sign in to comment.