Skip to content

Commit

Permalink
Update run_hf_question_gen_remote.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nbalepur authored Feb 23, 2024
1 parent 10d0d02 commit 84115c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/run_hf_question_gen_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ def run_inference(dataset_names, dataset_split, hf_dataset_name, model_name, par
else:
final_res_dir = f'{results_dir}/artifact_choices_cot_twostep_{suffix}.pkl'

if not os.path.exists(final_res_dir):
os.makedirs(final_res_dir)
if not os.path.exists('/'.join(final_res_dir.split('/')[:-1])):
os.makedirs('/'.join(final_res_dir.split('/')[:-1]))
with open(final_res_dir, 'wb') as handle:
pickle.dump(answers, handle, protocol=pickle.HIGHEST_PROTOCOL)

Expand Down

0 comments on commit 84115c9

Please sign in to comment.