MCPcopy Create free account

hub / github.com/AMAP-ML/Thinking-with-Map / functions

Functions4,735 in github.com/AMAP-ML/Thinking-with-Map

↓ 436 callersMethodget
Get the actual results by calling get() method on gen_batch_output Returns: tuple: (epoch, batch, gen_batch_result, futu
verl/recipe/one_step_off_policy/ray_trainer.py:75
↓ 404 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/verl/utils/memory_buffer.py:45
↓ 370 callersMethodget
Get a rollout replica class by name.
verl/verl/workers/rollout/replica.py:225
↓ 276 callersMethodto
Move model parameters, optimizer states, or both to the specified device. Args: device: Target device identifier.
verl/verl/workers/engine/base.py:148
↓ 258 callersMethodsplit
Split the batch among dim=0 into chunks. The meta_info is passed to each DataProto after split. Args: split_size (int): the size
verl/verl/protocol.py:912
↓ 225 callersMethodpop
Pop a subset of the DataProto via `batch_keys` and `meta_info_keys` Args: batch_keys (list, optional): a list of strings indicati
verl/verl/protocol.py:728
↓ 184 callersFunctionget_torch_device
Return the corresponding torch attribute based on the device type string. Returns: module: The corresponding torch device namespace, or to
verl/verl/utils/device.py:55
↓ 177 callersMethodget_rank
(self)
verl/tests/workers/rollout/test_sglang_async_rollout_sf_tools.py:487
↓ 165 callersMethodupdate
(self, current_kl, n_steps)
verl/recipe/spin/core_algos.py:45
↓ 150 callersMethodget
(self, key: str, path: Optional[str] = None)
demo/qwen_agent/tools/storage.py:88
↓ 149 callersMethodget
(self)
verl/tests/single_controller/test_nested_worker.py:30
↓ 143 callersMethodgetenv
(self, key)
verl/tests/single_controller/test_ray_local_envs_on_cpu.py:31
↓ 137 callersFunctionget_device_id
Return current device id based on the device type. Returns: device index
verl/verl/utils/device.py:68
↓ 135 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
verl/verl/protocol.py:593
↓ 127 callersFunctionlog_gpu_memory_usage
Log GPU memory usage information. Args: head (str): A descriptive header for the memory usage log message. logger (logging.Logger
verl/verl/utils/profiler/performance.py:63
↓ 116 callersFunctionmarked_timer
Context manager for timing with platform markers. This utility function measures the execution time of code within its context, accumulates t
verl/verl/utils/profiler/performance.py:172
↓ 104 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
verl/verl/protocol.py:503
↓ 100 callersMethodupdate
Update method for fixed KL controller (no-op). Args: current_kl (float): Current KL divergence value (unused). n_step
verl/verl/trainer/ppo/core_algos.py:182
↓ 96 callersMethodfrom_pretrained
(cls, save_directory: str | os.PathLike, **kwargs)
verl/tests/special_e2e/envs/digit_completion/tokenizer.py:151
↓ 89 callersMethodget
Get the value associated with the given key. If the key does not exist, return the default value. Args: key (str): The attribute
verl/verl/base_config.py:40
↓ 86 callersFunctionprint_rank_0
If distributed is initialized, print only on rank 0.
verl/verl/utils/logger/aggregate_logger.py:89
↓ 84 callersFunctionomega_conf_to_dataclass
Convert an OmegaConf DictConfig to a dataclass. Args: config: The OmegaConf DictConfig or dict to convert. dataclass_type: T
verl/verl/utils/config.py:23
↓ 82 callersMethodselect
Select a subset of the DataProto via batch_keys and meta_info_keys Args: batch_keys (list, optional): a list of strings indicatin
verl/verl/protocol.py:607
↓ 80 callersMethodget
(self, key, default=None)
demo/qwen_agent/llm/schema.py:55
↓ 75 callersMethodcreate
Create a tool instance. Args: instance_id: The instance id of the tool. Returns: The instance id of the tool
verl/verl/tools/base_tool.py:46
↓ 71 callersFunctionget_device_name
Function that gets the torch.device based on the current machine. This currently only supports CPU, CUDA, NPU. Returns: device
verl/verl/utils/device.py:40
↓ 70 callersMethodget
Return a tensor with the input `shape` as a view into the 1-D data starting at `start_index`.
verl/verl/utils/megatron/memory.py:31
↓ 68 callersMethodvalues
(cls)
verl/verl/utils/py_functional.py:233
↓ 67 callersFunctionsafe_copy
( src_tensor: torch.Tensor, dst_tensor: torch.Tensor, skip_dtype_assert: bool = False, )
verl/scripts/converter_hf_to_mcore.py:209
↓ 67 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
verl/verl/protocol.py:788
↓ 66 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
verl/verl/protocol.py:871
↓ 65 callersMethoddecode
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special tokens and clean up tokeniz
verl/verl/workers/rollout/tokenizer.py:89
↓ 55 callersMethodlog
(self, data, step, backend=None)
verl/verl/utils/tracking.py:153
↓ 55 callersMethodsub
(self, data: DataProto)
verl/tests/single_controller/test_colocated_workers.py:46
↓ 52 callersMethodclose
(self)
verl/recipe/vla/envs/isaac_env/isaac_env.py:294
↓ 52 callersFunctioncopy_to_local
Copy files/directories from HDFS to local cache with validation. Args: src (str): Source path - HDFS path (hdfs://...), local filesystem
verl/verl/utils/fs.py:195
↓ 51 callersFunctionhf_tokenizer
Create a huggingface pretrained tokenizer which correctness handles eos and pad tokens. Args: name (str): The name of the tokenizer.
verl/verl/utils/tokenizer.py:36
↓ 51 callersMethodinit
(self)
verl/tests/single_controller/test_rvdz.py:26
↓ 51 callersMethodsleep
Sleep each rollout server.
verl/verl/workers/rollout/replica.py:209
↓ 49 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
verl/verl/protocol.py:978
↓ 48 callersMethodconcat
Concat a list of DataProto. The batch is concatenated among dim=0. The meta_info is merged, with special handling for metrics from different w
verl/verl/protocol.py:924
↓ 48 callersFunctionsimple_timer
Context manager for basic timing without NVTX markers. This utility function measures the execution time of code within its context and accum
verl/verl/utils/profiler/performance.py:155
↓ 44 callersFunctionlog_with_rank
_summary_ Log a message with rank information using a logger. This function logs the message only if `log_only_rank_0` is False or if the rank
verl/verl/utils/logger/aggregate_logger.py:128
↓ 42 callersMethodrun
Execute the main PPO training workflow. This method sets up the distributed training environment, initializes workers, datasets, and
verl/recipe/transfer_queue/main_ppo.py:112
↓ 42 callersMethodshutdown
(self)
verl/tests/utils/test_special_linear_cross_entropy_tp.py:196
↓ 40 callersMethodget
(self)
verl/tool_server/api_server_redis.py:94
↓ 40 callersMethodsave
(self)
verl/verl/utils/profiler/profile.py:105
↓ 38 callersMethodget_rng_state
()
verl/verl/utils/checkpoint/checkpoint_manager.py:145
↓ 37 callersFunctionfunc
(self, *args, **kwargs)
verl/verl/single_controller/ray/base.py:823
↓ 35 callersMethodgenerate_sequences
Split input batch and dispatch to env loop workers. Args: prompts (DataProto): Input batch. Returns: DataPro
verl/recipe/vla/env_loop.py:61
↓ 35 callersMethodmodel_dump
(self, **kwargs)
demo/qwen_agent/llm/schema.py:45
↓ 35 callersFunctionoffload_fsdp_model_to_cpu
(model: FSDP, empty_cache: bool = True)
verl/verl/utils/fsdp_utils.py:144
↓ 35 callersMethodto_dtype
(precision)
verl/verl/utils/torch_dtypes.py:62
↓ 33 callersFunctionfsdp_version
(model)
verl/verl/utils/fsdp_utils.py:399
↓ 31 callersMethodsearch
(self, query: str, num: int = None, return_score: bool = False)
verl/examples/sglang_multiturn/search_r1_like/local_dense_retriever/retrieval_server.py:139
↓ 31 callersMethodstep
(self)
verl/verl/utils/profiler/profile.py:96
↓ 30 callersFunctionaggressive_empty_cache
More aggressive GPU memory cleanup function, tries to release PyTorch reserved but unallocated memory. Args: force_sync: Whether
verl/verl/utils/memory_utils.py:31
↓ 30 callersMethodget_event_loop
(self)
demo/qwen_agent/tools/code_interpreter.py:356
↓ 28 callersMethodbatch_decode
( self, sequences: list[int] | list[list[int]] | torch.Tensor | Any, # `Any` = np.ndarray | t
verl/recipe/vla/models/openvla_oft/processing_prismatic.py:236
↓ 28 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
verl/verl/utils/ulysses.py:62
↓ 28 callersFunctionload_fsdp_model_to_gpu
(model: FSDP)
verl/verl/utils/fsdp_utils.py:178
↓ 27 callersMethodadd
(self, idx: int, val: int)
verl/verl/utils/seqlen_balancing.py:44
↓ 27 callersMethodcompute_score
(self, data: DataProto)
verl/verl/experimental/reward/reward_manager.py:51
↓ 27 callersMethodcreate
(cls, config: DictConfig, worker_group: RayWorkerGroup = None, rm_wg: RayWorkerGroup = None)
verl/recipe/fully_async_policy/agent_loop/agent_loop.py:227
↓ 27 callersFunctionunwrap_model
(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES)
verl/verl/utils/megatron_utils.py:304
↓ 26 callersFunctionagg_loss
Aggregate the loss across global batch to ensure the loss is invariant to fsdp/megatron parallelism. NOTE: The returned loss has different b
verl/verl/trainer/ppo/core_algos.py:816
↓ 26 callersMethodnamed_parameters
(self)
verl/verl/utils/memory_buffer.py:209
↓ 26 callersMethodstart
(self)
verl/verl/utils/profiler/profile.py:91
↓ 25 callersMethod_register_dispatch_collect_info
Register the dp_rank for a given mesh name. This function is meant to be called by the worker Args: mesh_name (str):
verl/verl/single_controller/base/worker.py:86
↓ 25 callersMethodacquire
Acquire tokens from the bucket, waiting if necessary. This method will block (using asyncio.sleep) until sufficient tokens are availa
verl/verl/experimental/reward/reward_loop/limited.py:89
↓ 25 callersMethodget_data_parallel_rank
(self)
verl/verl/workers/engine/base.py:142
↓ 25 callersMethodsave_pretrained
(self, save_directory: str | os.PathLike, **kwargs)
verl/tests/special_e2e/envs/digit_completion/tokenizer.py:144
↓ 24 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
verl/verl/utils/hdfs_io.py:84
↓ 24 callersMethodinit
( cls, project_name: str, experiment_name: str, backend: str, token2te
verl/verl/utils/rollout_trace.py:66
↓ 24 callersFunctionpad_input
Unified entry point for `pad_input` across CUDA and NPU backends. Dynamically dispatches to the appropriate device-specific implementation:
verl/verl/utils/attention_utils.py:53
↓ 24 callersFunctionrearrange
Unified entry point for `rearrange` across CUDA and NPU backends. Dynamically dispatches to the appropriate device-specific implementation:
verl/verl/utils/attention_utils.py:69
↓ 24 callersFunctionunpad_input
Unified entry point for `unpad_input` across CUDA and NPU backends. Dynamically dispatches to the appropriate device-specific implementation
verl/verl/utils/attention_utils.py:84
↓ 23 callersFunctionhf_processor
Create a huggingface processor to process multimodal data. Args: name_or_path (str): The name of the processor. Returns: tra
verl/verl/utils/tokenizer.py:66
↓ 23 callersFunctionoffload_megatron_model_to_cpu
In megatron, the model and optimizer storage are: - bf16 parameter data chunked in model parallel group - fp32 grad chunked in model para
verl/verl/utils/megatron_utils.py:402
↓ 23 callersFunctionreduce_metrics
Reduces a dictionary of metric lists by computing the mean, max, or min of each list. The reduce operation is determined by the key name:
verl/verl/utils/metric/utils.py:23
↓ 22 callersFunctionload_megatron_model_to_gpu
(models, load_grad=True)
verl/verl/utils/megatron_utils.py:438
↓ 22 callersFunctionmakedirs
r"""Works like os.makedirs() but supports hdfs. Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except tha
verl/verl/utils/hdfs_io.py:50
↓ 22 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
verl/verl/utils/torch_functional.py:318
↓ 21 callersFunctioncompute_position_id_with_mask
(mask)
verl/verl/utils/model.py:224
↓ 21 callersMethodget
(self)
verl/verl/utils/rendezvous/ray_backend.py:28
↓ 21 callersMethodregister
(cls, name: str)
verl/verl/utils/py_functional.py:258
↓ 21 callersMethodremove
(cls, name: str)
verl/verl/utils/py_functional.py:269
↓ 21 callersMethodrun
(self, messages: List[Message] = None, share: bool = False, server_name: s
demo/qwen_agent/gui/web_ui.py:83
↓ 20 callersFunctionappend_to_dict
Append values from new_data to lists in data. For each key in new_data, this function appends the corresponding value to a list stored under
verl/verl/utils/py_functional.py:165
↓ 20 callersMethodfrom_single_dict
(cls, data, meta_info=None, auto_padding=False)
verl/tests/test_protocol_on_cpu.py:580
↓ 20 callersMethodget_resource_pool
Get the resource pool of the worker_cls
verl/recipe/spin/spin_trainer.py:72
↓ 20 callersFunctionindex_first_axis
Unified entry point for `index_first_axis` across CUDA and NPU backends. Dynamically dispatches to the appropriate device-specific implement
verl/verl/utils/attention_utils.py:37
↓ 20 callersMethodstore
(self)
verl/verl/single_controller/base/worker_group.py:60
↓ 19 callersMethod_verify_json_format_args
Verify the parameters of the function call
demo/qwen_agent/tools/base.py:140
↓ 19 callersMethodapply
(self, code: str)
demo/qwen_agent/tools/python_executor.py:142
↓ 19 callersMethodfrom_config
(cls, config: dict)
verl/tests/special_e2e/envs/digit_completion/tokenizer.py:137
↓ 18 callersFunctionload_reward_manager
Load and initialize a reward manager based on the configuration. Args: config: PPO trainer configuration object containing reward_mo
verl/recipe/entropy/reward.py:26
↓ 18 callersMethodreorder
Note that this operation is in-place
verl/verl/protocol.py:970
↓ 18 callersMethodstart_interaction
(self, instance_id=None, **kwargs)
verl/tests/workers/rollout/test_sglang_multi_interaction.py:46
↓ 17 callersMethod_call_llm
The interface of calling LLM for the agent. We prepend the system_message of this agent to the messages, and call LLM. Args:
demo/qwen_agent/agent.py:150
next →1–100 of 4,735, ranked by callers