SYMBOL INDEX (259 symbols across 27 files) FILE: agents/recode/agent.py class ReCodeAgent (line 28) | class ReCodeAgent(Agent): method __init__ (line 29) | def __init__( method reset (line 44) | def reset(self, running_config: dict, init_info: dict=None) -> None: method _load_resources (line 72) | def _load_resources(self): method act (line 87) | async def act(self, observations: List[str]) -> List[str]: method _handle_stub (line 120) | async def _handle_stub(self) -> None: method _expand (line 143) | async def _expand(self) -> Optional[List[str]]: method _execute (line 181) | def _execute(self, code: str) -> dict: method _init_code_tree (line 184) | def _init_code_tree(self, observation: str) -> None: method _build_expand_prompt (line 192) | def _build_expand_prompt(self) -> str: method _get_max_depth (line 200) | def _get_max_depth(self, node: Optional[CodeNode]) -> int: method _get_formatted_tree (line 210) | def _get_formatted_tree(self) -> dict: method report (line 253) | def report(self) -> dict: FILE: agents/recode/utils.py function parse_raw_observation (line 9) | def parse_raw_observation(raw_observation: str, env_name: str) -> tuple[... class NodeStatus (line 25) | class NodeStatus(str, Enum): class CodeNode (line 33) | class CodeNode: method __post_init__ (line 44) | def __post_init__(self): method next (line 47) | def next(self) -> Optional['CodeNode']: method clear (line 65) | def clear(self) -> None: function split_blocks (line 71) | def split_blocks(source: str) -> List[str]: function validate_blocks (line 133) | def validate_blocks(blocks: List[str]) -> None: function get_variables (line 151) | def get_variables(executor: Executor, code: str) -> str: FILE: base/agent.py class Agent (line 4) | class Agent(ABC): method act (line 6) | async def act(self, observations: List[str]) -> List[str]: method reset (line 10) | def reset(self, running_config: dict, init_info: dict=None) -> None: method report (line 14) | def report(self) -> dict: FILE: base/environment.py class Env (line 5) | class Env(ABC): method _run (line 12) | async def _run(self, action: str) -> Any: method run (line 15) | async def run(self, action: List[str]) -> List[str]: method is_done (line 31) | def is_done(self) -> bool: method is_success (line 34) | def is_success(self) -> bool: method reset (line 38) | def reset(self, running_config: dict, id: Optional[str] = None) -> dict: method get_step_count (line 41) | def get_step_count(self) -> int: method report (line 45) | def report(self) -> dict: method close (line 48) | async def close(self) -> None: FILE: envs/alfworld/env.py class AlfworldEnv (line 31) | class AlfworldEnv(Env): method __init__ (line 36) | def __init__( method _get_game_files (line 60) | def _get_game_files(self, seed: int = 42) -> List[str]: method _normalize_split_for_alfworld (line 144) | def _normalize_split_for_alfworld(self, split: str) -> str: method _initialize (line 153) | def _initialize(self) -> None: method _configure_for_specific_game (line 207) | def _configure_for_specific_game(self, config: Dict[str, Any], game_fi... method reset (line 238) | def reset(self, running_config: dict, id: Optional[str] = None) -> dict: method set_max_steps (line 308) | def set_max_steps(self, max_steps: int) -> None: method _run (line 311) | async def _run(self, single_action: str) -> str: method report (line 353) | def report(self) -> dict: method close (line 361) | async def close(self) -> None: FILE: envs/sciworld/env.py class SciWorldEnv (line 13) | class SciWorldEnv(Env): method __init__ (line 21) | def __init__( method _initialize (line 47) | def _initialize(self) -> None: method _load_indices (line 69) | def _load_indices(self, split: str, seed: int) -> List[int]: method reset (line 91) | def reset(self, running_config: dict, id: Optional[str] = None) -> dict: method _run (line 131) | async def _run(self, single_action: str) -> str: method is_done (line 167) | def is_done(self) -> bool: method get_step_count (line 172) | def get_step_count(self) -> int: method is_success (line 175) | def is_success(self) -> bool: method report (line 179) | def report(self): method close (line 187) | async def close(self) -> None: FILE: envs/webshop/env.py function clean_str (line 17) | def clean_str(p): function tag_visible (line 21) | def tag_visible(element): function webshop_text (line 28) | def webshop_text(html_content, max_products=10): function _get_shared_server (line 107) | def _get_shared_server( class WebShopEnv (line 128) | class WebShopEnv(Env): method __init__ (line 131) | def __init__( method _ensure_session_asins (line 176) | def _ensure_session_asins(self): method reset (line 187) | def reset(self, running_config: dict, id: Optional[str] = None): method _format_observation (line 256) | def _format_observation(self, observation: str) -> str: method _run (line 277) | async def _run(self, action: str): method _get_current_url (line 400) | def _get_current_url(self): method is_done (line 414) | def is_done(self): method is_success (line 418) | def is_success(self): method get_step_count (line 428) | def get_step_count(self): method get_reward (line 432) | def get_reward(self): method get_available_actions (line 436) | def get_available_actions(self): method get_instruction_text (line 440) | def get_instruction_text(self): method get_trajectory (line 444) | def get_trajectory(self): method close (line 448) | async def close(self) -> None: method report (line 495) | def report(self): FILE: envs/webshop/src/webshop/transfer/app.py function process_str (line 28) | def process_str(s): function process_goal (line 34) | def process_goal(state): function data_collator (line 43) | def data_collator(batch): function bart_predict (line 66) | def bart_predict(input): function bert_predict (line 73) | def bert_predict(obs, info, softmax=True): function get_return_value (line 95) | def get_return_value(env, asin, options, search_terms, page_num, product): function predict (line 126) | def predict(obs, info): function run_episode (line 136) | def run_episode(goal, env, verbose=True): FILE: envs/webshop/src/webshop/transfer/predict_help.py class Page (line 9) | class Page(Enum): function parse_results_ebay (line 26) | def parse_results_ebay(query, page_num=None, verbose=True): function parse_item_page_ebay (line 63) | def parse_item_page_ebay(asin, verbose=True): function parse_results_ws (line 146) | def parse_results_ws(query, page_num=None, verbose=True): function parse_item_page_ws (line 188) | def parse_item_page_ws(asin, query, page_num, options, verbose=True): function parse_results_amz (line 262) | def parse_results_amz(query, page_num=None, verbose=True): function parse_item_page_amz (line 296) | def parse_item_page_amz(asin, verbose=True): function convert_html_to_text (line 394) | def convert_html_to_text(html, simple=False, clicked_options=None, visit... function convert_dict_to_actions (line 429) | def convert_dict_to_actions(page_type, products=None, asin=None, page_nu... FILE: envs/webshop/src/webshop/transfer/webshop_lite.py function read_html_template (line 15) | def read_html_template(path): function index (line 21) | def index(session_id, **kwargs): function search_results (line 25) | def search_results(data): function item_page (line 39) | def item_page(session_id, asin, keywords, page, options): function item_sub_page (line 54) | def item_sub_page(session_id, asin, keywords, page, sub_page, options): function done (line 69) | def done(asin, options, session_id, **kwargs): function dict_to_fake_html (line 89) | def dict_to_fake_html(data, page_type, asin=None, sub_page_type=None, op... FILE: envs/webshop/src/webshop/web_agent_site/app.py function home (line 46) | def home(): function index (line 50) | def index(session_id): function search_results (line 111) | def search_results(session_id, keywords, page): function item_page (line 150) | def item_page(session_id, asin, keywords, page, options): function item_sub_page (line 187) | def item_sub_page(session_id, asin, keywords, page, sub_page, options): function done (line 220) | def done(session_id, asin, options): FILE: envs/webshop/src/webshop/web_agent_site/attributes/annotate.py function annotate (line 16) | def annotate(attr_path): function main (line 62) | def main(): FILE: envs/webshop/src/webshop/web_agent_site/attributes/generate_attrs.py function get_stop_words (line 20) | def get_stop_words(): function load_products (line 26) | def load_products(num=None): function get_top_attrs (line 58) | def get_top_attrs(attributes, k): function get_corpus (line 76) | def get_corpus( function generate_ngram_attrs (line 112) | def generate_ngram_attrs(corpus_by_cat, ngram_range, k, attrs): function generate_attrs (line 140) | def generate_attrs(corpus_by_cat, k, save_name): FILE: envs/webshop/src/webshop/web_agent_site/engine/engine.py function map_action_to_html (line 44) | def map_action_to_html(action, **kwargs): function read_html_template (line 111) | def read_html_template(path): function parse_action (line 117) | def parse_action(action): function convert_web_app_string_to_var (line 131) | def convert_web_app_string_to_var(name, string): function get_top_n_product_from_keywords (line 148) | def get_top_n_product_from_keywords( function get_product_per_page (line 176) | def get_product_per_page(top_n_products, page): function generate_product_prices (line 180) | def generate_product_prices(all_products): function init_search_engine (line 195) | def init_search_engine(num_products=None): function clean_product_keys (line 213) | def clean_product_keys(products, quiet: bool = False): function load_products (line 234) | def load_products(filepath, num_products=None, human_goals=True, quiet: ... FILE: envs/webshop/src/webshop/web_agent_site/engine/goal.py function get_goals (line 16) | def get_goals(all_products, product_prices, human_goals=True, quiet: boo... function get_human_goals (line 22) | def get_human_goals(all_products, product_prices, quiet: bool = False): function get_synthetic_goals (line 71) | def get_synthetic_goals(all_products, product_prices, quiet: bool = False): function get_type_reward (line 133) | def get_type_reward(purchased_product, goal): function get_attribute_reward (line 181) | def get_attribute_reward(purchased_product, goal): function get_option_reward (line 212) | def get_option_reward(purchased_options, goal_options): function get_reward (line 231) | def get_reward(purchased_product, goal, price, options, **kwargs): FILE: envs/webshop/src/webshop/web_agent_site/engine/normalize.py function normalize_color (line 57) | def normalize_color(color_string: str) -> str: function normalize_color_size (line 64) | def normalize_color_size(product_prices: dict) -> Tuple[dict, dict]: FILE: envs/webshop/src/webshop/web_agent_site/envs/web_agent_site_env.py class WebAgentSiteEnv (line 18) | class WebAgentSiteEnv(gym.Env): method __init__ (line 21) | def __init__(self, observation_mode='html', **kwargs): method step (line 50) | def step(self, action): method get_available_actions (line 93) | def get_available_actions(self): method _parse_html (line 120) | def _parse_html(self, html=None, url=None): method get_reward (line 136) | def get_reward(self): method get_instruction_text (line 143) | def get_instruction_text(self): method convert_html_to_text (line 149) | def convert_html_to_text(self, html): method state (line 157) | def state(self): method observation (line 169) | def observation(self): method action_space (line 182) | def action_space(self): method observation_space (line 187) | def observation_space(self): method reset (line 190) | def reset(self): method render (line 203) | def render(self, mode='human'): method close (line 207) | def close(self): function tag_visible (line 212) | def tag_visible(element): FILE: envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py class WebAgentTextEnv (line 34) | class WebAgentTextEnv(gym.Env): method __init__ (line 36) | def __init__( method step (line 88) | def step(self, action): method get_available_actions (line 130) | def get_available_actions(self): method get_image (line 153) | def get_image(self): method get_instruction_text (line 165) | def get_instruction_text(self): method _parse_html (line 171) | def _parse_html(self, html=None): method observation (line 185) | def observation(self): method state (line 202) | def state(self): method convert_html_to_text (line 213) | def convert_html_to_text(self, html, simple=False): method reset (line 243) | def reset(self, session=None, instruction_text=None): method render (line 265) | def render(self, mode='human'): method close (line 268) | def close(self): function tag_visible (line 272) | def tag_visible(element): class SimServer (line 279) | class SimServer: method __init__ (line 281) | def __init__( method index (line 368) | def index(self, session_id, **kwargs): method search_results (line 379) | def search_results(self, session_id, **kwargs): method item_page (line 425) | def item_page(self, session_id, **kwargs): method item_sub_page (line 468) | def item_sub_page(self, session_id, **kwargs): method done (line 499) | def done(self, session_id, **kwargs): method receive (line 534) | def receive(self, session_id, current_url, session_int=None, **kwargs): method get_page_name (line 619) | def get_page_name(self, url): class SimBrowser (line 635) | class SimBrowser: method __init__ (line 637) | def __init__(self, server): method get (line 643) | def get(self, url, session_id=None, session_int=None): method click (line 650) | def click(self, clickable_name, text_to_clickable): method search (line 661) | def search(self, keywords): FILE: envs/webshop/src/webshop/web_agent_site/models/models.py class BasePolicy (line 10) | class BasePolicy: method __init__ (line 11) | def __init__(self): method forward (line 14) | def forward(observation, available_actions): class HumanPolicy (line 33) | class HumanPolicy(BasePolicy): method __init__ (line 34) | def __init__(self): method forward (line 37) | def forward(self, observation, available_actions): class RandomPolicy (line 42) | class RandomPolicy(BasePolicy): method __init__ (line 43) | def __init__(self): method forward (line 46) | def forward(self, observation, available_actions): FILE: envs/webshop/src/webshop/web_agent_site/utils.py function random_idx (line 21) | def random_idx(cum_weights): function setup_logger (line 31) | def setup_logger(session_id, user_log_dir): function generate_mturk_code (line 44) | def generate_mturk_code(session_id: str) -> str: FILE: run.py function resolve_class_identifier (line 64) | def resolve_class_identifier(identifier: str, aliases: Dict[str, str], k... function _default_run_id (line 80) | def _default_run_id(agent_path: str, env_path: str) -> str: function create_instance (line 87) | def create_instance(cls: Type, running_config: Optional[Dict[str, Any]],... function load_class (line 112) | def load_class(path: str) -> Type: function _safe_report (line 126) | def _safe_report(obj: Any) -> Dict[str, Any]: function _assemble_result (line 137) | def _assemble_result( function run_single_instance (line 162) | async def run_single_instance( function run_concurrent_instances (line 243) | async def run_concurrent_instances( function write_summary (line 536) | def write_summary(results: List[Dict[str, Any]], output_file: Path): function main (line 674) | def main(): FILE: utils/common.py function read_json_file (line 9) | def read_json_file(json_file: str, encoding="utf-8") -> List[Any]: function write_json_file (line 20) | def write_json_file(json_file: str, data: list, encoding: str = None, in... function read_yaml_file (line 28) | def read_yaml_file(yaml_file: str, encoding='utf-8') -> Dict[str, Any]: function parse_code_block (line 39) | def parse_code_block(text: str, lang: str = "python") -> Optional[str]: function parse_xml_tag (line 47) | def parse_xml_tag(response: str, xml_tag: str) -> str: FILE: utils/errors.py class StepLimitError (line 1) | class StepLimitError(Exception): FILE: utils/executor.py function print_output (line 13) | def print_output(func): class Executor (line 22) | class Executor: method __init__ (line 23) | def __init__(self, env: Env = None, if_run_print: bool = False) -> None: method register_function (line 38) | def register_function(self, name: str, func: Callable): method register_action_function (line 41) | def register_action_function(self, name: str, func: Callable): method register_ask_llm (line 45) | def register_ask_llm(self, llm: AsyncLLM): method skip (line 56) | def skip(self, reason: str): method set_var (line 59) | def set_var(self, key: str, value: Any): method get_var (line 62) | def get_var(self, key: str) -> Any: method set_env (line 67) | def set_env(self, env: Env): method _is_preserved_variable (line 70) | def _is_preserved_variable(self, key: str, value: Any) -> bool: method _infer_type_string (line 76) | def _infer_type_string(self, value: Any, depth: int = 0, max_depth: in... method run (line 119) | def run(self, action: str) -> str: method get_actions (line 130) | def get_actions(self) -> List[str]: method get_variables (line 135) | def get_variables(self) -> str: method reset (line 138) | def reset(self): method _start_loop_thread (line 142) | def _start_loop_thread(self): method _submit_coro (line 156) | def _submit_coro(self, coro): method close (line 161) | def close(self): method execute (line 172) | def execute(self, code: str) -> Dict[str, Any]: method _run_block (line 176) | def _run_block(self, block: str) -> tuple[bool, List[str], str]: FILE: utils/llm.py class LLMConfig (line 15) | class LLMConfig(BaseModel): method from_profile (line 45) | def from_profile(cls, profile: str = "default", config_path: Path = DE... method resolve_api_key (line 61) | def resolve_api_key(self) -> "LLMConfig": class CostCalculator (line 66) | class CostCalculator(BaseModel): method compute_cost (line 72) | def compute_cost( class AsyncLLM (line 97) | class AsyncLLM(BaseModel): method __init__ (line 105) | def __init__(self, profile_or_config: Union[str, Dict[str, Any]] = "de... method _load_profile_config (line 117) | def _load_profile_config(self, profile: str) -> Dict[str, Any]: method _initialize_client (line 134) | def _initialize_client(self) -> None: method __call__ (line 150) | async def __call__( method _build_messages (line 173) | def _build_messages(self, prompt: str, system_prompt: Optional[str]) -... method _prepare_params (line 180) | def _prepare_params( method _retry_api_call (line 206) | async def _retry_api_call(self, params: Dict[str, Any]) -> Any: method _calculate_backoff (line 220) | def _calculate_backoff(self, attempt: int, base: float, max_wait: floa... function create_llm_instance (line 225) | def create_llm_instance(model_name: str) -> AsyncLLM: function main (line 228) | async def main(): FILE: utils/logger.py class MultiLineFormatter (line 6) | class MultiLineFormatter(logging.Formatter): method format (line 7) | def format(self, record): class SimpleLogger (line 16) | class SimpleLogger: method __init__ (line 17) | def __init__(self, run_id=None, log_level=logging.INFO): method info (line 50) | def info(self, message): method error (line 53) | def error(self, message): method warning (line 56) | def warning(self, message): method debug (line 59) | def debug(self, message): method log_result (line 62) | def log_result(self, result): method log_stats (line 74) | def log_stats(self, stats): method get_log_dir (line 91) | def get_log_dir(self): method get_base_dir (line 94) | def get_base_dir(self): FILE: utils/mockllm.py class MockLLM (line 3) | class MockLLM: method __init__ (line 5) | def __init__(self, name="MockLLM"): method __call__ (line 8) | async def __call__(self, prompt): function test_mock_llm (line 23) | async def test_mock_llm():