MCPcopy Create free account

hub / github.com/DLYuanGod/MegaTrain / functions

Functions5,181 in github.com/DLYuanGod/MegaTrain

↓ 2 callersMethodget_env_fn_params
(self, env_idx=None)
verl/verl/experimental/vla/envs/libero_env/libero_env.py:128
↓ 2 callersMethodget_generation_prompt_ids
Get the generation prompt ids for rollout engine. Because rollout engine(SGLang) requires the ids to be a list, we need to convert t
verl/verl/workers/rollout/schemas.py:348
↓ 2 callersFunctionget_gsm8k_data
()
verl/tests/utils/dataset/test_rl_dataset_on_cpu.py:28
↓ 2 callersFunctionget_hf_auto_model_class
(hf_config)
verl/verl/utils/model.py:684
↓ 2 callersFunctionget_huggingface_actor_config
(model_name: str, override_config_kwargs=None, trust_remote_code=False)
verl/verl/utils/model.py:86
↓ 2 callersFunctionget_mcore_engine_forward_fn
Get the forward function for given model architecture.
verl/verl/models/mcore/registry.py:52
↓ 2 callersFunctionget_mcore_forward_fn
Get the forward function for given model architecture.
verl/verl/models/mcore/registry.py:40
↓ 2 callersFunctionget_mcore_weight_converter
Get the weight converter for given model architecture.
verl/verl/models/mcore/registry.py:288
↓ 2 callersFunctionget_megatron_mtp_loss
(n_micro_batch)
verl/verl/utils/megatron_utils.py:1358
↓ 2 callersMethodget_model_parallel_group
(self)
verl/verl/workers/engine/fsdp/transformer_impl.py:585
↓ 2 callersFunctionget_named_tensor_buckets
Group tensors into buckets based on a specified size in megabytes. Args: iterable: An iterator of tuples containing tensor names and
verl/verl/workers/rollout/sglang_rollout/utils.py:74
↓ 2 callersFunctionget_npu_profiler
Generate and return an NPU profiler object. Args: contents (list[str]): A list of options to control the collection content,
verl/verl/utils/profiler/mstx_profile.py:90
↓ 2 callersFunctionget_num_layers_to_build
Determine the number of transformer layers to build for the current pipeline stage. Args: config (TransformerConfig): Configuration o
verl/verl/utils/megatron/router_replay_utils.py:51
↓ 2 callersFunctionget_peft_cls
Get PEFT class from model config. Args: model_config: Model configuration object. bridge: Megatron-Bridge AutoBridge instance.
verl/verl/workers/config/megatron_peft.py:17
↓ 2 callersFunctionget_random_string
(length: int)
verl/verl/single_controller/ray/base.py:40
↓ 2 callersMethodget_ray_class_with_init_args
Get rollout worker actor class for colocated and standalone mode.
verl/verl/workers/rollout/replica.py:238
↓ 2 callersMethodget_reset_state_ids_all
(self)
verl/verl/experimental/vla/envs/libero_env/libero_env.py:176
↓ 2 callersFunctionget_result
(file)
verl/tests/special_e2e/sft/compare_sft_engine_results.py:21
↓ 2 callersFunctionget_rope_index
Gets the position ids for Qwen2-VL, it should be generated before sharding the sequence. The batch dim has been removed and the input_ids sho
verl/verl/models/transformers/qwen2_vl.py:64
↓ 2 callersFunctionget_shard_placement_fn
Choose the dimension that can divide fsdp_size to avoid padding
verl/verl/utils/fsdp_utils.py:564
↓ 2 callersFunctionget_sharding_strategy
(device_mesh, zero3_enable=True)
verl/verl/workers/fsdp_workers.py:114
↓ 2 callersFunctionget_sharding_strategy
Determine the appropriate sharding strategy based on the number of dimensions of the device mesh. Args: device_mesh (torch.distribut
verl/verl/workers/engine/fsdp/utils.py:59
↓ 2 callersMethodget_state
(self)
verl/verl/experimental/vla/envs/isaac_env/isaac_env.py:311
↓ 2 callersFunctionget_state_ids_for_task
(task_id)
verl/verl/experimental/vla/prepare_libero_dataset.py:62
↓ 2 callersMethodget_statistics
(self)
verl/verl/experimental/fully_async_policy/fully_async_rollouter.py:667
↓ 2 callersMethodget_statistics_sync
Get statistics (sync - deprecated, use get_statistics instead)
verl/verl/experimental/fully_async_policy/message_queue.py:232
↓ 2 callersFunctionget_test_language_model
(device_count)
verl/tests/models/test_engine.py:62
↓ 2 callersFunctionget_trajectory_tracker
()
verl/verl/utils/debug/trajectory_tracker.py:79
↓ 2 callersMethodget_transformers_auto_model_class
(self)
verl/scripts/legacy_model_merger.py:117
↓ 2 callersMethodget_transformers_auto_model_class
(self)
verl/verl/model_merger/base_model_merger.py:194
↓ 2 callersFunctionget_ulysses_sequence_parallel_rank
Get ulysses sequence parallel rank.
verl/verl/utils/ulysses.py:54
↓ 2 callersFunctionget_vl_model_vision_tower
Util to extract Vision Tower from a VL model instance
verl/verl/workers/fsdp_workers.py:133
↓ 2 callersFunctionget_vllm_max_lora_rank
For vLLM, automatically adjusts the `max_lora_rank` to the nearest allowed value. The allowed values are retrieved from vLLM's MaxLoRARanks t
verl/verl/workers/rollout/vllm_rollout/utils.py:84
↓ 2 callersFunctiongrade_answer
The answer will be considered correct if: (a) it normalizes to the same string as the ground truth answer OR (b) sympy can simplify t
verl/verl/utils/reward_score/prime_math/__init__.py:246
↓ 2 callersFunctionhighlight_keyword
(content: str, keyword: Optional[str])
verl/scripts/rollout_viewer.py:100
↓ 2 callersMethodhijack
()
verl/verl/utils/vllm/utils.py:38
↓ 2 callersMethodinfer_batch
(self, data: TensorDict)
verl/verl/workers/engine_workers.py:382
↓ 2 callersMethodinit
(self)
verl/tests/single_controller/test_worker_group_torch.py:35
↓ 2 callersMethodinit_colocated
Init colocated rollout server, rollout engine and hybrid engine colocated in same ray placement group but in separate processes. Args
verl/verl/workers/rollout/replica.py:173
↓ 2 callersMethodinit_list
(self)
verl/verl/utils/metric/utils.py:162
↓ 2 callersMethodinit_model
(self)
verl/verl/workers/fsdp_workers.py:888
↓ 2 callersMethodinit_simulator
(self)
verl/verl/experimental/vla/workers/env/env_worker.py:138
↓ 2 callersMethodinit_worker
(self)
verl/verl/experimental/vla/workers/env/env_worker.py:105
↓ 2 callersMethodinit_workers
Initialize distributed training workers using Ray backend. Creates: 1. Ray resource pools from configuration 2. Worker groups
verl/verl/trainer/ppo/ray_trainer.py:704
↓ 2 callersMethodinit_workers
(self)
verl/verl/experimental/vla/rob_ray_trainer.py:125
↓ 2 callersMethodinitialize
Instantiate or load the model, optimizer, and learning rate scheduler. Should prepare all components necessary for training or evalu
verl/verl/workers/engine/base.py:37
↓ 2 callersFunctioninitialize_tools_from_config
Initialize tools from config file. Supports both NATIVE and MCP tool types. For MCP tools, a temporary event loop is created only when needed
verl/verl/tools/utils/tool_registry.py:82
↓ 2 callersFunctioninvalidate_all_scales
Clear all cached weight scales after optimizer.step().
verl/verl/utils/qat/core.py:184
↓ 2 callersMethodis_chunkable
Return True if the wrapped data supports chunk dispatch.
verl/verl/protocol.py:1258
↓ 2 callersMethodis_concatable
Return True if the wrapped list of data supports concat collect.
verl/verl/protocol.py:1262
↓ 2 callersFunctionis_fp8_model
(vllm_config)
verl/verl/utils/vllm/vllm_fp8_utils.py:64
↓ 2 callersMethodis_padding_enabled
Check if padding is enabled for the DataProto. Returns: bool: True if padding is enabled, False otherwise.
verl/verl/protocol.py:840
↓ 2 callersMethodis_replay_backward_action
Return True if the current router_replay_action is REPLAY_BACKWARD for the local router instances. This inspects the first local RouterReplay
verl/verl/utils/megatron/router_replay_utils.py:530
↓ 2 callersFunctionis_tensor_parallel_param
(param)
verl/verl/utils/megatron/tensor_parallel.py:95
↓ 2 callersFunctionlast_boxed_only_string
(string)
verl/verl/utils/reward_score/math_reward.py:63
↓ 2 callersFunctionlaunch_router_process
( worker_urls: list[str], )
verl/verl/experimental/reward_loop/router/naive_router.py:51
↓ 2 callersFunctionlayered_summon_lora_params
(fsdp_module, is_diffusers=False)
verl/verl/utils/fsdp_utils.py:593
↓ 2 callersFunctionlist_of_dict_to_dict_of_list
Convert a list of dictionaries to a dictionary of lists. Args: list_of_dict: List of dictionaries with same keys Returns:
verl/verl/experimental/vla/envs/action_utils.py:224
↓ 2 callersMethodload_checkpoint
Load an FSDP checkpoint for this rank. Downloads and loads: - model and optimizer shards - extra state dict (sch
verl/verl/utils/checkpoint/fsdp_checkpoint_manager.py:102
↓ 2 callersFunctionload_corpus
(corpus_path: str)
verl/examples/sglang_multiturn/search_r1_like/local_dense_retriever/retrieval_server.py:34
↓ 2 callersFunctionload_path
(p: Path, data: dict, mask_strs: str, idx: int, pbar)
verl/scripts/rollout_viewer.py:54
↓ 2 callersFunctionload_state_dict_to_megatron_gptmodel
Load merged state_dict to sharded Megatron module in training.
verl/verl/models/mcore/loader.py:56
↓ 2 callersFunctionload_valuehead_model
(local_path, torch_dtype, model_config, trust_remote_code)
verl/verl/utils/model.py:635
↓ 2 callersFunctionload_yaml_config
Load configuration from YAML file. Args: config_path: Path to YAML configuration file Returns: Dictionary with configuration
infinity/config/yaml_loader.py:10
↓ 2 callersMethodlog
(self, func, *args, **kwargs)
verl/verl/utils/profiler/performance.py:109
↓ 2 callersFunctionlog_probs_from_logits_all_rmpad
Compute the log_probs from logits with rmpad input_ids and logits. Note that logits_rmpad = model(input_ids_rmpad). For each sentences, there is a
verl/verl/utils/torch_functional.py:641
↓ 2 callersFunctionlog_seqlen_unbalance
Calculate and log metrics related to sequence length imbalance before and after partitioning. Args: seqlen_list (List[int]): A list
verl/verl/utils/seqlen_balancing.py:257
↓ 2 callersFunctionls_apply_patch
(ls_module: LayerScale)
verl/verl/experimental/vla/models/openvla_oft/modeling_prismatic.py:76
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/gsm8k_multiturn_sft.py:60
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/gsm8k_tool_agent_loop.py:62
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/gsm8k_multiturn_w_interaction.py:62
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/geo3k.py:58
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/gsm8k.py:60
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/gsm8k_multiturn_w_tool.py:62
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/geo3k_multiturn_w_tool.py:60
↓ 2 callersFunctionmake_map_fn
(split)
verl/examples/data_preprocess/math_dataset.py:63
↓ 2 callersMethodmake_minibatch_iterator
Make minibatch iterator for updating the actor Args: data (DataProto): a DataProto containing keys ``input_ids``
verl/verl/workers/actor/megatron_actor.py:339
↓ 2 callersFunctionmark_end_range
End a mark range in the profiler. Args: range_id (str): The id of the mark range to end.
verl/verl/utils/profiler/nvtx_profile.py:48
↓ 2 callersFunctionmark_start_range
Start a mark range in the profiler. Args: message (str, optional): The message to be displayed in the profiler. Defaults to N
verl/verl/utils/profiler/nvtx_profile.py:27
↓ 2 callersFunctionmatch_score
Compute a similarity score considering element frequency, ignoring order. Reference: Liu S Y, Dong X, Lu X, et al. "Gdpo: Group reward-decoupled
verl/verl/utils/reward_score/rlla.py:21
↓ 2 callersFunctionmath_equal
Exact match of math if and only if: 1. numerical equal: both can convert to float and are equal 2. symbolic equal: both can convert to sy
verl/verl/utils/reward_score/prime_math/grader.py:174
↓ 2 callersMethodmaybe_filter_out_long_prompts
(self, dataframe: datasets.Dataset = None)
verl/verl/utils/dataset/rl_dataset.py:182
↓ 2 callersFunctionmaybe_patch_fsdp_module
(model)
verl/verl/utils/fsdp_utils.py:492
↓ 2 callersFunctionmcp2openai
Convert a MCP Tool to an OpenAI ChatCompletionTool.
verl/verl/tools/utils/mcp_clients/utils.py:45
↓ 2 callersFunctionmd5_encode
Generate an MD5 hash of a path string. This function is used to create unique identifiers for paths, typically for creating cache directories
verl/verl/utils/fs.py:46
↓ 2 callersFunctionmerge_router_topk_indices
Merge recorded router top-k indices across sequence-parallel ranks for all router instances, then pack/unpack them to align with the original
verl/verl/utils/megatron/router_replay_utils.py:219
↓ 2 callersFunctionmerged_lora_context
Context manager to temporarily merge LoRA adapters. This context manager merges LoRA adapters into the base model weights, performs operation
verl/verl/utils/fsdp_utils.py:984
↓ 2 callersMethodmust_wait
Check if compute must stall for prefetch.
infinity/scheduler/admission_control.py:86
↓ 2 callersMethodmy_method_with_exception
(self)
verl/tests/utils/test_rollout_trace_on_cpu.py:62
↓ 2 callersFunctionneed_teacher_policy
Given the config, do we need distillation policy.
verl/verl/trainer/ppo/utils.py:82
↓ 2 callersFunctionnormalize
(answer, pi)
verl/verl/utils/reward_score/prime_math/grader.py:121
↓ 2 callersFunctionnormalize_model_name
Transform the model name in each model_chunk in each pp stage into the name in inference engine
verl/verl/utils/model.py:337
↓ 2 callersMethodoffload
Offload.
verl/verl/utils/activation_offload.py:173
↓ 2 callersFunctionoffload_automodel_optimizer
Offload optimizer state to CPU.
verl/verl/workers/engine/automodel/utils.py:228
↓ 2 callersFunctionoffload_veomni_optimizer
(optimizer)
verl/verl/workers/engine/veomni/utils.py:64
↓ 2 callersMethodon_group_commit_forward
On group commit forward.
verl/verl/utils/activation_offload.py:161
↓ 2 callersMethodoptimizer_zero_grad
Zero the gradients of the optimizer.
verl/verl/workers/engine/base.py:77
↓ 2 callersMethodoptimizer_zero_grad
Zero gradients and enforce FSDP grad-clipping logic.
verl/verl/workers/engine/fsdp/transformer_impl.py:626
↓ 2 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/experimental/vla/naive_rollout_rob.py:45
↓ 2 callersMethodpadding
Pad the DataProto by concating with padding_candidate.repeat(padding_size) Args: padding_size (int): the number of repeated paddi
verl/verl/protocol.py:849
← previousnext →1,001–1,100 of 5,181, ranked by callers