MCPcopy Create free account

hub / github.com/WangHanLinHenry/SPA-RL-Agent / functions

Functions947 in github.com/WangHanLinHenry/SPA-RL-Agent

↓ 192 callersMethodget
Set browser variables to corresponding link, page HTML for URL
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:760
↓ 101 callersFunctionget_conv_template
Get a conversation template.
fastchat/conversation.py:342
↓ 77 callersFunctionregister_model_adapter
Register a model adapter.
fastchat/model/model_adapter.py:118
↓ 74 callersFunctionregister_conv_template
Register a new conversation template.
fastchat/conversation.py:332
↓ 66 callersMethodto
(self, target)
fastchat/model/rwkv_model.py:27
↓ 65 callersFunctionregister_model_info
( full_names: List[str], simple_name: str, link: str, description: str )
fastchat/model/model_registry.py:12
↓ 60 callersMethodappend_message
Append a new message.
fastchat/conversation.py:269
↓ 56 callersMethodparse_args
()
ppo/step_ppo.py:36
↓ 32 callersFunctionget_ip
(request: gr.Request)
fastchat/serve/gradio_web_server.py:243
↓ 28 callersMethodget_prompt
Get the prompt for generation.
fastchat/conversation.py:62
↓ 24 callersMethodclick
Wrapper for `receive` handler for performing click action on current page
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:767
↓ 24 callersFunctionrank0_print
(*args)
fastchat/train/train.py:85
↓ 24 callersMethodto_gradio_chatbot
(self)
fastchat/serve/gradio_web_server.py:98
↓ 21 callersMethodtrain
(self, epochs: int = 1)
ppo/step_ppo.py:121
↓ 20 callersMethodrun
(self)
ppo/step_ppo.py:150
↓ 18 callersFunctioncreate_error_response
(code: int, message: str)
fastchat/serve/openai_api_server.py:130
↓ 16 callersMethodwrite
(self, buf)
fastchat/utils.py:92
↓ 14 callersFunctionget_model_adapter
Get a model adapter for a model_path.
fastchat/model/model_adapter.py:124
↓ 14 callersFunctionrank0_print
(*args)
fastchat/train/train_dpo.py:106
↓ 13 callersFunctionget_conversation_template
Get the default conversation template.
fastchat/model/model_adapter.py:348
↓ 13 callersMethodsearch
Wrapper for `receive` handler for performing search action on current page
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:778
↓ 13 callersMethodupdate_last_message
Update the last output. The last message is typically set to be None when constructing the prompt, so we need to update it in-place a
fastchat/conversation.py:273
↓ 11 callersFunctionbuild_logger
(logger_name, logger_filename)
fastchat/utils.py:23
↓ 11 callersFunctionfetch_remote
(url, pload=None, name=None)
fastchat/serve/openai_api_server.py:72
↓ 11 callersMethodget_default_conv_template
(self, model_path: str)
fastchat/model/model_adapter.py:1672
↓ 11 callersMethodload_model
(self, model_path: str, from_pretrained_kwargs: dict)
fastchat/model/model_adapter.py:1655
↓ 11 callersFunctionmap_action_to_html
(action, **kwargs)
envs/webshop/src/webshop/web_agent_site/engine/engine.py:44
↓ 10 callersMethodclose
(self)
envs/webshop/src/webshop/web_agent_site/envs/web_agent_site_env.py:207
↓ 10 callersMethoddict
(self)
fastchat/serve/gradio_web_server.py:101
↓ 9 callersMethodindex
Redirect to the search page with the given session ID
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:367
↓ 9 callersFunctionrank0_print
(*args)
fastchat/train/train_dpo_mistral.py:101
↓ 9 callersMethodto_dict
(self, format="fastchat")
eval_agent/utils/datatypes.py:55
↓ 8 callersMethodreset
(self)
eval_agent/envs/base.py:29
↓ 8 callersMethodset_system_message
Set the system message.
fastchat/conversation.py:265
↓ 7 callersFunctionrank0_print
(*args)
fastchat/train/train_ppo.py:84
↓ 7 callersMethodstep
(self, llm_output: str)
eval_agent/envs/base.py:25
↓ 6 callersFunctionget_model_list
( controller_url, register_openai_compatible_models, add_chatgpt, add_claude, add_palm )
fastchat/serve/gradio_web_server.py:124
↓ 6 callersMethodget_queue_length
(self)
fastchat/serve/base_model_worker.py:128
↓ 6 callersFunctionget_reward
Get cumulative reward score for purchased product and goal
envs/webshop/src/webshop/web_agent_site/engine/goal.py:230
↓ 6 callersFunctionrank0_print
(*args)
fastchat/train/train_mistral.py:75
↓ 6 callersFunctionrank0_print
(*args)
fastchat/train/train_baichuan.py:66
↓ 5 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
fastchat/train/dpo_trainer.py:911
↓ 5 callersFunctionget_worker_address
Get worker address based on the requested model :param model_name: The worker's model name :return: Worker address from the controller
fastchat/serve/openai_api_server.py:334
↓ 5 callersFunctionis_partial_stop
Check whether the output contains a partial stop str.
fastchat/utils.py:291
↓ 5 callersMethodlog
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`Dict[str, float]`):
fastchat/train/dpo_trainer.py:1182
↓ 5 callersFunctionread_html_template
(path)
envs/webshop/src/webshop/web_agent_site/engine/engine.py:111
↓ 5 callersMethodto_openai_api_messages
Convert the conversation to OpenAI chat completion format.
fastchat/conversation.py:291
↓ 5 callersFunctionvote_last_response
(states, vote_type, model_selectors, request: gr.Request)
fastchat/serve/gradio_block_arena_named.py:68
↓ 5 callersFunctionvote_last_response
(states, vote_type, model_selectors, request: gr.Request)
fastchat/serve/gradio_block_arena_anony.py:65
↓ 4 callersMethod_parse_html
Returns web request result wrapped in BeautifulSoup object Arguments: url (`str`): If no url or html is provided, use the cu
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:170
↓ 4 callersFunctionadd_model_args
(parser)
fastchat/model/model_adapter.py:408
↓ 4 callersFunctioncheck_model
(request)
fastchat/serve/openai_api_server.py:141
↓ 4 callersFunctionconvertvote
(vote)
fastchat/llm_judge/compute_agreement.py:54
↓ 4 callersMethodgenerate
Generate response with the model given the query tensor. call the `generate` method of the model. Args: query_te
fastchat/train/ppo_trainer.py:419
↓ 4 callersFunctionget_conv_log_filename
()
fastchat/serve/gradio_web_server.py:118
↓ 4 callersMethodget_conv_template
(self)
fastchat/serve/base_model_worker.py:164
↓ 4 callersFunctionget_gen_params
( model_name: str, worker_addr: str, messages: Union[str, List[Dict[str, str]]], *, temper
fastchat/serve/openai_api_server.py:255
↓ 4 callersFunctionget_log_files
(max_num_files=None)
fastchat/serve/monitor/basic_stats.py:18
↓ 4 callersFunctionget_mt_bench_agreement
(data, judge1, judge2, ban)
fastchat/llm_judge/compute_agreement.py:67
↓ 4 callersMethodget_page_name
Determine which page (i.e. item_page, search_results) the given URL is pointing at
envs/webshop/src/webshop/web_agent_site/envs/web_agent_text_env.py:736
↓ 4 callersFunctionload_model
Load a model from Hugging Face.
fastchat/model/model_adapter.py:167
↓ 4 callersFunctionload_questions
Load questions from a file.
fastchat/llm_judge/common.py:84
↓ 4 callersMethodload_tasks
(cls, split: str, part_num: int, part_idx: int)
eval_agent/tasks/base.py:21
↓ 4 callersFunctionprompt_with_icl
(instruction, raw_icl, cur_task, icl_num=2)
eval_agent/prompt/templates.py:18
↓ 4 callersFunctionrank0_print
(*args)
fastchat/train/train_reward.py:106
↓ 4 callersFunctionread_html_template
(path)
envs/webshop/src/webshop/transfer/webshop_lite.py:15
↓ 4 callersFunctionreload_conv
Reprints the conversation from the start.
fastchat/serve/inference.py:400
↓ 3 callersMethod_parse_html
Returns web request result wrapped in BeautifulSoup object Arguments: url (`str`): If no url or html is provided, use the cu
envs/webshop/src/webshop/web_agent_site/envs/web_agent_site_env.py:120
↓ 3 callersFunction_prepare_decoder_attention_mask
( self, attention_mask, input_shape, inputs_embeds, past_key_values_length )
fastchat/train/llama2_flash_attn_monkey_patch.py:108
↓ 3 callersFunctionacquire_worker_semaphore
(worker)
fastchat/serve/huggingface_api_worker.py:203
↓ 3 callersFunctionacquire_worker_semaphore
()
fastchat/serve/multi_model_worker.py:76
↓ 3 callersFunctionacquire_worker_semaphore
()
fastchat/serve/base_model_worker.py:181
↓ 3 callersMethodbatched_forward_pass
Calculate model outputs in multiple batches. Args: queries (`torch.LongTensor`): List of tensors contain
ppo/step_ppotrainer.py:272
↓ 3 callersMethodbatched_forward_pass
Calculate model outputs in multiple batches. Args: queries (`torch.LongTensor`): List of tensors contain
fastchat/train/ppo_trainer.py:933
↓ 3 callersFunctionchat_compeletion_anthropic
(model, conv, temperature, max_tokens)
fastchat/llm_judge/common.py:466
↓ 3 callersFunctionchat_compeletion_openai
(model, conv, temperature, max_tokens, api_dict=None)
fastchat/llm_judge/common.py:403
↓ 3 callersFunctioncheck_length
(request, prompt, max_tokens, worker_addr)
fastchat/serve/openai_api_server.py:154
↓ 3 callersFunctioncheck_requests
(request)
fastchat/serve/openai_api_server.py:179
↓ 3 callersFunctionclean_battle_data
(log_files, exclude_model_names)
fastchat/serve/monitor/clean_battle_data.py:86
↓ 3 callersMethodcount_token
(self, params)
fastchat/serve/base_model_worker.py:149
↓ 3 callersFunctiondetect_language
Detect the langauge of a string.
fastchat/utils.py:262
↓ 3 callersFunctionfind_awq_ckpt
(awq_config: AWQConfig)
fastchat/modules/awq.py:75
↓ 3 callersFunctionforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None, position_i
fastchat/train/llama2_flash_attn_monkey_patch.py:32
↓ 3 callersMethodgenerate
(self, params)
fastchat/serve/vllm_worker.py:157
↓ 3 callersMethodgenerate
( self, input_ids, do_sample, temperature, max_new_tokens, repetition_penalty=1.0 )
fastchat/model/rwkv_model.py:40
↓ 3 callersFunctiongenerate_completion
(payload: Dict[str, Any], worker_addr: str)
fastchat/serve/openai_api_server.py:666
↓ 3 callersFunctionget_context_length
Get the context length of a model from a huggingface model config.
fastchat/utils.py:324
↓ 3 callersFunctionget_model_description_md
(models)
fastchat/serve/gradio_web_server.py:548
↓ 3 callersFunctionget_product_per_page
(top_n_products, page)
envs/webshop/src/webshop/web_agent_site/engine/engine.py:176
↓ 3 callersMethodget_status
(self)
fastchat/serve/base_model_worker.py:142
↓ 3 callersFunctionget_top_n_product_from_keywords
( keywords, search_engine, all_products, product_item_dict, attribute_
envs/webshop/src/webshop/web_agent_site/engine/engine.py:148
↓ 3 callersMethodget_worker_status
(self, worker_name: str)
fastchat/serve/controller.py:98
↓ 3 callersMethodinit_heart_beat
(self)
fastchat/serve/base_model_worker.py:78
↓ 3 callersMethodload_json
(cls, json_dict: Dict[str, Any])
eval_agent/utils/datatypes.py:39
↓ 3 callersFunctionload_model_answers
Load model answers. The return value is a python dict of type: Dict[model_name: str -> Dict[question_id: int -> answer: dict]]
fastchat/llm_judge/common.py:95
↓ 3 callersMethodmatch
(self, model_path: str)
fastchat/model/model_adapter.py:1652
↓ 3 callersFunctionmerge_counts
(series, on, names)
fastchat/serve/monitor/basic_stats.py:68
↓ 3 callersFunctionmoderation_filter
(text, model_list)
fastchat/utils.py:170
↓ 3 callersFunctionparse_action
Parse action string to action name and its arguments.
envs/webshop/src/webshop/web_agent_site/engine/engine.py:117
↓ 3 callersFunctionpost_process_answer
Fix Markdown rendering problems.
fastchat/llm_judge/qa_browser.py:117
next →1–100 of 947, ranked by callers