MCPcopy Create free account

hub / github.com/AFAC2024/AFAC2025 / functions

Functions3,355 in github.com/AFAC2024/AFAC2025

↓ 971 callersMethodappend
r"""Add the user input to chatbot. Inputs: infer.chatbot, infer.messages, infer.role, infer.query, infer.escape_html Output: infer.ch
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/webui/chatter.py:175
↓ 569 callersMethodget
(self)
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:640
↓ 528 callersMethodjoin
(self, attr: dict[str, Any])
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/parser.py:72
↓ 464 callersMethodreplace
Returns a new ToolResult with the given fields replaced.
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/tool/base.py:73
↓ 218 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/memory_buffer.py:43
↓ 184 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:325
↓ 173 callersFunctionget
(url, headers={}, cache_key='', sleep=0, retry=5, timeout=60)
方案分享/赛题四/队伍名字不能为空/docker_image/app/mcps/common/http_utils.py:44
↓ 136 callersMethodfrom_pretrained
(cls, save_directory: Union[str, os.PathLike], **kwargs)
方案分享/赛题三/双人成行/code/RL/verl/tests/e2e/envs/digit_completion/tokenizer.py:154
↓ 133 callersMethodgetenv
(self, key)
方案分享/赛题三/双人成行/code/RL/verl/tests/ray/test_ray_local_envs.py:31
↓ 132 callersMethodpop
Pop a subset of the DataProto via `batch_keys` and `meta_info_keys` Args: batch_keys (list, optional): a list of strings indicati
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:374
↓ 109 callersFunctionregister_model_group
( models: dict[str, dict[DownloadSource, str]], template: Optional[str] = None, multimodal: bool =
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/constants.py:138
↓ 104 callersFunctionregister_template
r"""Register a chat template. To add the following chat template: ``` <s><user>user prompt here <model>model response here</s> <u
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/template.py:459
↓ 101 callersMethodinfo_rank0
(self, *args, **kwargs)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/logging.py:70
↓ 93 callersMethodupdate
(self, val, n=1)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/misc.py:69
↓ 78 callersMethoddump
(self, data: io.BytesIO, name)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/debug/trajectory_tracker.py:59
↓ 72 callersMethodsearch
统一搜索接口 Args: keywords: 搜索关键词 max_results: 最大结果数 Returns: 搜索结果列表,每个结果包含 title, url, desc
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/data_analysis/utils/search_engine.py:37
↓ 65 callersMethodupdate
(self, current_kl, n_steps)
方案分享/赛题三/双人成行/code/RL/verl/verl/trainer/ppo/core_algos.py:52
↓ 62 callersMethodsub
(self, data: DataProto)
方案分享/赛题三/双人成行/code/RL/verl/tests/ray/test_colocated_workers.py:44
↓ 57 callersFunctionlog_gpu_memory_usage
(head: str, logger: logging.Logger = None, level=logging.DEBUG, rank: int = 0)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/debug/performance.py:20
↓ 56 callersMethodcreate
Factory method to create and properly initialize an MCPAgent instance.
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/agent/mcp.py:57
↓ 55 callersMethodapply
r"""Forms a list of slots according to the inputs to encode.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/formatter.py:33
↓ 55 callersMethodwarning_rank0
(self, *args, **kwargs)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/logging.py:73
↓ 52 callersMethoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
方案分享/赛题三/双人成行/code/RL/verl/verl/workers/rollout/tokenizer.py:86
↓ 52 callersFunctionsetCache
(key_str, data_str, prefix='')
方案分享/赛题四/队伍名字不能为空/docker_image/app/mcps/common/cache.py:33
↓ 47 callersFunctiongetCache
(key_str, prefix='')
方案分享/赛题四/队伍名字不能为空/docker_image/app/mcps/common/cache.py:52
↓ 46 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/megatron_utils.py:250
↓ 43 callersMethodgenerate
生成回答。 参数: prompt: 包含system和user字段的字典 max_new_tokens: 最大生成token数 temperature: 温度参数
方案分享/赛题三/双人成行/code/Inference/model_inference.py:56
↓ 43 callersFunctionget_mm_plugin
r"""Get plugin for multimodal inputs.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/mm_plugin.py:1902
↓ 41 callersMethodnamed_parameters
(self)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/memory_buffer.py:208
↓ 40 callersMethodrun
Run the MCP server.
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/mcp/server.py:157
↓ 38 callersFunctioncheck_version
r"""Optionally check the package version.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/misc.py:76
↓ 38 callersMethodsave_pretrained
(self, save_directory: Union[str, os.PathLike], **kwargs)
方案分享/赛题三/双人成行/code/RL/verl/tests/e2e/envs/digit_completion/tokenizer.py:147
↓ 35 callersMethodget_elem_by_id
r"""Get element by id. Example: top.lang, train.dataset
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/webui/manager.py:46
↓ 34 callersFunction_timer
(name: str, timing_raw: Dict[str, float])
方案分享/赛题三/双人成行/code/RL/verl/verl/trainer/ppo/ray_trainer.py:242
↓ 32 callersMethodto_dict
Convert message to dictionary format
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/schema.py:84
↓ 31 callersMethodfrom_dict
Create a DataProto from a dict of tensors. This assumes that 1. All the tensor in tensors have the same dim0 2. Only dim0 is the batch
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:290
↓ 30 callersMethod_validate_input
r"""Validate if this model accepts the input modalities.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/mm_plugin.py:147
↓ 30 callersMethodconcat
Concat a list of DataProto. The batch is concatenated among dim=0. The meta_info is assumed to be identical and will use the first one.
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:523
↓ 30 callersMethodencode
Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary. Args: text (`str`, `List[str]` or
方案分享/赛题三/双人成行/code/RL/verl/verl/workers/rollout/tokenizer.py:70
↓ 30 callersMethodread
(self, *args, **kwargs)
方案分享/赛题三/双人成行/code/RL/code_eval/MBPP_Humaneval/eval/utils/execution.py:127
↓ 29 callersMethodadd
(self, idx: int, val: int)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/seqlen_balancing.py:33
↓ 29 callersFunctionremoveCache
(key_str)
方案分享/赛题四/队伍名字不能为空/docker_image/app/mcps/common/cache.py:66
↓ 28 callersFunctioncopy_to_local
Copy src from hdfs to local if src is on hdfs or directly return src. If cache_dir is None, we will use the default cache dir of the system. Note
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/fs.py:58
↓ 27 callersFunctionget_template_and_fix_tokenizer
r"""Get chat template and fixes the tokenizer.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/template.py:591
↓ 26 callersMethodchunk
Split the batch among dim=0 into chunks. The meta_info is passed to each DataProto after split. Args: chunks (int): the number of
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:490
↓ 26 callersFunctionfunc
(*args, **kwargs)
方案分享/赛题三/双人成行/code/RL/verl/verl/single_controller/ray/base.py:38
↓ 26 callersFunctionload_tokenizer
r"""Load pretrained tokenizer and optionally loads processor. Note: including inplace operation of model_args.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/model/loader.py:71
↓ 24 callersMethodselect
Select a subset of the DataProto via batch_keys and meta_info_keys Args: batch_keys (list, optional): a list of strings indicatin
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:339
↓ 23 callersFunctionload_dataset
Load a dataset from a JSON file. Loads and parses a JSON dataset file based on the provided dataset enum. The file path is constructed based
方案分享/赛题三/双人成行/code/RL/deepscaler/data/utils.py:14
↓ 23 callersMethodstep
(self, closure: Optional[Callable[[], float]] = None)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/train/trainer_utils.py:81
↓ 22 callersMethodinit
(self)
方案分享/赛题三/双人成行/code/RL/verl/tests/ray/test_rvdz.py:27
↓ 21 callersFunctionLLM
(query, system_prompt=None)
方案分享/赛题二/clife/code/llm.py:17
↓ 21 callersFunctionhf_tokenizer
Create a huggingface pretrained tokenizer which correctness handles eos and pad tokens. Args: name (str): The name of the tokenizer.
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/tokenizer.py:35
↓ 21 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:555
↓ 20 callersFunctionis_env_enabled
r"""Check if the environment variable is enabled.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/misc.py:231
↓ 20 callersMethodtrain
(self)
方案分享/赛题三/双人成行/code/RL/verl/verl/workers/sharding_manager/megatron_vllm.py:171
↓ 19 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
方案分享/赛题三/双人成行/code/RL/verl/verl/protocol.py:432
↓ 18 callersMethod_get_mm_inputs
( self, images: list["ImageInput"], videos: list["VideoInput"], audios: list["
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/mm_plugin.py:1534
↓ 18 callersFunction_register_composite_model
r"""Register a new composite model. Args: model_type: model type projector_key: multi_modal_projector vision_model_keys:
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/model/model_utils/visual.py:58
↓ 18 callersFunctiongather_seq_scatter_heads
A func to sync embedding input with alltoall in sequence parallel gather sequence dimension and scatter head dim: e.g. seq_dim: 1, head_d
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/ulysses.py:61
↓ 18 callersMethodlog
(self, data, step, backend=None)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/tracking.py:95
↓ 18 callersFunctionoffload_fsdp_model_to_cpu
(model: FSDP, empty_cache: bool = True)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/fsdp_utils.py:115
↓ 18 callersMethodto_dict
(self)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/hparams/data_args.py:185
↓ 17 callersMethod_validate_messages
r"""Validate if the number of images, videos and audios match the number of placeholders in messages.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/mm_plugin.py:187
↓ 17 callersMethodadd_message
Add a message to memory
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/schema.py:171
↓ 17 callersMethodexecute_all_sync
(self, method_name: str, *args, **kwargs)
方案分享/赛题三/双人成行/code/RL/verl/verl/single_controller/ray/base.py:352
↓ 17 callersFunctionget_save_dir
r"""Get the path to saved model checkpoints.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/webui/common.py:59
↓ 16 callersFunctionconvert_config
(hf_config: PretrainedConfig, megatron_config)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/megatron_utils.py:156
↓ 16 callersFunctionget_generic_question_template_test_completion
( question: TestOutputPredictionProblem, testcase_input: str )
方案分享/赛题三/双人成行/code/RL/code_eval/LiveCodeBench/lcb_runner/prompts/test_output_prediction.py:68
↓ 16 callersFunctionload_model
r"""Load pretrained model.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/model/loader.py:131
↓ 16 callersMethodmerge
(self, other)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/seqlen_balancing.py:37
↓ 16 callersFunctionpad_sequence_to_length
pad a 2D tensors (e.g. responses, logprobs) in the last dim to max_seq_length. input shape: [bs, seq_length] output shape: [bs, max_seq_l
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/torch_functional.py:242
↓ 16 callersFunctiontruncatefn
(s, length=300)
方案分享/赛题三/双人成行/code/RL/code_eval/LiveCodeBench/lcb_runner/evaluation/testing_util.py:30
↓ 16 callersMethodzero_grad
(self, set_to_none: bool = True)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/train/trainer_utils.py:77
↓ 15 callersFunction_is_package_available
(name: str)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/packages.py:30
↓ 15 callersMethodfrom_config
(cls, config: Dict)
方案分享/赛题三/双人成行/code/RL/verl/tests/e2e/envs/digit_completion/tokenizer.py:140
↓ 15 callersFunctionload_fsdp_model_to_gpu
(model: FSDP)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/fsdp_utils.py:136
↓ 15 callersFunctionsave_to_jsonl
Save data to a JSONL (JSON Lines) file. Args: data: List of objects to save as JSON lines file_path: Target file path
方案分享/赛题三/ljq13317046284/代码/TALE-main/utils/__init__.py:154
↓ 15 callersMethodto_dtype
(precision)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/torch_dtypes.py:63
↓ 14 callersFunctionload_train_model
(add_valuehead: bool = False, **kwargs)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/train/test_utils.py:64
↓ 14 callersMethodprocess_messages
r"""Pre-process input messages before tokenization for VLMs.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/mm_plugin.py:395
↓ 14 callersFunctiontoken_measure
Count the number of tokens in a text using GPT-4 tokenizer. Args: text: Text to measure Returns: int: Numbe
方案分享/赛题三/ljq13317046284/代码/TALE-main/utils/__init__.py:61
↓ 13 callersMethodencode_oneturn
r"""Return a single pair of token ids representing prompt and response respectively.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/template.py:58
↓ 13 callersMethodevaluate_sample
Evaluate a single sample against its ground truth. Args: sample: Dictionary containing 'ground truth' and 'p
方案分享/赛题三/ljq13317046284/代码/TALE-main/evaluator/AccEvaluator.py:117
↓ 13 callersFunctionget_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/ulysses.py:45
↓ 13 callersFunctionis_transformers_version_greater_than
(content: str)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/packages.py:90
↓ 12 callersFunction_check_plugin
( plugin: "BasePlugin", tokenizer: "PreTrainedTokenizer", processor: "ProcessorMixin", expecte
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/tests/data/test_mm_plugin.py:128
↓ 12 callersFunction_load_tokenizer_module
(model_name_or_path: str)
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/tests/data/test_mm_plugin.py:123
↓ 12 callersFunction_set_z3_leaf_modules
(model: "PreTrainedModel", leaf_modules: list[Union["nn.Module", str]])
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/model/model_utils/moe.py:29
↓ 12 callersMethodbackward
(ctx: Any, grad_output: Tensor)
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/ulysses.py:226
↓ 12 callersFunctionget_dataset
r"""Get the train dataset and optionally gets the evaluation dataset.
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/data/loader.py:277
↓ 12 callersFunctionis_gradio_available
()
方案分享/赛题三/ljq13317046284/代码/LLaMA-Factory-main/src/llamafactory/extras/packages.py:61
↓ 12 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/torch_functional.py:118
↓ 12 callersMethodreadlines
(self, *args, **kwargs)
方案分享/赛题三/双人成行/code/RL/code_eval/MBPP_Humaneval/eval/utils/execution.py:133
↓ 12 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
方案分享/赛题三/双人成行/code/RL/verl/verl/models/qwen2/megatron/layers/parallel_attention.py:131
↓ 12 callersMethodsystem_message
Create a system message
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/src/schema.py:113
↓ 12 callersMethodtransform
(self, data)
方案分享/赛题一/allin/代码文件/Time_Series/codes/utils.py:22
↓ 11 callersMethodclose
关闭客户端
方案分享/赛题四/天池三轮车/docker_image/docker_image/app/data_analysis/utils/llm_helper.py:115
↓ 11 callersFunctioncopy
r"""Works like shutil.copy() for file, and shutil.copytree for dir, and supports hdfs. Copy data and mode bits ("cp src dst"). Return the file's
方案分享/赛题三/双人成行/code/RL/verl/verl/utils/hdfs_io.py:84
↓ 11 callersMethodeval
(self)
方案分享/赛题三/双人成行/code/RL/verl/verl/workers/sharding_manager/megatron_vllm.py:167
next →1–100 of 3,355, ranked by callers