| 823 | |
| 824 | |
| 825 | def build_and_parse_args(): |
| 826 | parser = argparse.ArgumentParser() |
| 827 | # TODO: Core hyperparameters |
| 828 | parser.add_argument( |
| 829 | "--API", |
| 830 | type=str, |
| 831 | choices=["gpt-41", "claude", "gpt-5", "gpt-4o", "gpt-o4mini", "Gemini"], |
| 832 | default="gpt-41", |
| 833 | ) |
| 834 | parser.add_argument( |
| 835 | "--folder_prefix", |
| 836 | type=str, |
| 837 | default="TEST", |
| 838 | ) |
| 839 | parser.add_argument("--knowledge_file", type=str, default="long_video_topics_list.json") |
| 840 | parser.add_argument("--iconfinder_api_key", type=str, default="") |
| 841 | |
| 842 | # Basically invariant parameters |
| 843 | parser.add_argument("--use_feedback", action="store_true", default=False) |
| 844 | parser.add_argument("--no_feedback", action="store_false", dest="use_feedback") |
| 845 | parser.add_argument("--use_assets", action="store_true", default=False) |
| 846 | parser.add_argument("--no_assets", action="store_false", dest="use_assets") |
| 847 | |
| 848 | parser.add_argument("--max_code_token_length", type=int, help="max # token for generating code", default=10000) |
| 849 | parser.add_argument("--max_fix_bug_tries", type=int, help="max # tries for SR to fix bug", default=10) |
| 850 | parser.add_argument("--max_regenerate_tries", type=int, help="max # tries to regenerate", default=10) |
| 851 | parser.add_argument("--max_feedback_gen_code_tries", type=int, help="max # tries for Critic", default=3) |
| 852 | parser.add_argument("--max_mllm_fix_bugs_tries", type=int, help="max # tries for Critic to fix bug", default=3) |
| 853 | parser.add_argument("--feedback_rounds", type=int, default=2) |
| 854 | |
| 855 | parser.add_argument("--parallel", action="store_true", default=False) |
| 856 | parser.add_argument("--no_parallel", action="store_false", dest="parallel") |
| 857 | parser.add_argument("--parallel_group_num", type=int, default=3) |
| 858 | parser.add_argument("--max_concepts", type=int, help="Limit # concepts for a quick run, -1 for all", default=-1) |
| 859 | parser.add_argument("--knowledge_point", type=str, help="if knowledge_file not given, can ignore", default=None) |
| 860 | |
| 861 | return parser.parse_args() |
| 862 | |
| 863 | |
| 864 | if __name__ == "__main__": |