{ "cells": [ { "cell_type": "code", "execution_count": 3, "id": "cfe36fe1", "metadata": {}, "outputs": [], "source": [ "import os\n", "import openai\n", "import math\n", "import sys\n", "import time\n", "from tqdm import tqdm\n", "from typing import Iterable, List, TypeVar\n", "from retrying import retry\n", "import func_timeout\n", "from func_timeout import func_set_timeout\n", "\n", "\n", "\n", "T = TypeVar('T')\n", "KEY_INDEX = 0\n", "KEY_POOL = [\n", " \"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\"\n", "]# your key pool\n", "openai.api_key = KEY_POOL[0]\n", "os.environ[\"http_proxy\"] = \"http://127.0.0.1:7890\"\n", "os.environ[\"https_proxy\"] = \"http://127.0.0.1:7890\"\n", "openai.proxy = \"http://127.0.0.1:7890\"\n", "\n", "\n", "class TimeoutError(Exception):\n", " pass\n", "\n", "def timeout_handler(signum, frame):\n", " raise TimeoutError(\"The function took too long to run\")\n", "\n", "@func_set_timeout(120)\n", "def limited_execution_time(func,model,prompt,temp,max_tokens=2048, default=None,**kwargs):\n", " try:\n", " if 'gpt-3.5-turbo' in model or 'gpt-4' in model:\n", " result = func(\n", " model=model,\n", " messages=prompt,\n", " temperature=temp\n", " )\n", " else:\n", " result = func(model=model,prompt=prompt,max_tokens=max_tokens,**kwargs)\n", " except func_timeout.exceptions.FunctionTimedOut:\n", " return None\n", " # raise any other exception\n", " except Exception as e:\n", " raise e\n", " return result\n", "\n", "\n", "def batchify(data: Iterable[T], batch_size: int) -> Iterable[List[T]]:\n", " # function copied from allenai/real-toxicity-prompts\n", " assert batch_size > 0\n", " batch = []\n", " for item in data:\n", " # Yield next batch\n", " if len(batch) == batch_size:\n", " yield batch\n", " batch = []\n", " batch.append(item)\n", "\n", " # Yield last un-filled batch\n", " if len(batch) != 0:\n", " yield batch\n", "\n", "\n", "def openai_unit_price(model_name,token_type=\"prompt\"):\n", " if 'gpt-4' in model_name:\n", " if token_type==\"prompt\":\n", " unit = 0.03\n", " elif token_type==\"completion\":\n", " unit = 0.06\n", " else:\n", " raise ValueError(\"Unknown type\")\n", " elif 'gpt-3.5-turbo' in model_name:\n", " unit = 0.002\n", " elif 'davinci' in model_name:\n", " unit = 0.02\n", " elif 'curie' in model_name:\n", " unit = 0.002\n", " elif 'babbage' in model_name:\n", " unit = 0.0005\n", " elif 'ada' in model_name:\n", " unit = 0.0004\n", " else:\n", " unit = -1\n", " return unit\n", "\n", "\n", "def calc_cost_w_tokens(total_tokens: int, model_name: str):\n", " unit = openai_unit_price(model_name,token_type=\"completion\")\n", " return round(unit * total_tokens / 1000, 4)\n", "\n", "\n", "def calc_cost_w_prompt(total_tokens: int, model_name: str):\n", " # 750 words == 1000 tokens\n", " unit = openai_unit_price(model_name)\n", " return round(unit * total_tokens / 1000, 4)\n", "\n", "\n", "def get_perplexity(logprobs):\n", " assert len(logprobs) > 0, logprobs\n", " return math.exp(-sum(logprobs)/len(logprobs))\n", "\n", "\n", "def keep_logprobs_before_eos(tokens, logprobs):\n", " keep_tokens = []\n", " keep_logprobs = []\n", " start_flag = False\n", " for tok, lp in zip(tokens, logprobs):\n", " if start_flag:\n", " if tok == \"<|endoftext|>\":\n", " break\n", " else:\n", " keep_tokens.append(tok)\n", " keep_logprobs.append(lp)\n", " else:\n", " if tok != '\\n':\n", " start_flag = True\n", " if tok != \"<|endoftext>\":\n", " keep_tokens.append(tok)\n", " keep_logprobs.append(lp)\n", "\n", " return keep_tokens, keep_logprobs\n", "\n", "\n", "def catch_openai_api_error(prompt_input: list):\n", " global KEY_INDEX\n", " error = sys.exc_info()[0]\n", " if error == openai.error.InvalidRequestError:\n", " # something is wrong: e.g. prompt too long\n", " print(f\"InvalidRequestError\\nPrompt:\\n\\n{prompt_input}\\n\\n\")\n", " assert False\n", " elif error == openai.error.RateLimitError:\n", " KEY_INDEX = (KEY_INDEX + 1) % len(KEY_POOL)\n", " openai.api_key = KEY_POOL[KEY_INDEX]\n", " print(\"RateLimitError, now change the key. Current key is \", openai.api_key)\n", " elif error == openai.error.APIError:\n", " KEY_INDEX = (KEY_INDEX + 1) % len(KEY_POOL)\n", " openai.api_key = KEY_POOL[KEY_INDEX]\n", " print(\"APIError, now change the key. Current key is \", openai.api_key)\n", " elif error == openai.error.AuthenticationError:\n", " KEY_INDEX = (KEY_INDEX + 1) % len(KEY_POOL)\n", " openai.api_key = KEY_POOL[KEY_INDEX]\n", " print(\"AuthenticationError, now change the key. Current key is \", openai.api_key)\n", " elif error == TimeoutError:\n", " KEY_INDEX = (KEY_INDEX + 1) % len(KEY_POOL)\n", " openai.api_key = KEY_POOL[KEY_INDEX]\n", " print(\"TimeoutError, retrying...\")\n", " else:\n", " print(\"API error:\", error)\n", "\n", "\n", "def prompt_gpt3(prompt_input: list, save_path,model_name='text-davinci-003', max_tokens=2048,\n", " clean=False, batch_size=16, verbose=False, **kwargs):\n", " # return: output_list, money_cost\n", "\n", " def request_api(prompts: list):\n", " # prompts: list or str\n", "\n", " total_tokens = 0\n", " results = []\n", " for batch in tqdm(batchify(prompt_input, batch_size), total=len(prompt_input) // batch_size):\n", " batch_response = request_api(batch)\n", " total_tokens += batch_response['usage']['total_tokens']\n", " if not clean:\n", " results += batch_response['choices']\n", " else:\n", " results += [choice['text'] for choice in batch_response['choices']]\n", " with open(save_path,'w+',encoding='utf-8') as f:\n", " for content in results:\n", " content = content.replace(\"\\n\",\" \")\n", " f.write(content+'\\n')\n", " return results, calc_cost_w_tokens(total_tokens, model_name)\n", "\n", "\n", "\n", "def prompt_chatgpt(system_input, user_input, temperature,save_path,index,history=[], model_name='gpt-3.5-turbo'):\n", " '''\n", " :param system_input: \"You are a helpful assistant/translator.\"\n", " :param user_input: you texts here\n", " :param history: ends with assistant output.\n", " e.g. [{\"role\": \"system\", \"content\": xxx},\n", " {\"role\": \"user\": \"content\": xxx},\n", " {\"role\": \"assistant\", \"content\": \"xxx\"}]\n", " return: assistant_output, (updated) history, money cost\n", " '''\n", " if len(history) == 0:\n", " history = [{\"role\": \"system\", \"content\": system_input}]\n", " history.append({\"role\": \"user\", \"content\": user_input})\n", " while True:\n", " try:\n", " completion = limited_execution_time(openai.ChatCompletion.create,\n", " model=model_name,\n", " prompt=history,\n", " temp=temperature)\n", " if completion is None:\n", " raise TimeoutError\n", " break\n", " except:\n", " catch_openai_api_error(user_input)\n", " time.sleep(1)\n", "\n", " assistant_output = completion['choices'][0]['message']['content']\n", " history.append({\"role\": \"assistant\", \"content\": assistant_output})\n", " total_prompt_tokens = completion['usage']['prompt_tokens']\n", " total_completion_tokens = completion['usage']['completion_tokens']\n", " with open(save_path,'a+',encoding='utf-8') as f:\n", " assistant_output = str(index)+\"\\t\"+\"\\t\".join(x for x in assistant_output.split(\"\\n\"))\n", " f.write(assistant_output+'\\n')\n", " return assistant_output, history, calc_cost_w_tokens(total_prompt_tokens, model_name) + calc_cost_w_prompt(total_completion_tokens, model_name)" ] }, { "cell_type": "code", "execution_count": 4, "id": "d2bd29e3", "metadata": {}, "outputs": [], "source": [ "import json\n", "def load_line_json_data(filename):\n", " data = []\n", " with open(filename, 'r', encoding='utf-8') as f:\n", " for line in f.read().strip().split('\\n'):\n", " unit = json.loads(line)\n", " data.append(unit)\n", " return data\n", "\n", "def build_generation_prompt(data):\n", " prompt_list = []\n", " prefix = \"\"\"Given a JSON, please help me generate a natural language query. In the JSON, 'org' denotes the departure city. When 'days' exceeds 3, 'visiting_city_number' specifies the number of cities to be covered in the destination state. Please disregard the 'level' attribute. Here are three examples.\n", "\n", "-----EXAMPLE 1-----\n", "JSON:\n", "{\"org\": \"Gulfport\", \"dest\": \"Charlotte\", \"days\": 3, \"visiting_city_number\": 1, \"date\": [\"2022-03-05\", \"2022-03-06\", \"2022-03-07\"], \"people_number\": 1, \"local_constraint\": {\"house rule\": null, \"cuisine\": null, \"room type\": null}, \"budget\": 1800, \"query\": null, \"level\": \"easy\"}\n", "QUERY:\n", "Please design a travel plan departing Gulfport and heading to Charlotte for 3 days, spanning March 5th to March 7th, 2022, with a budget of $1800.\n", "-----EXAMPLE 2-----\n", "JSON:\n", "{\"org\": \"Omaha\", \"dest\": \"Colorado\", \"days\": 5, \"visiting_city_number\": 2, \"date\": [\"2022-03-14\", \"2022-03-15\", \"2022-03-16\", \"2022-03-17\", \"2022-03-18\"], \"people_number\": 7, \"local_constraint\": {\"house rule\": \"pets\", \"cuisine\": null, \"room type\": null}, \"budget\": 35300, \"query\": null, \"level\": \"middle\"}\n", "QUERY:\n", "Could you provide a 5-day travel itinerary for a group of 7, starting in Omaha and exploring 2 cities in Colorado between March 14th and March 18th, 2022? Our budget is set at $35,300, and it's essential that our accommodations be pet-friendly since we're bringing our pets.\n", "-----EXAMPLE 3-----\n", "JSON:\n", "{\"org\": \"Indianapolis\", \"dest\": \"Georgia\", \"days\": 7, \"visiting_city_number\": 3, \"date\": [\"2022-03-01\", \"2022-03-02\", \"2022-03-03\", \"2022-03-04\", \"2022-03-05\", \"2022-03-06\", \"2022-03-07\"], \"people_number\": 2, \"local_constraint\": {\"flight time\": null, \"house rule\": null, \"cuisine\": [\"Bakery\", \"Indian\"], \"room type\": \"entire room\", \"transportation\": \"self driving\"}, \"budget\": 6200, \"query\": null, \"level\": \"hard\"}\n", "QUERY:\n", "I'm looking for a week-long travel itinerary for 2 individuals. Our journey starts in Indianapolis, and we intend to explore 3 distinct cities in Georgia from March 1st to March 7th, 2022. Our budget is capped at $6,200. For our accommodations, we'd prefer an entire room. We plan to navigate our journey via self-driving. In terms of food, we're enthusiasts of bakery items, and we'd also appreciate indulging in genuine Indian cuisine.\n", "\n", "JSON\\n\"\"\"\n", " for unit in data:\n", " unit = str(unit).replace(\", 'level': 'easy'\",'').replace(\", 'level': 'middle'\",'').replace(\", 'level': 'hard'\",'')\n", " prompt = prefix + str(unit) + \"\\nQUERY\\n\"\n", " prompt_list.append(prompt)\n", " return prompt_list\n", "\n", "def build_plan_format_conversion_prompt(set_type='dev',model_name='gpt4',method='direct'):\n", " prompt_list = []\n", " prefix = \"\"\"Please assist me in extracting valid information from a given natural language text and reconstructing it in JSON format, as demonstrated in the following example. If transportation details indicate a journey from one city to another (e.g., from A to B), the 'current_city' should be updated to the destination city (in this case, B). Use a ';' to separate different attractions, with each attraction formatted as 'Name, City'. If there's information about transportation, ensure that the 'current_city' aligns with the destination mentioned in the transportation details (i.e., the current city should follow the format 'from A to B'). Also, ensure that all flight numbers and costs are followed by a colon (i.e., 'Flight Number:' and 'Cost:'), consistent with the provided example. Each item should include ['day', 'current_city', 'transportation', 'breakfast', 'attraction', 'lunch', 'dinner', 'accommodation']. Replace non-specific information like 'eat at home/on the road' with '-'. Additionally, delete any '$' symbols.\n", "-----EXAMPLE-----\n", " [{{\n", " \"days\": 1,\n", " \"current_city\": \"from Dallas to Peoria\",\n", " \"transportation\": \"Flight Number: 4044830, from Dallas to Peoria, Departure Time: 13:10, Arrival Time: 15:01\",\n", " \"breakfast\": \"-\",\n", " \"attraction\": \"Peoria Historical Society, Peoria;Peoria Holocaust Memorial, Peoria;\",\n", " \"lunch\": \"-\",\n", " \"dinner\": \"Tandoor Ka Zaika, Peoria\",\n", " \"accommodation\": \"Bushwick Music Mansion, Peoria\"\n", " }},\n", " {{\n", " \"days\": 2,\n", " \"current_city\": \"Peoria\",\n", " \"transportation\": \"-\",\n", " \"breakfast\": \"Tandoor Ka Zaika, Peoria\",\n", " \"attraction\": \"Peoria Riverfront Park, Peoria;The Peoria PlayHouse, Peoria;Glen Oak Park, Peoria;\",\n", " \"lunch\": \"Cafe Hashtag LoL, Peoria\",\n", " \"dinner\": \"The Curzon Room - Maidens Hotel, Peoria\",\n", " \"accommodation\": \"Bushwick Music Mansion, Peoria\"\n", " }},\n", " {{\n", " \"days\": 3,\n", " \"current_city\": \"from Peoria to Dallas\",\n", " \"transportation\": \"Flight Number: 4045904, from Peoria to Dallas, Departure Time: 07:09, Arrival Time: 09:20\",\n", " \"breakfast\": \"-\",\n", " \"attraction\": \"-\",\n", " \"lunch\": \"-\",\n", " \"dinner\": \"-\",\n", " \"accommodation\": \"-\"\n", " }}]\n", "-----EXAMPLE END-----\n", "\"\"\"\n", " directory = f'/home/xj/toolAugEnv/code/toolConstraint/data/final_data/{set_type}'\n", " query_data_list = load_line_json_data(os.path.join(directory, 'query/query.jsonl'))\n", " idx_number_list = [i for i in range(1,len(query_data_list)+1)]\n", " for idx in tqdm(idx_number_list):\n", " generated_plan = json.load(open(f'/home/xj/toolAugEnv/code/toolConstraint/results/{set_type}/plan_{idx}.json'))\n", " if method != 'tool-use':\n", " suffix = '_collected'\n", " else:\n", " suffix = ''\n", " if generated_plan[-1][f'{model_name}_{method}{suffix}_info_results'] and generated_plan[-1][f'{model_name}_{method}{suffix}_info_results'] != \"\":\n", " prompt = prefix + \"Text:\\n\"+generated_plan[-1][f'{model_name}_{method}{suffix}_info_results'].split('Total Costs:')[0]+\"\\nJSON:\\n\"\n", " else:\n", " prompt = \"\"\n", " prompt_list.append(prompt)\n", " return prompt_list\n", "\n", "def build_rewritten_query_prompt(file_path):\n", " prompt_list = []\n", " prefix = f\"\"\"Given a JSON, please help me rewrite the query based on the 'reset_budget'. Note that you should change any singular form of accommodation requirement to plural due to the uncertainty regarding the actual number of rooms needed.\n", "-----EXAMPLE-----\n", "JSON:\n", "{{\"org\": \"Detroit\", \"dest\": \"Norfolk\", \"days\": 3, \"visiting_city_number\": 1, \"date\": [\"2022-03-05\", \"2022-03-06\", \"2022-03-07\"], \"people_number\": 3, \"local_constraint\": {{\"house rule\": \"smoking\", \"cuisine\": null, \"room type\": \"entire room\", \"transportation\": \"no flight\"}}, \"budget\": 4700, \"query\": \"Could you devise a 3-day travel itinerary for a group of 3, departing from Detroit and heading to Norfolk from March 5th to March 7th, 2022? Our budget is set at $4,700. Our accommodation must allow smoking and should ideally be an entire room. We would prefer to avoid any flights for our transportation.\", \"level\": \"hard\", \"reset_budget\": 2700}}\n", "Rewritten Query:\n", "Could you devise a 3-day travel itinerary for a group of 3, departing from Detroit and heading to Norfolk from March 5th to March 7th, 2022? Our budget is set at $2,700. We require accommodations that allow smoking and should ideally be entire rooms. We would prefer to avoid any flights for our transportation.\n", "-----EXAMPLE END-----\n", "\n", "JSON:\n", "\"\"\"\n", " query_list = load_line_json_data(file_path)\n", " for unit in query_list:\n", " prompt = prefix + str(unit) + '\\n' + 'Rewritten Query:\\n'\n", " prompt_list.append(prompt)\n", " \n", " return prompt_list" ] }, { "cell_type": "code", "execution_count": 11, "id": "861c6651", "metadata": {}, "outputs": [], "source": [ "query_data = load_line_json_data('../data/query/lrz.jsonl')\n", "test_data = build_generation_prompt(query_data)" ] }, { "cell_type": "code", "execution_count": 3, "id": "c6a6665a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Given a JSON, please help me rewrite the query based on the 'reset_budget'. Note that you should change any singular form of accommodation requirement to plural due to the uncertainty regarding the actual number of rooms needed.\n", "-----EXAMPLE-----\n", "JSON:\n", "{\"org\": \"Detroit\", \"dest\": \"Norfolk\", \"days\": 3, \"visiting_city_number\": 1, \"date\": [\"2022-03-05\", \"2022-03-06\", \"2022-03-07\"], \"people_number\": 3, \"local_constraint\": {\"house rule\": \"smoking\", \"cuisine\": null, \"room type\": \"entire room\", \"transportation\": \"no flight\"}, \"budget\": 4700, \"query\": \"Could you devise a 3-day travel itinerary for a group of 3, departing from Detroit and heading to Norfolk from March 5th to March 7th, 2022? Our budget is set at $4,700. Our accommodation must allow smoking and should ideally be an entire room. We would prefer to avoid any flights for our transportation.\", \"level\": \"hard\", \"reset_budget\": 2700}\n", "Rewritten Query:\n", "Could you devise a 3-day travel itinerary for a group of 3, departing from Detroit and heading to Norfolk from March 5th to March 7th, 2022? Our budget is set at $2,700. We require accommodations that allow smoking and should ideally be entire rooms. We would prefer to avoid any flights for our transportation.\n", "-----EXAMPLE END-----\n", "\n", "JSON:\n", "{'org': 'Detroit', 'dest': 'Norfolk', 'days': 3, 'visiting_city_number': 1, 'date': ['2022-03-05', '2022-03-06', '2022-03-07'], 'people_number': 3, 'local_constraint': {'house rule': 'smoking', 'cuisine': None, 'room type': 'entire room', 'transportation': 'no flight'}, 'budget': 4700, 'query': 'Could you devise a 3-day travel itinerary for a group of 3, departing from Detroit and heading to Norfolk from March 5th to March 7th, 2022? Our budget is set at $4,700. Our accommodation must allow smoking and should ideally be an entire room. We would prefer to avoid any flights for our transportation.', 'level': 'hard', 'reset_budget': 2800}\n", "Rewritten Query:\n", "\n" ] } ], "source": [ "test_data = build_rewritten_query_prompt('../data/query/all_reset_budget.jsonl')\n", "print(test_data[0])" ] }, { "cell_type": "code", "execution_count": 15, "id": "ff602d51", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Please assist me in extracting valid information from a given natural language text and reconstructing it in JSON format, as demonstrated in the following example. If transportation details indicate a journey from one city to another (e.g., from A to B), the 'current_city' should be updated to the destination city (in this case, B). Use a ';' to separate different attractions, with each attraction formatted as 'Name, City'. If there's information about transportation, ensure that the 'current_city' aligns with the destination mentioned in the transportation details (i.e., the current city should follow the format 'from A to B'). Also, ensure that all flight numbers and costs are followed by a colon (i.e., 'Flight Number:' and 'Cost:'), consistent with the provided example. Each item should include ['day', 'current_city', 'transportation', 'breakfast', 'attraction', 'lunch', 'dinner', 'accommodation']. Replace non-specific information like 'eat at home/on the road' with '-'. Additionally, delete any '$' symbols.\n", "-----EXAMPLE-----\n", " [{{\n", " \"days\": 1,\n", " \"current_city\": \"from Dallas to Peoria\",\n", " \"transportation\": \"Flight Number: 4044830, from Dallas to Peoria, Departure Time: 13:10, Arrival Time: 15:01\",\n", " \"breakfast\": \"-\",\n", " \"attraction\": \"Peoria Historical Society, Peoria;Peoria Holocaust Memorial, Peoria;\",\n", " \"lunch\": \"-\",\n", " \"dinner\": \"Tandoor Ka Zaika, Peoria\",\n", " \"accommodation\": \"Bushwick Music Mansion, Peoria\"\n", " }},\n", " {{\n", " \"days\": 2,\n", " \"current_city\": \"Peoria\",\n", " \"transportation\": \"-\",\n", " \"breakfast\": \"Tandoor Ka Zaika, Peoria\",\n", " \"attraction\": \"Peoria Riverfront Park, Peoria;The Peoria PlayHouse, Peoria;Glen Oak Park, Peoria;\",\n", " \"lunch\": \"Cafe Hashtag LoL, Peoria\",\n", " \"dinner\": \"The Curzon Room - Maidens Hotel, Peoria\",\n", " \"accommodation\": \"Bushwick Music Mansion, Peoria\"\n", " }},\n", " {{\n", " \"days\": 3,\n", " \"current_city\": \"from Peoria to Dallas\",\n", " \"transportation\": \"Flight Number: 4045904, from Peoria to Dallas, Departure Time: 07:09, Arrival Time: 09:20\",\n", " \"breakfast\": \"-\",\n", " \"attraction\": \"-\",\n", " \"lunch\": \"-\",\n", " \"dinner\": \"-\",\n", " \"accommodation\": \"-\"\n", " }}]\n", "-----EXAMPLE END-----\n", "\n", "Text:\n", "Travel Plan:\n", "\n", "Day 1: March 20, 2022\n", "Current City: from North Platte to Grand Junction\n", "Transportation: Self-driving, from North Platte to Grand Junction, Duration: 7 hours 27 mins, Distance: 809 km, Cost: $40\n", "Breakfast: -\n", "Attraction: Visit Grand Junction Mural, Walter Walker State Wildlife Area\n", "Lunch: Ate at \"Austin's BBQ and Oyster Bar\", Average Cost: $15\n", "Dinner: Enjoyed food at \"2 Dog\", Average Cost: $29\n", "Accommodation: Stayed at \"New Renovated Studio~Prime Upper East~W/D\", Price: $1174, Room Type: Entire home/apt\n", "\n", "Day 2: March 21, 2022\n", "Current City: Grand Junction\n", "Transportation: -\n", "Breakfast: Had breakfast at \"Cocoa Tree\", Average Cost: $68\n", "Attraction: Visited Museum of the West, Eureka! McConnell Science Museum, Bananas Fun Park\n", "Lunch: Ate at \"Pind Balluchi\", Average Cost: $17\n", "Dinner: Savored dinner at \"Punjab Da Pind\", Average Cost: $52\n", "Accommodation: Continued stay at \"New Renovated Studio~Prime Upper East~W/D\"\n", "\n", "Day 3: March 22, 2022\n", "Current City: from Grand Junction to Durango\n", "Transportation: Self-driving, from Grand Junction to Durango, Duration: 3 hours 34 mins, Distance: 269 km, Cost: $13\n", "Breakfast: -\n", "Attraction: Visited Durango & Silverton Narrow Gauge Railroad, Animas Museum\n", "Lunch: Had a meal at \"Samurai Japanese Cuisine & Sushi Bar\", Average Cost: $67\n", "Dinner: Ate at \"Dub's High on the Hog\", Average Cost: $98\n", "Accommodation: Stayed at \"BEAUTIFUL 2 BED APARTMENT IN WILLIAMSBURG, BROOLYN\", Price: $1022, Room Type: Entire home/apt\n", "\n", "Day 4: March 23, 2022\n", "Current City: Durango\n", "Transportation: -\n", "Breakfast: Started the day at \"Asian Haus\", Average Cost: $26\n", "Attraction: Explored Durango Adventures and Zipline Tours, Whitewater Park\n", "Lunch: Had a meal at \"Mohit di Hatti\", Average Cost: $74\n", "Dinner: Ate a delightful dinner at \"The Mashal\", Average Cost: $85\n", "Accommodation: Continued stay at \"BEAUTIFUL 2 BED APARTMENT IN WILLIAMSBURG, BROOLYN\"\n", "\n", "Day 5: March 24, 2022\n", "Current City: from Durango to Colorado Springs\n", "Transportation: Self-driving, from Durango to Colorado Springs, Duration: 5 hours 27 mins, Distance: 504 km, Cost: $25\n", "Breakfast: -\n", "Attraction: Visited Garden of the Gods, Cheyenne Mountain Zoo\n", "Lunch: Ate at \"Raglan Road Irish Pub and Restaurant\", Average Cost: $97\n", "Dinner: Enjoyed food at \"Derby\", Average Cost: $67\n", "Accommodation: Stayed at \"Charming and Bright 1 bdr apartment in Noho\", Price: $112, Room Type: Entire home/apt\n", "\n", "Day 6: March 25, 2022\n", "Current City: Colorado Springs\n", "Transportation: -\n", "Breakfast: Had breakfast at \"Club Tokyo - Best Western Skycity Hotel\", Average Cost: $64\n", "Attraction: Explored Cave of the Winds Mountain Park, The Broadmoor Seven Falls\n", "Lunch: Had a meal at \"Deepak Rasoi\", Average Cost: $60\n", "Dinner: Savored dinner at \"GoGourmet\", Average Cost: $66\n", "Accommodation: Continued stay at \"Charming and Bright 1 bdr apartment in Noho\"\n", "\n", "Day 7: March 26, 2022\n", "Current City: from Colorado Springs to North Platte\n", "Transportation: Self-driving, from Colorado Springs to North Platte, Duration: 4 hours 40 mins, Distance: 536 km, Cost: $26\n", "Breakfast: -\n", "Attraction: -\n", "Lunch: -\n", "Dinner: -\n", "Accommodation: -\n", "\n", "\n", "JSON:\n", "\n" ] } ], "source": [ "print(test_data[134])" ] }, { "cell_type": "code", "execution_count": 27, "id": "dd22437c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "we will need to travel from Elmira to Punta Gorda on March 12th, 2022. Since there is a flight available, we will take Flight Number F3575578, departing at 20:07 and arriving at 23:07. The cost for this flight is $321 per person.\n", "\n", "Upon arrival in Punta Gorda, we will need accommodations that allow smoking. We can stay at the Cozy Cat Cave in Bushwick for $661 for the night. This will be our first day in Punta Gorda.\n", "\n", "On March 13th, we will explore the attractions in Punta Gorda, such as Laishley Park, Ponce De Leon Park, and Charlotte Harbor Preserve State Park. For meals, we can try Pho Bac for lunch and Villa Gargano for dinner.\n", "\n", "On March 14th, there is no flight available from Punta Gorda to Tallahassee, so we will need to self-drive. The cost for self-driving is $29, and the distance is 597 km. Upon arrival in Tallahassee, we can stay at the Comfortable one bedroom with patio for $73 for the night.\n", "\n", "On March 15th, we can visit the Tallahassee Museum and Alfred B. Maclay Gardens State Park. For meals, we can try Indian Grill Room for lunch and Barrett Junction Cafe for dinner.\n", "\n", "On March 16th, there is no flight available from Tallahassee to Jacksonville, so we will need to self-drive. The cost for self-driving is $13, and the distance is 267 km. Upon arrival in Jacksonville, we can stay at the Huge Loft - Heart of Williamsburg for $518 for the night.\n", "\n", "On March 17th, we can explore the attractions in Jacksonville, such as Jacksonville Zoo and Gardens and MOSH (Museum Of Science & History). For meals, we can try Pirates' House Restaurant for lunch and Goose Feathers Cafe and Bakery for dinner.\n", "\n", "On March 18th, there is no flight available from Jacksonville to Elmira, so we will need to self-drive. The cost for self-driving is $79, and the distance is 1,590 km. Upon arrival in Elmira, our journey will come to an end.\n", "\n", "This travel plan aligns with the budget of $6,800 and includes accommodations that allow smoking and a diverse range of cuisines.\n" ] } ], "source": [ "print(\"we will need to travel from Elmira to Punta Gorda on March 12th, 2022. Since there is a flight available, we will take Flight Number F3575578, departing at 20:07 and arriving at 23:07. The cost for this flight is $321 per person.\\n\\nUpon arrival in Punta Gorda, we will need accommodations that allow smoking. We can stay at the Cozy Cat Cave in Bushwick for $661 for the night. This will be our first day in Punta Gorda.\\n\\nOn March 13th, we will explore the attractions in Punta Gorda, such as Laishley Park, Ponce De Leon Park, and Charlotte Harbor Preserve State Park. For meals, we can try Pho Bac for lunch and Villa Gargano for dinner.\\n\\nOn March 14th, there is no flight available from Punta Gorda to Tallahassee, so we will need to self-drive. The cost for self-driving is $29, and the distance is 597 km. Upon arrival in Tallahassee, we can stay at the Comfortable one bedroom with patio for $73 for the night.\\n\\nOn March 15th, we can visit the Tallahassee Museum and Alfred B. Maclay Gardens State Park. For meals, we can try Indian Grill Room for lunch and Barrett Junction Cafe for dinner.\\n\\nOn March 16th, there is no flight available from Tallahassee to Jacksonville, so we will need to self-drive. The cost for self-driving is $13, and the distance is 267 km. Upon arrival in Jacksonville, we can stay at the Huge Loft - Heart of Williamsburg for $518 for the night.\\n\\nOn March 17th, we can explore the attractions in Jacksonville, such as Jacksonville Zoo and Gardens and MOSH (Museum Of Science & History). For meals, we can try Pirates' House Restaurant for lunch and Goose Feathers Cafe and Bakery for dinner.\\n\\nOn March 18th, there is no flight available from Jacksonville to Elmira, so we will need to self-drive. The cost for self-driving is $79, and the distance is 1,590 km. Upon arrival in Elmira, our journey will come to an end.\\n\\nThis travel plan aligns with the budget of $6,800 and includes accommodations that allow smoking and a diverse range of cuisines.\")" ] }, { "cell_type": "code", "execution_count": 13, "id": "16dc3f1b", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|██████████| 1000/1000 [00:03<00:00, 293.62it/s]\n" ] } ], "source": [ "model_name = ['gpt-3.5-turbo-11062','gpt-4-1106-preview2','greedy_search','mistral-7B-32K','gemini','mixtral','ChatGLM3-6B-32K2'][-3]\n", "method = ['direct','cot','react','reflexion','tool-use'][-1]\n", "set_type = ['dev','test'][0]\n", "test_data = build_plan_format_conversion_prompt(set_type=set_type,model_name=model_name,method=method)" ] }, { "cell_type": "code", "execution_count": 14, "id": "c81fb403", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.391\n" ] } ], "source": [ "# test_data = test_data[:28]\n", "cnt = 0\n", "for unit in test_data:\n", " if unit == \"\":\n", " cnt += 1\n", "print(1.0*(len(test_data)-cnt)/len(test_data))" ] }, { "cell_type": "code", "execution_count": 44, "id": "d0547a5d", "metadata": {}, "outputs": [], "source": [ "cnt+=1" ] }, { "cell_type": "code", "execution_count": 59, "id": "8d71843e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\"\n", "Thought 1: The task is to create a 7-day travel plan starting in Philadelphia and visiting 3 different cities in Virginia within a budget of $1,800. The cities to visit in Virginia are Richmond, Petersburg, and Charlottesville. The travel dates are from March 15th to March 21st, 2022. To begin, I need to consider the modes of transportation between these cities, as well as the costs associated with each mode. According to the provided information, there are flights, self-driving options, and taxis available for some of the routes. I also need to account for accommodations, meals, and attractions in each city. Given the budget constraint, it's important to choose cost-effective options for transportation and lodging. I will start by planning the transportation from Philadelphia to the first city in Virginia, which is Richmond.\n", "Action 1: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Philadelphia\", \"transportation\": \"self-driving, from Philadelphia to Richmond, duration: 4 hours 2 mins, distance: 407 km, cost: 20\", \"breakfast\": \"-\", \"attraction\": \"-\", \"lunch\": \"-\", \"dinner\": \"-\", \"accommodation\": \"-\"}]\n", "Observation 1: Cost: The cost of your plan is 20 dollars.\n", "Thought 2: The self-driving option from Philadelphia to Richmond is within budget, costing $20. Now, I need to find accommodation in Richmond for the first night. I will look for an option that is affordable but comfortable, considering the overall budget. After securing accommodation, I will plan for meals and attractions in Richmond for the following day. I will choose attractions that do not have an entry fee listed to keep costs down and select moderately priced restaurants for meals. Once the plan for Richmond is set, I will proceed to plan the transportation to Petersburg, followed by accommodation, meals, and attractions there. The same process will be applied for the trip from Petersburg to Charlottesville and then back to Philadelphia.\n", "Action 2: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Cool Summer Vibes UWS Pent House w/ rooftop, Richmond\"}]\n", "Observation 2: Cost: The cost of your plan is 602.0 dollars.\n", "Thought 3: The accommodation at \"Cool Summer Vibes UWS Pent House w/ rooftop\" in Richmond is too expensive, costing $602, which significantly impacts the budget. I need to find a more affordable accommodation option to ensure the budget is maintained throughout the 7-day trip. I will look for a different accommodation that is less expensive and re-calculate the cost for the first day in Richmond, including the chosen attractions and meals.\n", "Action 3: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 3: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 4: The accommodation \"Gorgeous studio in midtown Manhattan\" in Richmond is still too expensive at $316. I need to select a more budget-friendly accommodation to keep the overall trip within the $1,800 budget. I will choose another accommodation option with a lower price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 4: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"2 bd 2 bathroom Apartment in Upper East Side, Richmond\"}]\n", "Observation 4: Cost: The cost of your plan is 389.0 dollars.\n", "Thought 5: The accommodation \"2 bd 2 bathroom Apartment in Upper East Side\" in Richmond is still not affordable enough at $389. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 5: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Inviting Brooklyn Studio, Richmond\"}]\n", "Observation 5: Cost: The cost of your plan is 502.0 dollars.\n", "Thought 6: The accommodation \"Inviting Brooklyn Studio\" in Richmond is still too expensive at $502. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 6: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Large cozy bedroom close to Times Square 43D4, Richmond\"}]\n", "Observation 6: Cost: The cost of your plan is 507.0 dollars.\n", "Thought 7: The accommodation \"Large cozy bedroom close to Times Square 43D4\" in Richmond is still too expensive at $507. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 7: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 7: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 8: It seems there was a mistake in repeating the same accommodation that was previously too expensive. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 8: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"12 East 86th St full furnished, Richmond\"}]\n", "Observation 8: Cost: The cost of your plan is 555.0 dollars.\n", "Thought 9: The accommodation \"12 East 86th St full furnished\" in Richmond is also too expensive at $555. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 9: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 9: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 10: It appears there was a repeated mistake in selecting accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 10: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 10: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 11: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 11: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Inviting Brooklyn Studio, Richmond\"}]\n", "Observation 11: Cost: The cost of your plan is 502.0 dollars.\n", "Thought 12: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 12: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"12 East 86th St full furnished, Richmond\"}]\n", "Observation 12: Cost: The cost of your plan is 555.0 dollars.\n", "Thought 13: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 13: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Large cozy bedroom close to Times Square 43D4, Richmond\"}]\n", "Observation 13: Cost: The cost of your plan is 507.0 dollars.\n", "Thought 14: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 14: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 14: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 15: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 15: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"2 bd 2 bathroom Apartment in Upper East Side, Richmond\"}]\n", "Observation 15: Cost: The cost of your plan is 389.0 dollars.\n", "Thought 16: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 16: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Large suite with private bathroom (15 min to city), Richmond\"}]\n", "Observation 16: Cost: The cost of your plan is 868.0 dollars.\n", "Thought 17: The accommodation \"Large suite with private bathroom (15 min to city)\" in Richmond is also too expensive at $868. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\n", "Action 17: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 17: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 18: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 18: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"12 East 86th St full furnished, Richmond\"}]\n", "Observation 18: Cost: The cost of your plan is 555.0 dollars.\n", "Thought 19: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 19: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 19: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 20: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 20: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Inviting Brooklyn Studio, Richmond\"}]\n", "Observation 20: Cost: The cost of your plan is 502.0 dollars.\n", "Thought 21: I apologize for the confusion in the previous steps. It seems I have been repeatedly selecting accommodations that are too expensive and not suitable for the budget. I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 21: CostEnquiry[{\"people_number\": 1, \"day\": 1, \"current_city\": \"Richmond\", \"transportation\": \"-\", \"breakfast\": \"-\", \"attraction\": \"Virginia Museum of Fine Arts, Richmond\", \"lunch\": \"Guang Zhou Chinese Restaurant, Richmond\", \"dinner\": \"Sandpiper Restaurant & Lounge, Richmond\", \"accommodation\": \"Gorgeous studio in midtown Manhattan, Richmond\"}]\n", "Observation 21: Cost: The cost of your plan is 316.0 dollars.\n", "Thought 22: I apologize for the confusion in the previous steps. It seems I have been repeatedly selecting accommodations that are too expensive and not suitable for the budget. I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Action 22: I apologize for the repeated errors in the previous steps. It seems I have been mistakenly selecting accommodations that are too expensive and not suitable for the budget. To correct this, I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\n", "Observation 22: Action None is not supported.\",\n" ] } ], "source": [ "print(\"\"\"\"\\nThought 1: The task is to create a 7-day travel plan starting in Philadelphia and visiting 3 different cities in Virginia within a budget of $1,800. The cities to visit in Virginia are Richmond, Petersburg, and Charlottesville. The travel dates are from March 15th to March 21st, 2022. To begin, I need to consider the modes of transportation between these cities, as well as the costs associated with each mode. According to the provided information, there are flights, self-driving options, and taxis available for some of the routes. I also need to account for accommodations, meals, and attractions in each city. Given the budget constraint, it's important to choose cost-effective options for transportation and lodging. I will start by planning the transportation from Philadelphia to the first city in Virginia, which is Richmond.\\nAction 1: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Philadelphia\\\", \\\"transportation\\\": \\\"self-driving, from Philadelphia to Richmond, duration: 4 hours 2 mins, distance: 407 km, cost: 20\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"-\\\", \\\"lunch\\\": \\\"-\\\", \\\"dinner\\\": \\\"-\\\", \\\"accommodation\\\": \\\"-\\\"}]\\nObservation 1: Cost: The cost of your plan is 20 dollars.\\nThought 2: The self-driving option from Philadelphia to Richmond is within budget, costing $20. Now, I need to find accommodation in Richmond for the first night. I will look for an option that is affordable but comfortable, considering the overall budget. After securing accommodation, I will plan for meals and attractions in Richmond for the following day. I will choose attractions that do not have an entry fee listed to keep costs down and select moderately priced restaurants for meals. Once the plan for Richmond is set, I will proceed to plan the transportation to Petersburg, followed by accommodation, meals, and attractions there. The same process will be applied for the trip from Petersburg to Charlottesville and then back to Philadelphia.\\nAction 2: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Cool Summer Vibes UWS Pent House w/ rooftop, Richmond\\\"}]\\nObservation 2: Cost: The cost of your plan is 602.0 dollars.\\nThought 3: The accommodation at \\\"Cool Summer Vibes UWS Pent House w/ rooftop\\\" in Richmond is too expensive, costing $602, which significantly impacts the budget. I need to find a more affordable accommodation option to ensure the budget is maintained throughout the 7-day trip. I will look for a different accommodation that is less expensive and re-calculate the cost for the first day in Richmond, including the chosen attractions and meals.\\nAction 3: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 3: Cost: The cost of your plan is 316.0 dollars.\\nThought 4: The accommodation \\\"Gorgeous studio in midtown Manhattan\\\" in Richmond is still too expensive at $316. I need to select a more budget-friendly accommodation to keep the overall trip within the $1,800 budget. I will choose another accommodation option with a lower price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 4: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"2 bd 2 bathroom Apartment in Upper East Side, Richmond\\\"}]\\nObservation 4: Cost: The cost of your plan is 389.0 dollars.\\nThought 5: The accommodation \\\"2 bd 2 bathroom Apartment in Upper East Side\\\" in Richmond is still not affordable enough at $389. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 5: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Inviting Brooklyn Studio, Richmond\\\"}]\\nObservation 5: Cost: The cost of your plan is 502.0 dollars.\\nThought 6: The accommodation \\\"Inviting Brooklyn Studio\\\" in Richmond is still too expensive at $502. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 6: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Large cozy bedroom close to Times Square 43D4, Richmond\\\"}]\\nObservation 6: Cost: The cost of your plan is 507.0 dollars.\\nThought 7: The accommodation \\\"Large cozy bedroom close to Times Square 43D4\\\" in Richmond is still too expensive at $507. I will need to select the most budget-friendly accommodation option available in the provided data to ensure the trip remains within the $1,800 budget. I will choose another accommodation option with the lowest price and re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 7: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 7: Cost: The cost of your plan is 316.0 dollars.\\nThought 8: It seems there was a mistake in repeating the same accommodation that was previously too expensive. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 8: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"12 East 86th St full furnished, Richmond\\\"}]\\nObservation 8: Cost: The cost of your plan is 555.0 dollars.\\nThought 9: The accommodation \\\"12 East 86th St full furnished\\\" in Richmond is also too expensive at $555. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 9: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 9: Cost: The cost of your plan is 316.0 dollars.\\nThought 10: It appears there was a repeated mistake in selecting accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 10: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 10: Cost: The cost of your plan is 316.0 dollars.\\nThought 11: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 11: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Inviting Brooklyn Studio, Richmond\\\"}]\\nObservation 11: Cost: The cost of your plan is 502.0 dollars.\\nThought 12: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 12: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"12 East 86th St full furnished, Richmond\\\"}]\\nObservation 12: Cost: The cost of your plan is 555.0 dollars.\\nThought 13: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 13: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Large cozy bedroom close to Times Square 43D4, Richmond\\\"}]\\nObservation 13: Cost: The cost of your plan is 507.0 dollars.\\nThought 14: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 14: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 14: Cost: The cost of your plan is 316.0 dollars.\\nThought 15: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 15: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"2 bd 2 bathroom Apartment in Upper East Side, Richmond\\\"}]\\nObservation 15: Cost: The cost of your plan is 389.0 dollars.\\nThought 16: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 16: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Large suite with private bathroom (15 min to city), Richmond\\\"}]\\nObservation 16: Cost: The cost of your plan is 868.0 dollars.\\nThought 17: The accommodation \\\"Large suite with private bathroom (15 min to city)\\\" in Richmond is also too expensive at $868. I need to find the most affordable accommodation option in Richmond to ensure the trip remains within the $1,800 budget. I will review the accommodations list again and select the one with the lowest price, then re-calculate the cost for the first day in Richmond, including the same attractions and meals.\\nAction 17: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 17: Cost: The cost of your plan is 316.0 dollars.\\nThought 18: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 18: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"12 East 86th St full furnished, Richmond\\\"}]\\nObservation 18: Cost: The cost of your plan is 555.0 dollars.\\nThought 19: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 19: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 19: Cost: The cost of your plan is 316.0 dollars.\\nThought 20: There seems to be a mistake in the repeated selection of accommodations that are too expensive. I need to carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 20: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Inviting Brooklyn Studio, Richmond\\\"}]\\nObservation 20: Cost: The cost of your plan is 502.0 dollars.\\nThought 21: I apologize for the confusion in the previous steps. It seems I have been repeatedly selecting accommodations that are too expensive and not suitable for the budget. I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 21: CostEnquiry[{\\\"people_number\\\": 1, \\\"day\\\": 1, \\\"current_city\\\": \\\"Richmond\\\", \\\"transportation\\\": \\\"-\\\", \\\"breakfast\\\": \\\"-\\\", \\\"attraction\\\": \\\"Virginia Museum of Fine Arts, Richmond\\\", \\\"lunch\\\": \\\"Guang Zhou Chinese Restaurant, Richmond\\\", \\\"dinner\\\": \\\"Sandpiper Restaurant & Lounge, Richmond\\\", \\\"accommodation\\\": \\\"Gorgeous studio in midtown Manhattan, Richmond\\\"}]\\nObservation 21: Cost: The cost of your plan is 316.0 dollars.\\nThought 22: I apologize for the confusion in the previous steps. It seems I have been repeatedly selecting accommodations that are too expensive and not suitable for the budget. I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nAction 22: I apologize for the repeated errors in the previous steps. It seems I have been mistakenly selecting accommodations that are too expensive and not suitable for the budget. To correct this, I will now carefully review the accommodations list for Richmond and select the most affordable option that has not been previously chosen. The goal is to find a place to stay that fits within the $1,800 budget for the entire trip, including transportation, meals, and attractions. I will now choose the accommodation with the lowest price from the list provided and re-calculate the cost for the first day in Richmond.\\nObservation 22: Action None is not supported.\",\"\"\")" ] }, { "cell_type": "code", "execution_count": 30, "id": "66872afa", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Please assist me in extracting valid information from a given natural language text and reconstructing it in JSON format, as demonstrated in the following example. If transportation details indicate a journey from one city to another (e.g., from A to B), the \\'current_city\\' should be updated to the destination city (in this case, B). Use a \\';\\' to separate different attractions, with each attraction formatted as \\'Name, City\\'. If there\\'s information about transportation, ensure that the \\'current_city\\' aligns with the destination mentioned in the transportation details (i.e., the current city should follow the format \\'from A to B\\'). Also, ensure that all flight numbers and costs are followed by a colon (i.e., \\'Flight Number:\\' and \\'Cost:\\'), consistent with the provided example. Each item should include [\\'day\\', \\'current_city\\', \\'transportation\\', \\'breakfast\\', \\'attraction\\', \\'lunch\\', \\'dinner\\', \\'accommodation\\']. Replace non-specific information like \\'eat at home/on the road\\' with \\'-\\'. Additionally, delete any \\'$\\' symbols.\\n-----EXAMPLE-----\\n [{{\\n \"days\": 1,\\n \"current_city\": \"from Dallas to Peoria\",\\n \"transportation\": \"Flight Number: 4044830, from Dallas to Peoria, Departure Time: 13:10, Arrival Time: 15:01\",\\n \"breakfast\": \"-\",\\n \"attraction\": \"Peoria Historical Society, Peoria;Peoria Holocaust Memorial, Peoria;\",\\n \"lunch\": \"-\",\\n \"dinner\": \"Tandoor Ka Zaika, Peoria\",\\n \"accommodation\": \"Bushwick Music Mansion, Peoria\"\\n }},\\n {{\\n \"days\": 2,\\n \"current_city\": \"Peoria\",\\n \"transportation\": \"-\",\\n \"breakfast\": \"Tandoor Ka Zaika, Peoria\",\\n \"attraction\": \"Peoria Riverfront Park, Peoria;The Peoria PlayHouse, Peoria;Glen Oak Park, Peoria;\",\\n \"lunch\": \"Cafe Hashtag LoL, Peoria\",\\n \"dinner\": \"The Curzon Room - Maidens Hotel, Peoria\",\\n \"accommodation\": \"Bushwick Music Mansion, Peoria\"\\n }},\\n {{\\n \"days\": 3,\\n \"current_city\": \"from Peoria to Dallas\",\\n \"transportation\": \"Flight Number: 4045904, from Peoria to Dallas, Departure Time: 07:09, Arrival Time: 09:20\",\\n \"breakfast\": \"-\",\\n \"attraction\": \"-\",\\n \"lunch\": \"-\",\\n \"dinner\": \"-\",\\n \"accommodation\": \"-\"\\n }}]\\n-----EXAMPLE END-----\\nText:\\ncontent=\\'Day 1:\\\\nCurrent City: from Memphis to Los Angeles\\\\nTransportation: Flight Number: F0123456, from Memphis to Los Angeles, Departure Time: 08:30, Arrival Time: 10:30\\\\nBreakfast: -\\\\nAttraction: Santa Monica Pier, Los Angeles\\\\nLunch: -\\\\nDinner: -\\\\nAccommodation: Hampton Inn & Suites Los Angeles/Hollywood, Los Angeles\\\\n\\\\nDay 2:\\\\nCurrent City: Los Angeles\\\\nTransportation: -\\\\nBreakfast: -\\\\nAttraction: Hollywood Walk of Fame, Los Angeles; Hollywood Sign, Los Angeles\\\\nLunch: -\\\\nDinner: -\\\\nAccommodation: Hampton Inn & Suites Los Angeles/Hollywood, Los Angeles\\\\n\\\\nDay 3:\\\\nCurrent City: Los Angeles\\\\nTransportation: -\\\\nBreakfast: -\\\\nAttraction: The Getty, Los Angeles; Universal Studios Hollywood, Los Angeles\\\\nLunch: -\\\\nDinner: -\\\\nAccommodation: -\\'\\nJSON:\\n'" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "test_data[23]" ] }, { "cell_type": "code", "execution_count": 8, "id": "d0532d2d", "metadata": {}, "outputs": [], "source": [ "test_data = test_data[500:]" ] }, { "cell_type": "code", "execution_count": 25, "id": "18c25420", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1000" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(test_data)" ] }, { "cell_type": "code", "execution_count": 24, "id": "c5210734", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Thread8线程结束!\n", "Thread7线程结束!\n", "Thread6线程结束!\n", "Thread5线程结束!\n", "Thread4线程结束!\n", "Thread3线程结束!\n", "Thread2线程结束!\n", "Thread1线程结束!\n", "Thread0线程结束!\n", "开始线程: Thread0\n", "开始线程: Thread1\n", "开始线程: Thread2\n", "开始线程: Thread3\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "开始线程: Thread4\n", "开始线程: Thread5\n", "开始线程: Thread6\n", "开始线程: Thread7\n", "开始线程: Thread8\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 0%| | 0/100 [00:00\n", "API error: \n", "API error: \n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", " 51%|█████ | 51/100 [25:11<29:10, 35.73s/it]\u001b[A" ] }, { "name": "stdout", "output_type": "stream", "text": [ "API error: \n", "API error: \n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 61%|██████ | 61/100 [25:14<17:43, 27.27s/it]\n", "\n", "\n", "\n", "\n", "\n", "\n", " 67%|██████▋ | 67/100 [25:18<19:30, 35.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A" ] }, { "name": "stdout", "output_type": "stream", "text": [ "API error: \n", "API error: \n", "API error: \n", "API error: \n", "API error: \n", "API error: \n", "API error: \n", "API error: \n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", "\n", "\n", "\n", "\n", " 62%|██████▏ | 62/100 [25:54<19:43, 31.15s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 60%|██████ | 60/100 [25:54<28:01, 42.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 46%|████▌ | 46/100 [25:58<34:14, 38.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 52%|█████▏ | 52/100 [25:59<31:26, 39.31s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 68%|██████▊ | 68/100 [25:59<19:54, 37.31s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 46%|████▌ | 46/100 [26:06<33:28, 37.20s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 45%|████▌ | 45/100 [26:09<39:03, 42.61s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 34%|███▍ | 34/100 [26:11<1:01:07, 55.57s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 38%|███▊ | 38/100 [26:13<52:32, 50.84s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 45%|████▌ | 45/100 [26:17<38:33, 42.06s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 61%|██████ | 61/100 [26:28<25:42, 39.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 63%|██████▎ | 63/100 [26:30<20:01, 32.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 53%|█████▎ | 53/100 [26:30<28:55, 36.92s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 69%|██████▉ | 69/100 [26:39<19:41, 38.12s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 46%|████▌ | 46/100 [26:47<34:46, 38.64s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 62%|██████▏ | 62/100 [27:00<23:38, 37.34s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", " 54%|█████▍ | 54/100 [27:03<27:30, 35.88s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 35%|███▌ | 35/100 [27:05<59:32, 54.96s/it] \u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 47%|████▋ | 47/100 [27:09<38:31, 43.62s/it]\u001b[A\u001b[A\n", "\n", "\n", " 39%|███▉ | 39/100 [27:13<54:21, 53.46s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 48%|████▊ | 48/100 [27:20<34:54, 40.28s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 46%|████▌ | 46/100 [27:21<45:06, 50.11s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 70%|███████ | 70/100 [27:22<19:40, 39.35s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 47%|████▋ | 47/100 [27:28<34:37, 39.21s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 63%|██████▎ | 63/100 [27:28<21:15, 34.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", " 55%|█████▌ | 55/100 [27:42<27:36, 36.81s/it]\u001b[A\n", "\n", " 48%|████▊ | 48/100 [27:48<36:37, 42.26s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 71%|███████ | 71/100 [27:49<17:18, 35.81s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [27:53<18:57, 31.58s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 47%|████▋ | 47/100 [27:54<40:10, 45.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 36%|███▌ | 36/100 [27:56<57:31, 53.93s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 48%|████▊ | 48/100 [28:02<32:46, 37.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 49%|████▉ | 49/100 [28:05<35:20, 41.58s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 40%|████ | 40/100 [28:09<54:20, 54.34s/it]\u001b[A\u001b[A\u001b[A" ] }, { "name": "stdout", "output_type": "stream", "text": [ "API error: \n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n", " 56%|█████▌ | 56/100 [28:16<26:21, 35.94s/it]\u001b[A\n", "\n", " 49%|████▉ | 49/100 [28:28<35:21, 41.60s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 48%|████▊ | 48/100 [28:29<36:50, 42.52s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [28:34<18:01, 38.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 37%|███▋ | 37/100 [28:39<53:07, 50.59s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [28:45<22:01, 37.75s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [28:51<39:00, 65.02s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 57%|█████▋ | 57/100 [28:52<25:44, 35.91s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [29:10<29:56, 51.32s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 41%|████ | 41/100 [29:11<55:41, 56.64s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 49%|████▉ | 49/100 [29:12<36:19, 42.73s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 50%|█████ | 50/100 [29:15<36:06, 43.34s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 73%|███████▎ | 73/100 [29:17<17:53, 39.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 50%|█████ | 50/100 [29:20<31:25, 37.71s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 66%|██████▌ | 66/100 [29:23<21:28, 37.90s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", " 58%|█████▊ | 58/100 [29:34<26:19, 37.60s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 66%|██████▌ | 66/100 [29:35<24:39, 43.52s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 38%|███▊ | 38/100 [29:36<54:15, 52.51s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [29:46<15:50, 36.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 51%|█████ | 51/100 [29:54<29:50, 36.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 67%|██████▋ | 67/100 [29:56<19:55, 36.23s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 50%|█████ | 50/100 [29:56<35:56, 43.12s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 67%|██████▋ | 67/100 [30:01<20:59, 38.17s/it]\u001b[A\u001b[A\n", "\n", "\n", " 43%|████▎ | 43/100 [30:10<41:49, 44.03s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 39%|███▉ | 39/100 [30:15<49:14, 48.43s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 52%|█████▏ | 52/100 [30:17<33:55, 42.41s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 68%|██████▊ | 68/100 [30:26<18:18, 34.32s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [30:36<16:55, 40.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 69%|██████▉ | 69/100 [30:39<15:14, 29.50s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 52%|█████▏ | 52/100 [30:39<31:14, 39.05s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 69%|██████▉ | 69/100 [30:45<15:19, 29.66s/it]\u001b[A\u001b[A\n", " 61%|██████ | 61/100 [30:53<18:45, 28.85s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 52%|█████▏ | 52/100 [30:59<30:18, 37.88s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 70%|███████ | 70/100 [31:04<13:11, 26.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 44%|████▍ | 44/100 [31:11<45:09, 48.39s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 70%|███████ | 70/100 [31:13<15:16, 30.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 53%|█████▎ | 53/100 [31:14<36:40, 46.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 62%|██████▏ | 62/100 [31:14<17:09, 27.10s/it]\u001b[A\n", "\n", "\n", "\n", "\n", " 53%|█████▎ | 53/100 [31:15<29:50, 38.10s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 40%|████ | 40/100 [31:20<53:23, 53.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 71%|███████ | 71/100 [31:23<11:38, 24.10s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [31:31<13:05, 34.15s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 63%|██████▎ | 63/100 [31:39<16:23, 26.58s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 53%|█████▎ | 53/100 [31:40<30:14, 38.61s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [31:41<11:07, 23.85s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [31:51<11:46, 25.25s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 54%|█████▍ | 54/100 [31:58<35:20, 46.10s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 73%|███████▎ | 73/100 [32:08<10:21, 23.02s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 41%|████ | 41/100 [32:16<53:28, 54.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 55%|█████▌ | 55/100 [32:17<25:55, 34.58s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 56%|█████▌ | 56/100 [32:18<26:11, 35.71s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [32:19<14:02, 38.28s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 64%|██████▍ | 64/100 [32:21<18:22, 30.63s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [32:25<09:06, 21.03s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 55%|█████▌ | 55/100 [32:28<30:53, 41.19s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [32:29<10:19, 23.83s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 75%|███████▌ | 75/100 [32:43<08:26, 20.24s/it]\u001b[A\u001b[A\u001b[A\n", " 66%|██████▌ | 66/100 [32:47<13:00, 22.94s/it]\u001b[A\n", "\n", " 58%|█████▊ | 58/100 [32:49<19:24, 27.73s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 56%|█████▌ | 56/100 [32:53<25:47, 35.17s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [32:53<12:58, 37.09s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 56%|█████▌ | 56/100 [32:56<27:22, 37.33s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 76%|███████▌ | 76/100 [33:17<09:46, 24.45s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [33:20<12:17, 29.50s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 57%|█████▋ | 57/100 [33:21<23:44, 33.13s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 48%|████▊ | 48/100 [33:25<35:01, 40.41s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 42%|████▏ | 42/100 [33:28<57:37, 59.60s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 57%|█████▋ | 57/100 [33:30<25:57, 36.23s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 67%|██████▋ | 67/100 [33:32<15:33, 28.28s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [33:36<12:56, 38.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 68%|██████▊ | 68/100 [33:42<12:34, 23.57s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [33:47<09:59, 26.07s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 76%|███████▌ | 76/100 [33:50<11:50, 29.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 58%|█████▊ | 58/100 [33:52<22:39, 32.37s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 49%|████▉ | 49/100 [33:52<31:19, 36.85s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 59%|█████▉ | 59/100 [33:52<24:16, 35.52s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [34:12<09:21, 25.54s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 50%|█████ | 50/100 [34:12<26:46, 32.14s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 58%|█████▊ | 58/100 [34:13<26:55, 38.46s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [34:17<12:28, 39.39s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [34:19<11:21, 29.63s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 51%|█████ | 51/100 [34:26<22:16, 27.27s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 61%|██████ | 61/100 [34:28<18:39, 28.70s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [34:29<08:05, 23.14s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 69%|██████▉ | 69/100 [34:32<15:49, 30.63s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 44%|████▍ | 44/100 [34:38<44:01, 47.17s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 59%|█████▉ | 59/100 [34:48<26:52, 39.33s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 52%|█████▏ | 52/100 [34:49<20:45, 25.96s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [34:50<07:27, 22.36s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [34:59<11:47, 32.16s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", " 70%|███████ | 70/100 [35:08<15:58, 31.96s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 46%|████▌ | 46/100 [35:08<29:14, 32.49s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 59%|█████▉ | 59/100 [35:10<25:42, 37.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 60%|██████ | 60/100 [35:13<23:22, 35.07s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 59%|█████▉ | 59/100 [35:18<31:41, 46.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 62%|██████▏ | 62/100 [35:19<21:14, 33.55s/it]\u001b[A\u001b[A\n", "\n", "\n", " 81%|████████ | 81/100 [35:27<08:30, 26.85s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [35:31<11:13, 32.07s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [35:32<11:01, 38.90s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 54%|█████▍ | 54/100 [35:41<19:28, 25.39s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 47%|████▋ | 47/100 [35:42<28:52, 32.70s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 82%|████████▏ | 82/100 [35:43<07:06, 23.68s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 60%|██████ | 60/100 [35:44<26:49, 40.23s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 71%|███████ | 71/100 [35:48<16:33, 34.28s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [36:03<06:23, 22.55s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 63%|██████▎ | 63/100 [36:06<22:35, 36.65s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 62%|██████▏ | 62/100 [36:07<19:24, 30.64s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [36:07<11:03, 33.19s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 55%|█████▌ | 55/100 [36:14<20:40, 27.56s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 48%|████▊ | 48/100 [36:16<28:46, 33.20s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 61%|██████ | 61/100 [36:21<25:30, 39.24s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [36:27<06:07, 22.98s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 63%|██████▎ | 63/100 [36:28<15:57, 25.87s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 72%|███████▏ | 72/100 [36:38<18:05, 38.76s/it]\u001b[A\n", "\n", "\n", " 85%|████████▌ | 85/100 [36:47<05:29, 21.94s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 85%|████████▌ | 85/100 [36:47<09:16, 37.08s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 63%|██████▎ | 63/100 [36:57<22:30, 36.49s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 57%|█████▋ | 57/100 [36:59<17:40, 24.66s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 64%|██████▍ | 64/100 [37:03<25:03, 41.76s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [37:04<12:40, 40.02s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", " 73%|███████▎ | 73/100 [37:06<16:06, 35.79s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 62%|██████▏ | 62/100 [37:09<26:25, 41.72s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [37:11<05:18, 22.73s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 58%|█████▊ | 58/100 [37:18<16:09, 23.07s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [37:19<18:44, 31.25s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [37:22<19:54, 33.19s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [37:26<08:47, 37.65s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [37:30<04:40, 21.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 59%|█████▉ | 59/100 [37:31<13:36, 19.91s/it]\u001b[A\u001b[A\u001b[A\n", " 74%|███████▍ | 74/100 [37:36<14:45, 34.04s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 63%|██████▎ | 63/100 [37:37<23:11, 37.60s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 65%|██████▌ | 65/100 [37:43<24:06, 41.32s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 50%|█████ | 50/100 [37:44<31:11, 37.42s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 60%|██████ | 60/100 [37:49<12:55, 19.38s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [37:50<07:17, 33.69s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [37:51<18:33, 31.81s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [38:02<19:47, 33.92s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 75%|███████▌ | 75/100 [38:04<13:26, 32.27s/it]\u001b[A\n", "\n", "\n", " 88%|████████▊ | 88/100 [38:06<05:09, 25.75s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [38:06<21:03, 35.09s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [38:10<10:36, 37.46s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [38:19<06:26, 32.20s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [38:24<03:01, 18.18s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 66%|██████▌ | 66/100 [38:28<24:01, 42.40s/it]\u001b[A\u001b[A\n", "\n", "\n", " 62%|██████▏ | 62/100 [38:29<12:45, 20.14s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 51%|█████ | 51/100 [38:31<32:46, 40.13s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [38:35<19:25, 33.30s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 91%|█████████ | 91/100 [38:43<02:44, 18.31s/it]\u001b[A\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [38:44<09:41, 36.37s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 66%|██████▌ | 66/100 [38:48<20:57, 36.98s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [38:52<05:56, 32.43s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 63%|██████▎ | 63/100 [39:02<14:40, 23.79s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [39:07<02:37, 19.70s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 85%|████████▌ | 85/100 [39:14<08:37, 34.51s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 93%|█████████▎| 93/100 [39:19<02:03, 17.65s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 77%|███████▋ | 77/100 [39:26<14:23, 37.53s/it]\u001b[A\n", "\n", "\n", " 64%|██████▍ | 64/100 [39:27<14:32, 24.24s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [39:29<05:39, 33.92s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 94%|█████████▍| 94/100 [39:35<01:43, 17.32s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [39:43<07:38, 32.77s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 53%|█████▎ | 53/100 [39:44<29:25, 37.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 67%|██████▋ | 67/100 [39:49<29:13, 53.13s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [39:55<01:30, 18.02s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [40:01<03:24, 25.59s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 65%|██████▌ | 65/100 [40:01<15:52, 27.22s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 68%|██████▊ | 68/100 [40:04<19:50, 37.19s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 68%|██████▊ | 68/100 [40:05<22:37, 42.44s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 78%|███████▊ | 78/100 [40:14<14:56, 40.77s/it]\u001b[A\n", "\n", "\n", " 96%|█████████▌| 96/100 [40:17<01:16, 19.23s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 67%|██████▋ | 67/100 [40:19<22:30, 40.92s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 54%|█████▍ | 54/100 [40:21<28:44, 37.49s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [40:27<07:52, 36.35s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [40:38<00:59, 19.78s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 67%|██████▋ | 67/100 [40:40<13:02, 23.71s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 70%|███████ | 70/100 [40:42<15:42, 31.43s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 69%|██████▉ | 69/100 [40:45<19:45, 38.25s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 68%|██████▊ | 68/100 [40:49<29:22, 55.07s/it]\u001b[A\u001b[A\n", " 79%|███████▉ | 79/100 [40:51<13:51, 39.58s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 68%|██████▊ | 68/100 [40:53<20:40, 38.77s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [40:57<06:51, 34.27s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 68%|██████▊ | 68/100 [40:59<11:54, 22.33s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 55%|█████▌ | 55/100 [41:01<28:34, 38.10s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 94%|█████████▍| 94/100 [41:08<02:52, 28.81s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [41:15<00:49, 24.68s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 80%|████████ | 80/100 [41:17<11:48, 35.41s/it]\u001b[A\n", "\n", "\n", "\n", "\n", " 71%|███████ | 71/100 [41:17<15:39, 32.41s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 69%|██████▉ | 69/100 [41:21<11:30, 22.27s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 69%|██████▉ | 69/100 [41:27<25:58, 50.27s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [41:31<06:15, 34.13s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [41:34<02:19, 27.98s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [41:41<00:25, 25.15s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 70%|███████ | 70/100 [41:43<11:09, 22.30s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 56%|█████▌ | 56/100 [41:45<29:16, 39.91s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [41:57<00:00, 25.18s/it][A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 70%|███████ | 70/100 [41:57<22:13, 44.44s/it]\u001b[A\u001b[A\n", " 81%|████████ | 81/100 [41:58<11:46, 37.19s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 96%|█████████▌| 96/100 [42:01<01:51, 27.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [42:03<05:35, 33.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 71%|███████ | 71/100 [42:07<10:55, 22.60s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 70%|███████ | 70/100 [42:12<19:21, 38.70s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [42:22<16:25, 35.20s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 82%|████████▏ | 82/100 [42:25<10:11, 33.95s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [42:28<01:22, 27.60s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 72%|███████▏ | 72/100 [42:32<10:52, 23.29s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [42:34<03:21, 25.18s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 57%|█████▋ | 57/100 [42:38<31:24, 43.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 71%|███████ | 71/100 [42:43<17:35, 36.41s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [42:48<22:17, 47.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 73%|███████▎ | 73/100 [42:57<10:44, 23.87s/it]\u001b[A\u001b[A\u001b[A\n", " 83%|████████▎ | 83/100 [42:58<09:34, 33.80s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [43:02<00:59, 29.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 93%|█████████▎| 93/100 [43:04<03:05, 26.49s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 73%|███████▎ | 73/100 [43:05<16:55, 37.63s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [43:06<15:07, 32.40s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 71%|███████ | 71/100 [43:11<25:40, 53.13s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 58%|█████▊ | 58/100 [43:17<29:42, 42.45s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 74%|███████▍ | 74/100 [43:20<10:16, 23.73s/it]\u001b[A\u001b[A\u001b[A\n", " 84%|████████▍ | 84/100 [43:23<08:18, 31.14s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 73%|███████▎ | 73/100 [43:32<13:47, 30.66s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [43:38<00:31, 31.30s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 75%|███████▌ | 75/100 [43:42<09:41, 23.26s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 72%|███████▏ | 72/100 [43:48<22:28, 48.18s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", " 94%|█████████▍| 94/100 [43:49<03:08, 31.39s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 59%|█████▉ | 59/100 [43:51<27:21, 40.03s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 85%|████████▌ | 85/100 [43:52<07:37, 30.50s/it]\u001b[A\n", "\n", "\n", "\n", "\n", " 73%|███████▎ | 73/100 [43:53<23:36, 52.46s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [43:58<18:15, 42.14s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 76%|███████▌ | 76/100 [44:05<09:12, 23.01s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [44:08<00:00, 26.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [44:13<14:36, 33.72s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 77%|███████▋ | 77/100 [44:19<07:51, 20.49s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [44:33<02:53, 34.73s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [44:38<21:44, 50.18s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 78%|███████▊ | 78/100 [44:42<07:43, 21.09s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 60%|██████ | 60/100 [44:44<29:07, 43.68s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 86%|████████▌ | 86/100 [44:44<08:39, 37.12s/it]\u001b[A\n", "\n", " 73%|███████▎ | 73/100 [44:46<23:01, 51.15s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [44:48<14:10, 34.01s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [45:00<19:57, 47.91s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 79%|███████▉ | 79/100 [45:05<07:37, 21.78s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 80%|████████ | 80/100 [45:23<06:50, 20.52s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 74%|███████▍ | 74/100 [45:24<20:29, 47.29s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ " 76%|███████▌ | 76/100 [45:24<13:55, 34.81s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [45:28<20:52, 50.11s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 87%|████████▋ | 87/100 [45:28<08:29, 39.16s/it]\u001b[A\n", "\n", "\n", "\n", " 96%|█████████▌| 96/100 [45:32<02:46, 41.60s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 76%|███████▌ | 76/100 [45:34<17:35, 43.97s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [45:57<13:06, 34.18s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 81%|████████ | 81/100 [45:58<07:54, 25.00s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [46:01<01:53, 37.85s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 75%|███████▌ | 75/100 [46:05<18:55, 45.41s/it]\u001b[A\u001b[A\n", " 88%|████████▊ | 88/100 [46:09<07:53, 39.50s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 61%|██████ | 61/100 [46:11<36:47, 56.61s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 76%|███████▌ | 76/100 [46:18<20:04, 50.19s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 82%|████████▏ | 82/100 [46:21<07:16, 24.26s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [46:29<18:01, 47.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 89%|████████▉ | 89/100 [46:35<06:32, 35.68s/it]\u001b[A\n", "\n", "\n", " 83%|████████▎ | 83/100 [46:41<06:30, 22.94s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [46:43<01:18, 39.24s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 64%|██████▍ | 64/100 [46:46<18:52, 31.46s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 76%|███████▌ | 76/100 [46:49<18:01, 45.05s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [46:53<14:53, 40.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 77%|███████▋ | 77/100 [46:56<17:55, 46.75s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 90%|█████████ | 90/100 [47:05<05:39, 33.97s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [47:07<16:15, 44.33s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 84%|████████▍ | 84/100 [47:08<06:28, 24.29s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [47:15<00:37, 37.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [47:18<12:36, 36.02s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 85%|████████▌ | 85/100 [47:28<05:45, 23.06s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 77%|███████▋ | 77/100 [47:37<17:36, 45.92s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 65%|██████▌ | 65/100 [47:39<21:01, 36.04s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 91%|█████████ | 91/100 [47:42<05:13, 34.81s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [47:48<11:23, 34.16s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [47:49<17:45, 48.41s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 86%|████████▌ | 86/100 [48:00<05:59, 25.68s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "100%|██████████| 100/100 [48:04<00:00, 28.84s/it]\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [48:06<17:05, 48.83s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 92%|█████████▏| 92/100 [48:12<04:25, 33.17s/it]\u001b[A\n", "\n", "\n", " 87%|████████▋ | 87/100 [48:18<05:02, 23.25s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [48:24<10:59, 34.73s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 66%|██████▌ | 66/100 [48:30<22:22, 39.48s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 93%|█████████▎| 93/100 [48:41<03:44, 32.11s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [48:45<15:15, 45.78s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 88%|████████▊ | 88/100 [48:48<05:04, 25.39s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 82%|████████▏ | 82/100 [48:58<10:20, 34.45s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 78%|███████▊ | 78/100 [49:01<20:58, 57.19s/it]\u001b[A\u001b[A\n", " 94%|█████████▍| 94/100 [49:20<03:24, 34.07s/it]\u001b[A\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [49:22<21:33, 61.58s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 89%|████████▉ | 89/100 [49:24<05:14, 28.57s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 67%|██████▋ | 67/100 [49:28<24:10, 43.95s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [49:33<09:47, 34.56s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 90%|█████████ | 90/100 [49:44<04:20, 26.03s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 79%|███████▉ | 79/100 [49:46<18:44, 53.55s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [49:53<16:38, 52.54s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 95%|█████████▌| 95/100 [49:56<02:53, 34.67s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [50:14<09:44, 36.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [50:17<19:52, 59.63s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 96%|█████████▌| 96/100 [50:20<02:06, 31.59s/it]\u001b[A\n", "\n", "\n", " 91%|█████████ | 91/100 [50:23<04:29, 29.99s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 68%|██████▊ | 68/100 [50:26<25:24, 47.63s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 80%|████████ | 80/100 [50:29<16:46, 50.33s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 82%|████████▏ | 82/100 [50:29<14:17, 47.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 92%|█████████▏| 92/100 [50:47<03:43, 27.99s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [50:52<06:39, 28.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 97%|█████████▋| 97/100 [50:53<01:35, 31.93s/it]\u001b[A\n", "\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [50:54<16:44, 52.89s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [50:54<11:34, 40.83s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 93%|█████████▎| 93/100 [51:04<02:54, 24.86s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 81%|████████ | 81/100 [51:10<15:05, 47.65s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 69%|██████▉ | 69/100 [51:11<24:19, 47.10s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [51:20<09:43, 36.49s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", " 98%|█████████▊| 98/100 [51:21<01:01, 30.68s/it]\u001b[A\n", "\n", "\n", " 94%|█████████▍| 94/100 [51:28<02:26, 24.45s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [51:33<06:52, 31.71s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 85%|████████▌ | 85/100 [51:43<08:04, 32.28s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 95%|█████████▌| 95/100 [51:55<02:06, 25.29s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 82%|████████▏ | 82/100 [51:58<14:19, 47.75s/it]\u001b[A\u001b[A\n", " 99%|█████████▉| 99/100 [51:59<00:32, 32.88s/it]\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [52:04<04:47, 22.14s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [52:08<12:56, 45.66s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 71%|███████ | 71/100 [52:09<18:53, 39.07s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 96%|█████████▌| 96/100 [52:14<01:33, 23.36s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [52:20<07:06, 35.54s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [52:24<04:20, 21.75s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "100%|██████████| 100/100 [52:36<00:00, 31.56s/it]\u001b[A\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [52:40<01:12, 24.04s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [52:49<04:09, 22.66s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [52:50<11:54, 44.63s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 83%|████████▎ | 83/100 [52:59<14:39, 51.74s/it]\u001b[A\u001b[A\n", "\n", "\n", " 98%|█████████▊| 98/100 [53:01<00:46, 23.26s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 72%|███████▏ | 72/100 [53:03<19:57, 42.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [53:10<03:39, 21.99s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [53:14<07:27, 40.72s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", " 99%|█████████▉| 99/100 [53:30<00:24, 24.89s/it]\u001b[A\u001b[A\u001b[A\n", "\n", " 84%|████████▍ | 84/100 [53:39<12:52, 48.26s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 85%|████████▌ | 85/100 [53:39<11:30, 46.00s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 91%|█████████ | 91/100 [53:41<03:40, 24.55s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 73%|███████▎ | 73/100 [53:42<18:48, 41.80s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [53:45<06:17, 37.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "100%|██████████| 100/100 [54:00<00:00, 32.40s/it]\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [54:09<03:24, 25.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 93%|█████████▎| 93/100 [54:34<02:58, 25.46s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 74%|███████▍ | 74/100 [54:34<19:16, 44.50s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [54:36<04:18, 32.34s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 86%|████████▌ | 86/100 [54:42<09:25, 40.37s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [54:42<11:47, 50.55s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 94%|█████████▍| 94/100 [54:49<02:13, 22.30s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [55:05<01:42, 20.47s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 93%|█████████▎| 93/100 [55:15<03:57, 33.97s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [55:22<10:19, 47.65s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 87%|████████▋ | 87/100 [55:25<08:54, 41.15s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 96%|█████████▌| 96/100 [55:25<01:21, 20.45s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 75%|███████▌ | 75/100 [55:35<20:23, 48.94s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [55:40<00:56, 18.82s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 94%|█████████▍| 94/100 [55:49<03:23, 33.96s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 88%|████████▊ | 88/100 [55:55<07:37, 38.08s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [56:00<00:38, 19.16s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 76%|███████▌ | 76/100 [56:13<18:23, 45.96s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [56:17<00:18, 18.47s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [56:22<10:11, 50.99s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [56:37<00:00, 33.97s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [56:41<03:14, 38.98s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 89%|████████▉ | 89/100 [56:44<07:31, 41.04s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [56:56<08:29, 46.28s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 78%|███████▊ | 78/100 [57:07<13:45, 37.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 90%|█████████ | 90/100 [57:17<06:27, 38.79s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 96%|█████████▌| 96/100 [57:33<02:50, 42.51s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 79%|███████▉ | 79/100 [57:40<12:42, 36.29s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [57:50<08:03, 48.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 91%|█████████ | 91/100 [57:53<05:42, 38.10s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [58:05<01:58, 39.53s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 80%|████████ | 80/100 [58:24<12:47, 38.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 92%|█████████▏| 92/100 [58:27<04:55, 36.92s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 91%|█████████ | 91/100 [58:29<06:50, 45.62s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [58:56<01:25, 42.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [59:02<05:35, 41.97s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 93%|█████████▎| 93/100 [59:04<04:18, 36.96s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 81%|████████ | 81/100 [59:14<13:06, 41.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 94%|█████████▍| 94/100 [59:42<03:43, 37.24s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [59:49<00:45, 45.83s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [59:52<02:18, 27.73s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 82%|████████▏ | 82/100 [59:57<12:32, 41.80s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 95%|█████████▌| 95/100 [1:00:25<03:15, 39.11s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [1:00:28<00:00, 36.28s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 83%|████████▎ | 83/100 [1:00:50<12:43, 44.90s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [1:01:06<01:33, 31.08s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 96%|█████████▌| 96/100 [1:01:08<02:40, 40.12s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [1:01:39<01:02, 31.44s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 84%|████████▍ | 84/100 [1:01:43<12:38, 47.38s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 98%|█████████▊| 98/100 [1:02:08<01:11, 35.51s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 85%|████████▌ | 85/100 [1:02:25<11:27, 45.85s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [1:02:38<00:37, 37.41s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", " 99%|█████████▉| 99/100 [1:02:52<00:37, 37.61s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 86%|████████▌ | 86/100 [1:03:08<10:31, 45.10s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "100%|██████████| 100/100 [1:03:30<00:00, 38.11s/it]\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [1:03:42<00:00, 38.23s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 87%|████████▋ | 87/100 [1:04:11<10:54, 50.34s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 88%|████████▊ | 88/100 [1:05:09<10:30, 52.51s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 89%|████████▉ | 89/100 [1:05:56<09:18, 50.78s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 90%|█████████ | 90/100 [1:06:43<08:17, 49.79s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 92%|█████████▏| 92/100 [1:07:54<05:45, 43.15s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 93%|█████████▎| 93/100 [1:08:29<04:47, 41.13s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 95%|█████████▌| 95/100 [1:09:19<02:52, 34.47s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 96%|█████████▌| 96/100 [1:09:55<02:19, 34.90s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 97%|█████████▋| 97/100 [1:10:44<01:54, 38.32s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 98%|█████████▊| 98/100 [1:11:22<01:16, 38.26s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", " 99%|█████████▉| 99/100 [1:11:52<00:35, 35.85s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "100%|██████████| 100/100 [1:12:56<00:00, 43.76s/it]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A" ] }, { "name": "stdout", "output_type": "stream", "text": [ "主进程结束!\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "\n" ] } ], "source": [ "import threading\n", "import time\n", "import warnings\n", "\n", "warnings.filterwarnings('ignore')\n", "\n", "total_price = 0\n", "save_file_name = f\"../data/api_request/{set_type}_{model_name}_{method}\"\n", "# model = 'gpt-3.5-turbo-1106'\n", "model = 'gpt-4-1106-preview'\n", "\n", "class gpt4RequestThread(threading.Thread):\n", " def __init__(self,name,data,save_file):\n", " threading.Thread.__init__(self)\n", " self.name = name\n", " self.data = data\n", " self.save_file = save_file\n", " def run(self):\n", " print (\"开始线程:\",self.name)\n", " # 获得锁,成功获得锁定后返回 True\n", " # 可选的timeout参数不填时将一直阻塞直到获得锁定\n", " # 否则超时后将返回 False\n", " request(self.data,self.save_file)\n", "# threadLock.acquire()\n", "# total_price += price \n", "# # 释放锁\n", "# threadLock.release()\n", " def __del__(self):\n", " print (self.name+\"线程结束!\")\n", " \n", " \n", "def request(data,save_file):\n", " global total_price\n", " for idx,prompt in enumerate(tqdm(data)):\n", " if prompt==\"\":\n", " with open(save_file,'a+',encoding='utf-8') as f:\n", " assistant_output = str(idx)\n", " f.write(assistant_output+'\\n')\n", " continue\n", " results, _, price = prompt_chatgpt(\"You are a helpful assistant.\",index=idx,save_path=save_file,user_input=prompt,model_name=model,temperature=1)\n", " threadLock.acquire()\n", " total_price += price\n", " threadLock.release()\n", " \n", " \n", "threadLock = threading.Lock()\n", "threads = []\n", "# 创建新线程\n", "thread_number = 10\n", "for idx in range(thread_number):\n", " if idx < (thread_number-1):\n", " thread = gpt4RequestThread(\"Thread\"+str(idx),test_data[idx*(len(test_data)//thread_number):(idx+1)*(len(test_data)//thread_number)],save_file_name+\"_t{}.txt\".format(idx).format(idx))\n", " else:\n", " thread = gpt4RequestThread(\"Thread\"+str(idx),test_data[idx*(len(test_data)//thread_number):],save_file_name+\"_t{}.txt\".format(idx))\n", " thread.start()\n", " threads.append(thread)\n", "for t in threads:\n", " t.join()\n", "print(\"主进程结束!\")\n", "\n", "combination_data = []\n", "for idx in range(thread_number):\n", " lines = open(save_file_name+\"_t{}.txt\".format(idx),'r',encoding='utf-8').read().strip().split('\\n')\n", " combination_data+=lines\n", "with open(save_file_name+\".txt\",'w',encoding='utf-8') as f:\n", " for line in combination_data:\n", " f.write(line+'\\n')" ] }, { "cell_type": "code", "execution_count": 25, "id": "f674ae2e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "86.08119999999997" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "total_price" ] }, { "cell_type": "code", "execution_count": 85, "id": "83f67a0a", "metadata": {}, "outputs": [], "source": [ "combination_data = []\n", "for idx in range(thread_number):\n", " lines = open(save_file_name+\"_t{}.txt\".format(idx),'r',encoding='utf-8').read().strip().split('\\n')\n", " combination_data+=lines\n", "with open(save_file_name+\".txt\",'w',encoding='utf-8') as f:\n", " for line in combination_data:\n", " f.write(line+'\\n')" ] }, { "cell_type": "code", "execution_count": null, "id": "be1e2e08", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 5 }