beeevita / EvoPrompt

Official implementation of the paper Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers
75 stars 12 forks source link

prompts_batched.json #5

Closed g4but closed 1 month ago

g4but commented 1 month ago

im a newbie, my problem is that, after i run the code with scripts/cls/run_ga_alpaca.sh later on this section if args.initial == "all": cache_path = ( args.cache_path if args.cache_path else f"./data/{args.task}/{dataset}/seed{args.seed}/prompts{model}.json") got an error

the error is : no directory data/{args.task}/{dataset}/seed{args.seed}/prompts{model}.json") i wonder if i should create the prompts{model}.json file by myself ? and also i notice that that file is does not exist at the first place

g4but commented 1 month ago

Traceback (most recent call last): File "/content/EvoPrompt/evoluter.py", line 105, in init_pop self.evaluated_prompts = json.load(open(cache_path, "r")) FileNotFoundError: [Errno 2] No such file or directory: 'data/cls/sst2/seed15/prompts_batched.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/content/EvoPrompt/run.py", line 26, in run(args) File "/content/EvoPrompt/run.py", line 22, in run ga_evo(args=args, evaluator=evaluator) File "/content/EvoPrompt/evolution.py", line 11, in ga_evo evoluter.evolute() File "/content/EvoPrompt/evoluter.py", line 357, in evolute self.evaluated_prompts, cur_budget = self.init_pop() File "/content/EvoPrompt/evoluter.py", line 128, in init_pop with open(cache_path, "w") as wf: FileNotFoundError: [Errno 2] No such file or directory: 'data/cls/sst2/seed15/prompts_batched.json'