INNER CODE UNIT · Python

get_args

KodCode-AI/kodcode · pipeline/completion_gpt.py:12

def get_args():
    # Experiment Settings
    parser = argparse.ArgumentParser(description="OpenAI API Call Manager.")
    # Generation Parameters
    parser.add_argument("--model", type=str, default="gpt-4o-2024-05-13", help="OpenAI model name.")
    parser.add_argument("--input_file", type=str, default="../data_step1/leetcode_questions.jsonl", help="Input file.")
    parser.add_argument("--temperature", type=float, default=0.0, help="Temperature for the API call.")
    parser.add_argument("--max_tokens", type=int, default=8192, help="Max tokens for the API call.")
    parser.add_argument("--top_p", type=float, default=1.0, help="Top p for the API call.")
    parser.add_argument("--num_trials", type=int, default=1, help="Number of trials to run.")
    return parser.parse_args()

args = get_args()

# Input check: check if ends with prepared.jsonl
if not args.input_file.endswith("prepared.jsonl"):
    print("Error: Input file must end with prepared.jsonl for KodCode pipeline. Please make sure you are using the correct input file.")
    exit(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…