Skip to content

Commit

Permalink
fix some configs
Browse files Browse the repository at this point in the history
  • Loading branch information
manishshettym committed Feb 22, 2024
1 parent f351ece commit 993f4f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions codescholar/apps/app_decl.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,13 @@ def search():
# search config
args.mode = "q"
args.seed = api
args.min_idiom_size = 2
args.min_idiom_size = 3
args.max_idiom_size = 20
args.max_init_beams = 150
args.max_init_beams = 200
args.result_dir = f"{api_cache_dir}/{args.seed}/"
args.idiom_g_dir = f"{args.result_dir}/idioms/graphs/"
args.idiom_p_dir = f"{args.result_dir}/idioms/progs/"

if not osp.exists(args.idiom_g_dir):
os.makedirs(args.idiom_g_dir)

if not osp.exists(args.idiom_p_dir):
os.makedirs(args.idiom_p_dir)

Expand Down
3 changes: 3 additions & 0 deletions codescholar/search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ def main(args):
else:
prog_indices = grep_programs(args, args.seed)[: args.prog_samples]

if len(prog_indices) > 0:
return

# load all embeddings of prog_indices to redis
# TODO: do this offline for *all* progs?
load_embeddings_batched_redis(args, prog_indices)
Expand Down

0 comments on commit 993f4f3

Please sign in to comment.