SYMBOL INDEX (4887 symbols across 489 files) FILE: docs/_static/js/resizable-sidebar.js function setupNavigationFix (line 136) | function setupNavigationFix() { FILE: examples/data_preprocess/aime2024_multiturn_w_tool.py function make_map_fn (line 49) | def make_map_fn(split): FILE: examples/data_preprocess/dapo_multiturn_w_tool.py function make_map_fn (line 49) | def make_map_fn(split): FILE: examples/data_preprocess/full_hh_rlhf.py function generate_sft_dataset (line 30) | def generate_sft_dataset(target_hdfs_path_dir, local_dir="~/data/full_hh... function generate_rm_dataset (line 61) | def generate_rm_dataset(target_hdfs_path_dir, local_dir="~/data/full_hh_... function generate_rl_dataset (line 93) | def generate_rl_dataset(target_hdfs_path_dir, local_dir="~/data/full_hh_... FILE: examples/data_preprocess/geo3k.py function make_map_fn (line 58) | def make_map_fn(split): FILE: examples/data_preprocess/geo3k_multiturn_w_tool.py function make_map_fn (line 60) | def make_map_fn(split): FILE: examples/data_preprocess/gsm8k.py function extract_solution (line 27) | def extract_solution(solution_str): function make_map_fn (line 60) | def make_map_fn(split): FILE: examples/data_preprocess/gsm8k_multiturn_sft.py function extract_solution (line 27) | def extract_solution(solution_str): function make_map_fn (line 60) | def make_map_fn(split): FILE: examples/data_preprocess/gsm8k_multiturn_w_interaction.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 62) | def make_map_fn(split): FILE: examples/data_preprocess/gsm8k_multiturn_w_tool.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 62) | def make_map_fn(split): FILE: examples/data_preprocess/gsm8k_tool_agent_loop.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 62) | def make_map_fn(split): FILE: examples/data_preprocess/hellaswag.py function preprocess (line 28) | def preprocess(text): function make_map_fn (line 62) | def make_map_fn(split): FILE: examples/data_preprocess/math_dataset.py function extract_solution (line 28) | def extract_solution(solution_str): function make_map_fn (line 63) | def make_map_fn(split): FILE: examples/data_preprocess/multiturn.py function main (line 24) | def main(): FILE: examples/data_preprocess/pokemon.py function map_fn (line 38) | def map_fn(row: dict): FILE: examples/data_preprocess/preprocess_search_r1_dataset.py function process_single_row (line 45) | def process_single_row(row, current_split_name, row_index): function main (line 101) | def main(): FILE: examples/fapo_trainer/prepare_data.py function example_map_fn (line 27) | def example_map_fn(example, idx, process_fn, data_source, ability, split): function build_aime2024_dataset (line 39) | def build_aime2024_dataset(): function build_aime2025_dataset (line 53) | def build_aime2025_dataset(): function build_gpqa_diamond_dataset (line 67) | def build_gpqa_diamond_dataset(): function build_dapo_train_dataset (line 107) | def build_dapo_train_dataset(): FILE: examples/fapo_trainer/reward_fn.py function verify (line 29) | def verify( function compute_score_baseline (line 45) | async def compute_score_baseline( function post_request (line 95) | async def post_request(router_address: str, payload: dict, endpoint: str... function compute_score_fapo (line 134) | async def compute_score_fapo( FILE: examples/sglang_multiturn/gsm8k_toolcall_shaping/gsm8k_toolcall_shaping.py function toolcall_shaping_reward (line 23) | def toolcall_shaping_reward( function compute_score (line 46) | def compute_score( FILE: examples/sglang_multiturn/search_r1_like/local_dense_retriever/retrieval_server.py function load_corpus (line 34) | def load_corpus(corpus_path: str): function load_docs (line 39) | def load_docs(corpus, doc_idxs): function load_model (line 44) | def load_model(model_path: str, use_fp16: bool = False): function pooling (line 54) | def pooling(pooler_output, last_hidden_state, attention_mask=None, pooli... class Encoder (line 66) | class Encoder: method __init__ (line 67) | def __init__(self, model_name, model_path, pooling_method, max_length,... method encode (line 78) | def encode(self, query_list: list[str], is_query=True) -> np.ndarray: class BaseRetriever (line 124) | class BaseRetriever: method __init__ (line 125) | def __init__(self, config): method _search (line 133) | def _search(self, query: str, num: int, return_score: bool): method _batch_search (line 136) | def _batch_search(self, query_list: list[str], num: int, return_score:... method search (line 139) | def search(self, query: str, num: int = None, return_score: bool = Fal... method batch_search (line 142) | def batch_search(self, query_list: list[str], num: int = None, return_... class BM25Retriever (line 146) | class BM25Retriever(BaseRetriever): method __init__ (line 147) | def __init__(self, config): method _check_contain_doc (line 157) | def _check_contain_doc(self): method _search (line 160) | def _search(self, query: str, num: int = None, return_score: bool = Fa... method _batch_search (line 193) | def _batch_search(self, query_list: list[str], num: int = None, return... class DenseRetriever (line 206) | class DenseRetriever(BaseRetriever): method __init__ (line 207) | def __init__(self, config): method _search (line 227) | def _search(self, query: str, num: int = None, return_score: bool = Fa... method _batch_search (line 240) | def _batch_search(self, query_list: list[str], num: int = None, return... function get_retriever (line 273) | def get_retriever(config): class Config (line 285) | class Config: method __init__ (line 291) | def __init__( class QueryRequest (line 320) | class QueryRequest(BaseModel): function retrieve_endpoint (line 330) | def retrieve_endpoint(request: QueryRequest): FILE: examples/split_placement/main_ppo_split.py function _select_rm_score_fn (line 30) | def _select_rm_score_fn(data_source): class RewardManager (line 39) | class RewardManager: method __init__ (line 40) | def __init__(self, tokenizer, num_examine) -> None: method __call__ (line 44) | def __call__(self, data: DataProto, return_dict: bool = False): function main (line 96) | def main(config): function main_task (line 111) | def main_task(config): FILE: examples/split_placement/split_monkey_patch.py function fit (line 38) | def fit(self): FILE: examples/tutorial/agent_loop_get_started/sandbox.py class SandboxTool (line 22) | class SandboxTool(BaseTool): method __init__ (line 23) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method code_interpreter (line 28) | async def code_interpreter(self, code: str) -> str: method get_openai_tool_schema (line 47) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 51) | async def execute(self, instance_id: str, parameters: dict, **kwargs) ... FILE: scripts/converter_hf_to_mcore.py function _init_args (line 51) | def _init_args(): function test_conversion (line 73) | def test_conversion(megatron_model_provider, tfconfig, output_path, model): function convert_checkpoint_from_transformers_to_megatron (line 122) | def convert_checkpoint_from_transformers_to_megatron( function safe_copy (line 209) | def safe_copy( function convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl (line 223) | def convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl(hfmodel,... function convert_checkpoint_from_transformers_to_megatron_dpskv3 (line 330) | def convert_checkpoint_from_transformers_to_megatron_dpskv3( function noop_context (line 434) | def noop_context() -> Any: function support_distributed_convert (line 438) | def support_distributed_convert(hf_config: AutoConfig) -> bool: function convert_hf_to_mcore (line 445) | def convert_hf_to_mcore( FILE: scripts/diagnose.py function test_connection (line 50) | def test_connection(name, url, timeout=10): function check_python (line 70) | def check_python(): function check_pip (line 78) | def check_pip(): function _get_current_git_commit (line 89) | def _get_current_git_commit(): function check_verl (line 101) | def check_verl(): function check_os (line 126) | def check_os(): function check_hardware (line 135) | def check_hardware(): function check_network (line 151) | def check_network(args): function check_environment (line 170) | def check_environment(): function check_pip_package_versions (line 177) | def check_pip_package_versions(): function check_cuda_versions (line 187) | def check_cuda_versions(): function _get_cpu_memory (line 208) | def _get_cpu_memory(): function _get_gpu_info (line 216) | def _get_gpu_info(): function _get_system_info (line 244) | def _get_system_info(): function check_system_info (line 253) | def check_system_info(): function parse_args (line 263) | def parse_args(): FILE: scripts/init_random_model.py function _init_args (line 37) | def _init_args(): function check_output_path (line 51) | def check_output_path(output_path: str): function check_configs (line 60) | def check_configs(original_config: dict[str, Any], new_config: dict[str,... function init_random_model (line 77) | def init_random_model(hf_model_path, new_config_path, output_path, trust... FILE: scripts/legacy_model_merger.py class ModelMergerConfig (line 77) | class ModelMergerConfig: method __post_init__ (line 91) | def __post_init__(self): class BaseModelMerger (line 99) | class BaseModelMerger(ABC): method __init__ (line 100) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 117) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 141) | def patch_model_generation_config(self, model): method save_lora_adapter (line 157) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 214) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 243) | def upload_to_huggingface(self): method merge_and_save (line 251) | def merge_and_save(self): class FSDPModelMerger (line 255) | class FSDPModelMerger(BaseModelMerger): method _get_world_size (line 256) | def _get_world_size(self) -> int: method _load_rank_zero_state_dict (line 266) | def _load_rank_zero_state_dict(self, world_size: int) -> dict: method _extract_device_mesh_info (line 273) | def _extract_device_mesh_info(self, state_dict: dict, world_size: int)... method _calculate_shard_configuration (line 293) | def _calculate_shard_configuration( method _merge_by_placement (line 309) | def _merge_by_placement(self, tensors: list[torch.Tensor], placement: ... method _load_and_merge_state_dicts (line 320) | def _load_and_merge_state_dicts( method merge_and_save (line 383) | def merge_and_save(self): method _test_state_dict (line 406) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): class MegatronModelMerger (line 440) | class MegatronModelMerger(BaseModelMerger): method __init__ (line 441) | def __init__(self, config: ModelMergerConfig): method _get_tp_pp_rank_from_sharded_dir (line 484) | def _get_tp_pp_rank_from_sharded_dir(self, sharded_dir: str) -> tuple[... method _check_megatron_checkpoint_path (line 498) | def _check_megatron_checkpoint_path(self, model_path: str) -> tuple[li... method _merge_across_tp (line 513) | def _merge_across_tp( method _load_state_dicts (line 569) | def _load_state_dicts( method _check_megatron_state_key (line 587) | def _check_megatron_state_key(self, key: str) -> bool: method _merge_state_dicts (line 611) | def _merge_state_dicts( method merge_and_save (line 663) | def merge_and_save(self): method _test_state_dict (line 685) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): method _replace_name (line 706) | def _replace_name(self, megatron_name: str, name_mapping: dict[str, st... function main (line 718) | def main(): FILE: scripts/megatron_merge_lora.py class CustomSaveWorker (line 33) | class CustomSaveWorker(ActorRolloutRefWorker): method save_merged_weights (line 35) | def save_merged_weights(self, hf_ckpt_path): function main (line 56) | def main(config): function run_merge (line 69) | def run_merge(config) -> None: function main_task (line 84) | def main_task(config): FILE: scripts/print_cfg.py function main (line 21) | def main(config): FILE: scripts/rollout_viewer.py function check_textual_version (line 42) | def check_textual_version(): function load_path (line 54) | async def load_path(p: Path, data: dict, mask_strs: str, idx: int, pbar): function load_dir (line 74) | async def load_dir(path: Path, data: dict[int, dict], pbar, mask_strs: s... class Highlighter (line 83) | class Highlighter(ReprHighlighter): function center_word_with_equals_exactly (line 90) | def center_word_with_equals_exactly(word: str, total_length: int, char: ... function highlight_keyword (line 100) | def highlight_keyword(content: str, keyword: Optional[str]): class JsonLineViewer (line 129) | class JsonLineViewer(App): method __init__ (line 175) | def __init__(self, step_num: int, data: dict[int, dict], pbar): method compose (line 200) | def compose(self) -> ComposeResult: method on_mount (line 250) | async def on_mount(self) -> None: method update_result_options (line 268) | def update_result_options(self, offset: int = 0, sort_desc: Optional[b... method update_content (line 292) | async def update_content(self, search_keyword: Optional[str] = None): method on_reqid_submitted (line 332) | async def on_reqid_submitted(self, event: Input.Submitted) -> None: method _update_fields_select (line 373) | def _update_fields_select(self, keys): method step_changed (line 395) | async def step_changed(self, event): method sample_changed (line 401) | async def sample_changed(self, event): method sort_changed (line 407) | async def sort_changed(self, event): method fields_changed (line 413) | async def fields_changed(self, event): method fields_all_changed (line 417) | async def fields_all_changed(self, event): method action_focus_previous (line 424) | def action_focus_previous(self): method action_focus_next (line 427) | def action_focus_next(self): method action_next_step (line 430) | async def action_next_step(self) -> None: method action_next_sample (line 438) | async def action_next_sample(self) -> None: method action_previous_step (line 446) | async def action_previous_step(self) -> None: method action_previous_sample (line 454) | async def action_previous_sample(self) -> None: method action_swith_render (line 462) | async def action_swith_render(self): method action_toggle_search (line 466) | def action_toggle_search(self) -> None: method action_cancel_search (line 469) | async def action_cancel_search(self) -> None: method _clear_search (line 474) | async def _clear_search(self): method on_search_submitted (line 480) | async def on_search_submitted(self, event: Input.Submitted) -> None: method action_next_search (line 507) | async def action_next_search(self) -> None: method action_page_up (line 521) | def action_page_up(self): method action_page_down (line 524) | def action_page_down(self): method action_page_home (line 527) | def action_page_home(self): method action_page_end (line 530) | def action_page_end(self): function _run (line 534) | async def _run(path: Path, mask_str: str): function run (line 556) | def run( FILE: scripts/veomni/moe_merge.py class StateDictIterator (line 46) | class StateDictIterator: method __iter__ (line 49) | def __iter__(self) -> Generator[tuple[str, "torch.Tensor"], None, None]: function main (line 61) | def main(raw_hf_path, merge_hf_path): FILE: scripts/veomni/moe_split.py class StateDictIterator (line 43) | class StateDictIterator: method __iter__ (line 46) | def __iter__(self) -> Generator[tuple[str, "torch.Tensor"], None, None]: function main (line 58) | def main(merge_hf_path, split_hf_path): FILE: tests/checkpoint_engine/test_correctness_on_gpu.py function test_nccl_checkpoint_engine (line 34) | async def test_nccl_checkpoint_engine( function test_nixl_checkpoint_engine (line 83) | async def test_nixl_checkpoint_engine( function test_kimi_checkpoint_engine (line 139) | async def test_kimi_checkpoint_engine( FILE: tests/checkpoint_engine/test_correctness_on_npu.py function test_hccl_checkpoint_engine (line 34) | async def test_hccl_checkpoint_engine( function test_kimi_checkpoint_engine (line 83) | async def test_kimi_checkpoint_engine( function test_mooncake_checkpoint_engine (line 130) | async def test_mooncake_checkpoint_engine( FILE: tests/checkpoint_engine/test_special_server_adapter.py function init_config (line 34) | def init_config() -> DictConfig: function _run_update_weights_with_global_steps_none (line 57) | async def _run_update_weights_with_global_steps_none( function _run_server_manager_without_resume (line 83) | async def _run_server_manager_without_resume( function _run_server_manager_with_resume (line 124) | async def _run_server_manager_with_resume( function test_server_adapter (line 175) | async def test_server_adapter(init_config): FILE: tests/checkpoint_engine/test_utils.py class TrainingWorkerTest (line 31) | class TrainingWorkerTest(TrainingWorker): method __init__ (line 32) | def __init__(self, config: TrainingWorkerConfig, checkpoint_engine_con... method update_weights (line 43) | async def update_weights(self, global_steps: int = None): method execute_checkpoint_engine (line 48) | def execute_checkpoint_engine(self, method: str, *args, **kwargs): class MockServerAdapter (line 52) | class MockServerAdapter(BaseRollout): method __init__ (line 53) | def __init__(self, config: RolloutConfig, model_config: HFModelConfig,... method resume (line 59) | async def resume(self, tags: list[str]): method release (line 62) | async def release(self): method update_weights (line 65) | async def update_weights( method check_weights (line 75) | def check_weights(self): class MockReplica (line 90) | class MockReplica(RolloutReplica): method init_hybrid (line 91) | async def init_hybrid(self, worker_group: RayWorkerGroup): method get_ray_class_with_init_args (line 101) | def get_ray_class_with_init_args(self) -> RayClassWithInitArgs: method launch_servers (line 105) | async def launch_servers(self): class CheckpointEngineWorkerTest (line 110) | class CheckpointEngineWorkerTest(CheckpointEngineWorker): method __init__ (line 111) | def __init__( method check_weights (line 118) | def check_weights(self): function create_trainer_worker_group (line 122) | def create_trainer_worker_group( function create_rollout_worker_group (line 150) | async def create_rollout_worker_group( FILE: tests/experimental/agent_loop/agent_utils.py function init_agent_loop_manager (line 28) | def init_agent_loop_manager(config: DictConfig) -> AgentLoopManager | Ra... FILE: tests/experimental/agent_loop/test_agent_loop_extra_fields_schema_on_cpu.py class _FakeServerManager (line 37) | class _FakeServerManager: method generate (line 38) | async def generate( method generate_for_partial (line 51) | async def generate_for_partial( class _FakeTokenizer (line 67) | class _FakeTokenizer: method apply_chat_template (line 70) | def apply_chat_template( method pad (line 83) | def pad( method decode (line 113) | def decode(self, ids: list[int] | torch.Tensor, skip_special_tokens: b... function _pad_1d (line 118) | def _pad_1d(ids: list[int], *, length: int, pad_id: int = 0) -> list[int]: function _to_internal (line 124) | def _to_internal( function test_agent_loop_extra_fields_schema_stable_for_training_concat_on_cpu (line 170) | async def test_agent_loop_extra_fields_schema_stable_for_training_concat... function test_agent_loop_postprocess_accepts_read_only_routed_experts_on_cpu (line 252) | async def test_agent_loop_postprocess_accepts_read_only_routed_experts_o... FILE: tests/experimental/agent_loop/test_basic_agent_loop.py function init_config (line 36) | def init_config() -> DictConfig: function test_single_turn (line 68) | def test_single_turn(init_config): class WeatherTool (line 130) | class WeatherTool(BaseTool): method get_current_temperature (line 131) | def get_current_temperature(self, location: str, unit: str = "celsius"): method get_openai_tool_schema (line 148) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 152) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class WeatherToolWithData (line 160) | class WeatherToolWithData(BaseTool): method get_openai_tool_schema (line 161) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method get_temperature_date (line 165) | def get_temperature_date(self, location: str, date: str, unit: str = "... method execute (line 184) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_tool_agent (line 192) | def test_tool_agent(init_config): function test_tool_agent_with_interaction (line 306) | def test_tool_agent_with_interaction(init_config): function test_get_trajectory_info (line 441) | async def test_get_trajectory_info(): function ray_for_lb (line 464) | def ray_for_lb(): class TestLoadBalancerRouting (line 470) | class TestLoadBalancerRouting: method test_distributes_across_servers (line 473) | def test_distributes_across_servers(self, ray_for_lb): method test_new_requests_route_to_least_loaded (line 478) | def test_new_requests_route_to_least_loaded(self, ray_for_lb): method test_release_rebalances (line 490) | def test_release_rebalances(self, ray_for_lb): method test_release_invalid_server_raises (line 501) | def test_release_invalid_server_raises(self, ray_for_lb): method test_release_without_inflight_raises (line 507) | def test_release_without_inflight_raises(self, ray_for_lb): class TestLoadBalancerStickySession (line 514) | class TestLoadBalancerStickySession: method test_same_request_id_same_server (line 517) | def test_same_request_id_same_server(self, ray_for_lb): FILE: tests/experimental/agent_loop/test_gpt_oss_tool_parser.py function test_gpt_oss_tool_parser (line 22) | async def test_gpt_oss_tool_parser(): FILE: tests/experimental/agent_loop/test_multi_modal.py function parse_multi_modal_type (line 32) | def parse_multi_modal_type(messages: list[dict]) -> str: function init_config (line 47) | def init_config() -> DictConfig: class ImageGeneratorTool (line 75) | class ImageGeneratorTool(BaseTool): method generate_image (line 76) | def generate_image(self, description: str, size: str = "256x256"): method get_openai_tool_schema (line 113) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 117) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_multimodal_tool_agent (line 127) | def test_multimodal_tool_agent(init_config): function test_multimodal_single_turn_agent (line 297) | def test_multimodal_single_turn_agent(init_config): FILE: tests/experimental/agent_loop/test_standalone_rollout.py function init_config (line 29) | def init_config() -> DictConfig: function test_standalone_rollout (line 48) | async def test_standalone_rollout(init_config, tp_size): function test_hybrid_rollout_with_ep (line 104) | def test_hybrid_rollout_with_ep(init_config): FILE: tests/experimental/reward_loop/reward_fn.py function chat_complete (line 41) | async def chat_complete(router_address: str, chat_complete_request: dict): function compute_score_gsm8k (line 56) | async def compute_score_gsm8k( function compute_score_math_verify (line 87) | def compute_score_math_verify( FILE: tests/experimental/reward_loop/test_agent_reward_loop_colocate.py function test_agent_reward_loop_standalone (line 34) | def test_agent_reward_loop_standalone(): FILE: tests/experimental/reward_loop/test_agent_reward_loop_standalone.py function test_agent_reward_loop_standalone (line 28) | def test_agent_reward_loop_standalone(): FILE: tests/experimental/reward_loop/test_async_token_bucket_on_cpu.py class TestAsyncTokenBucket (line 23) | class TestAsyncTokenBucket: method test_basic_acquire (line 27) | async def test_basic_acquire(self): method test_refill_mechanism (line 40) | async def test_refill_mechanism(self): method test_waiting_for_tokens (line 59) | async def test_waiting_for_tokens(self): method test_max_tokens_cap (line 75) | async def test_max_tokens_cap(self): method test_fractional_tokens (line 90) | async def test_fractional_tokens(self): method test_concurrent_acquires (line 102) | async def test_concurrent_acquires(self): method test_high_rate_limit (line 123) | async def test_high_rate_limit(self): method test_zero_initial_state (line 137) | async def test_zero_initial_state(self): method test_rate_limit_accuracy (line 149) | async def test_rate_limit_accuracy(self): method test_sequential_acquires (line 166) | async def test_sequential_acquires(self): method test_default_max_tokens (line 187) | async def test_default_max_tokens(self): method test_single_token_acquire (line 195) | async def test_single_token_acquire(self): method test_large_token_acquire (line 204) | async def test_large_token_acquire(self): method test_thread_safety_with_lock (line 217) | async def test_thread_safety_with_lock(self): method test_multiple_wait_cycles (line 237) | async def test_multiple_wait_cycles(self): method test_rapid_small_acquires (line 253) | async def test_rapid_small_acquires(self): FILE: tests/experimental/reward_loop/test_math_verify.py function test_agent_reward_loop_standalone (line 27) | def test_agent_reward_loop_standalone(): FILE: tests/experimental/reward_loop/test_rate_limited_reward_manager_on_cpu.py class MockAPICounter (line 29) | class MockAPICounter: method __init__ (line 32) | def __init__(self): method record_call (line 37) | async def record_call(self): method reset (line 42) | def reset(self): method get_rate_per_second (line 46) | def get_rate_per_second(self, window_start: float = None): function mock_sync_reward_function (line 70) | def mock_sync_reward_function( function mock_async_reward_function (line 82) | async def mock_async_reward_function( function mock_slow_api_function (line 97) | async def mock_slow_api_function( function mock_failing_api_function (line 105) | async def mock_failing_api_function( function mock_dict_result_function (line 113) | async def mock_dict_result_function( function create_test_data_proto (line 124) | def create_test_data_proto(tokenizer, response_text: str, ground_truth: ... class TestRateLimitedRewardManager (line 143) | class TestRateLimitedRewardManager: method setup_and_teardown (line 147) | def setup_and_teardown(self): method tokenizer (line 160) | def tokenizer(self): method test_basic_reward_computation (line 165) | async def test_basic_reward_computation(self, tokenizer): method test_rpm_rate_limiting (line 183) | async def test_rpm_rate_limiting(self, tokenizer): method test_tpm_rate_limiting (line 218) | async def test_tpm_rate_limiting(self, tokenizer): method test_concurrency_limiting (line 254) | async def test_concurrency_limiting(self, tokenizer): method test_timeout_handling (line 287) | async def test_timeout_handling(self, tokenizer): method test_error_handling (line 311) | async def test_error_handling(self, tokenizer): method test_dict_result_format (line 330) | async def test_dict_result_format(self, tokenizer): method test_sync_reward_function (line 347) | async def test_sync_reward_function(self, tokenizer): method test_combined_rate_limits (line 362) | async def test_combined_rate_limits(self, tokenizer): method test_correct_vs_incorrect_answers (line 398) | async def test_correct_vs_incorrect_answers(self, tokenizer): method test_high_throughput (line 417) | async def test_high_throughput(self, tokenizer): method test_class_initialization_once (line 459) | async def test_class_initialization_once(self, tokenizer): method test_extra_info_handling (line 474) | async def test_extra_info_handling(self, tokenizer): FILE: tests/experimental/reward_loop/test_reward_model_disrm.py function create_data_samples (line 27) | def create_data_samples(tokenizer) -> DataProto: function test_reward_model_manager (line 107) | def test_reward_model_manager(): FILE: tests/experimental/reward_loop/test_reward_model_genrm.py function create_data_samples (line 28) | def create_data_samples(tokenizer) -> DataProto: function test_reward_model_manager (line 108) | def test_reward_model_manager(): FILE: tests/experimental/vla/test_sim_envs.py function test_sim_env_creation_and_step (line 25) | def test_sim_env_creation_and_step(simulator_type): FILE: tests/interactions/test_gsm8k_interaction.py class TestGsm8kInteraction (line 24) | class TestGsm8kInteraction: method setup_method (line 27) | def setup_method(self): method test_init (line 32) | def test_init(self): method test_start_interaction_with_instance_id (line 39) | async def test_start_interaction_with_instance_id(self): method test_start_interaction_without_instance_id (line 53) | async def test_start_interaction_without_instance_id(self): method test_start_interaction_without_ground_truth (line 65) | async def test_start_interaction_without_ground_truth(self): method test_generate_response_correct_answer_with_prefix (line 75) | async def test_generate_response_correct_answer_with_prefix(self): method test_generate_response_correct_answer_without_prefix (line 97) | async def test_generate_response_correct_answer_without_prefix(self): method test_generate_response_incorrect_answer (line 118) | async def test_generate_response_incorrect_answer(self): method test_generate_response_multiple_messages (line 139) | async def test_generate_response_multiple_messages(self): method test_generate_response_no_assistant_message (line 164) | async def test_generate_response_no_assistant_message(self): method test_calculate_score_direct_call (line 183) | async def test_calculate_score_direct_call(self): method test_calculate_score_with_kwargs (line 201) | async def test_calculate_score_with_kwargs(self): method test_finalize_interaction (line 219) | async def test_finalize_interaction(self): method test_finalize_interaction_with_kwargs (line 234) | async def test_finalize_interaction_with_kwargs(self): method test_finalize_nonexistent_interaction (line 249) | async def test_finalize_nonexistent_interaction(self): method test_full_interaction_workflow_correct (line 258) | async def test_full_interaction_workflow_correct(self): method test_full_interaction_workflow_incorrect (line 281) | async def test_full_interaction_workflow_incorrect(self): method test_multiple_concurrent_interactions (line 316) | async def test_multiple_concurrent_interactions(self): method test_edge_case_empty_messages (line 349) | async def test_edge_case_empty_messages(self): method test_edge_case_message_without_content (line 369) | async def test_edge_case_message_without_content(self): method test_inheritance_from_base_interaction (line 390) | def test_inheritance_from_base_interaction(self): method test_name_attribute_initialization (line 408) | def test_name_attribute_initialization(self): FILE: tests/interactions/test_interaction_registry.py class TestInteractionRegistry (line 30) | class TestInteractionRegistry: method test_get_interaction_class (line 31) | def test_get_interaction_class(self): method test_initialize_single_interaction_from_config (line 41) | def test_initialize_single_interaction_from_config(self): method test_initialize_multiple_interactions_from_config (line 69) | def test_initialize_multiple_interactions_from_config(self): method test_initialize_interaction_without_explicit_name (line 111) | def test_initialize_interaction_without_explicit_name(self): method test_initialize_empty_config (line 132) | def test_initialize_empty_config(self): method test_invalid_class_name (line 146) | def test_invalid_class_name(self): method test_duplicate_interaction_names (line 162) | def test_duplicate_interaction_names(self): method test_auto_name_generation_edge_cases (line 185) | def test_auto_name_generation_edge_cases(self): FILE: tests/models/test_engine.py function get_test_language_model (line 56) | def get_test_language_model(device_count): function create_training_config (line 65) | def create_training_config(model_type, strategy, device_count, model): function test_actor_engine (line 114) | def test_actor_engine(strategy): function create_value_model (line 234) | def create_value_model(language_model_path, output_path): function test_critic_engine (line 250) | def test_critic_engine(strategy): function create_actor_model (line 353) | def create_actor_model(tmp_path, config): function _worker (line 361) | def _worker(rank: int, world_size: int, rendezvous_file: str, strategy: ... function test_per_tensor_generator (line 431) | def test_per_tensor_generator(world_size, tmp_path, config, strategy): FILE: tests/models/test_tiled_mlp_accuracy.py function setup_distributed (line 26) | def setup_distributed(): function create_model (line 34) | def create_model(model_name="Qwen/Qwen3-1.7B", num_layers=2): function apply_fsdp2 (line 51) | def apply_fsdp2(model, device_mesh): function run_forward_backward (line 59) | def run_forward_backward(model, input_ids, labels): function compare_results (line 78) | def compare_results(logits1, grads1, logits2, grads2, rank): function main (line 119) | def main(): FILE: tests/models/test_transformer.py function test_hf_casual_models (line 47) | def test_hf_casual_models(): function test_hf_value_models (line 117) | def test_hf_value_models(): function test_attn_implementation_override (line 172) | def test_attn_implementation_override(): function test_fsdp_worker_attn_implementation_integration (line 207) | def test_fsdp_worker_attn_implementation_integration(): FILE: tests/models/test_transformers_ulysses.py class SequenceParallelConfig (line 49) | class SequenceParallelConfig: function test_configs (line 55) | def test_configs(): function sync_model_parameters_global (line 92) | def sync_model_parameters_global(layer): function test_hf_casual_fwd_bwd (line 99) | def test_hf_casual_fwd_bwd(test_config): function _hf_casual_fwd (line 112) | def _hf_casual_fwd(config, sp_size, dp_size): function _hf_casual_fwd_bwd (line 191) | def _hf_casual_fwd_bwd(config, sp_size, dp_size): FILE: tests/single_controller/base/test_decorator.py function reset_dispatch_registry (line 29) | def reset_dispatch_registry(): function test_register_new_dispatch_mode (line 38) | def test_register_new_dispatch_mode(reset_dispatch_registry): function test_update_existing_dispatch_mode (line 60) | def test_update_existing_dispatch_mode(reset_dispatch_registry): FILE: tests/single_controller/check_worker_alive/main.py class TestActor (line 27) | class TestActor(Worker): method __init__ (line 28) | def __init__(self) -> None: method foo (line 32) | def foo(self, wait_time): FILE: tests/single_controller/detached_worker/client.py function compute_position_id_with_mask (line 27) | def compute_position_id_with_mask(mask): FILE: tests/single_controller/detached_worker/server.py class Trainer (line 44) | class Trainer(Worker): method __init__ (line 45) | def __init__(self): method init_model (line 74) | def init_model(self): method train_model (line 117) | def train_model(self, data: DataProto) -> DataProto: FILE: tests/single_controller/test_auto_padding_on_cpu.py class Actor (line 30) | class Actor(Worker): method __init__ (line 31) | def __init__(self) -> None: method add (line 35) | def add(self, data: DataProto): function test_auto_padding (line 40) | def test_auto_padding(): FILE: tests/single_controller/test_colocated_workers.py class Actor (line 30) | class Actor(Worker): method __init__ (line 31) | def __init__(self) -> None: method add (line 35) | def add(self, data: DataProto): class Critic (line 41) | class Critic(Worker): method __init__ (line 42) | def __init__(self, config) -> None: method sub (line 47) | async def sub(self, data: DataProto): function test_colocated_workers (line 52) | def test_colocated_workers(): FILE: tests/single_controller/test_colocated_workers_fused.py class Actor (line 30) | class Actor(Worker): method __init__ (line 31) | def __init__(self) -> None: method add (line 35) | def add(self, data: DataProto): class Critic (line 41) | class Critic(Worker): method __init__ (line 42) | def __init__(self, config) -> None: method sub (line 47) | def sub(self, data: DataProto): function test_colocated_workers_fused (line 52) | def test_colocated_workers_fused(): FILE: tests/single_controller/test_data_transfer.py class DummyWorker (line 34) | class DummyWorker(Worker): method __init__ (line 35) | def __init__(self): method do_nothing (line 40) | def do_nothing(self, data): function test_data_transfer (line 48) | def test_data_transfer(): FILE: tests/single_controller/test_decorator_on_cpu.py function ray_init_shutdown (line 32) | def ray_init_shutdown(): class DecoratorTestWorker (line 40) | class DecoratorTestWorker(Worker): method __init__ (line 41) | def __init__(self, initial_value=0): method dp_compute (line 51) | def dp_compute(self, data: DataProto) -> DataProto: method async_dp_compute (line 59) | async def async_dp_compute(self, data: DataProto) -> DataProto: method dp_compute_td (line 67) | def dp_compute_td(self, data: TensorDict) -> TensorDict: function test_decorator_dp_compute (line 82) | def test_decorator_dp_compute(ray_init_shutdown): function test_decorator_async_function (line 118) | def test_decorator_async_function(ray_init_shutdown): function test_decorator_dp_compute_td (line 161) | def test_decorator_dp_compute_td(ray_init_shutdown): FILE: tests/single_controller/test_device_mesh_register.py class TestActor (line 29) | class TestActor(Worker): method __init__ (line 30) | def __init__(self): method generate_data_proto (line 56) | def generate_data_proto(self, data: DataProto): method generate_tensordict (line 63) | def generate_tensordict(self, data: TensorDict): method train_data_proto (line 70) | def train_data_proto(self, data: DataProto): method train_tensordict (line 80) | def train_tensordict(self, data: TensorDict): method generate_nested_tensor (line 90) | def generate_nested_tensor(self, data: TensorDict): function test_dist_global_info_wg (line 100) | def test_dist_global_info_wg(): FILE: tests/single_controller/test_driverfunc_to_worker.py class ModelActor (line 32) | class ModelActor(Worker): method __init__ (line 33) | def __init__(self): class HackSelf (line 37) | class HackSelf: method __init__ (line 38) | def __init__(self): function get_aux_metrics (line 42) | def get_aux_metrics(self, test_proto): function test (line 55) | def test(): FILE: tests/single_controller/test_fused_workers_on_cpu.py class Actor (line 28) | class Actor(Worker): method __init__ (line 29) | def __init__(self) -> None: method add (line 33) | def add(self, x): class Critic (line 39) | class Critic(Worker): method __init__ (line 40) | def __init__(self, val) -> None: method sub (line 45) | def sub(self, x): class HybridWorker (line 57) | class HybridWorker(FusedBaseClass): method foo (line 59) | def foo(self, x): function test_fused_workers (line 63) | def test_fused_workers(): FILE: tests/single_controller/test_get_set_dispatch_collect_cpu.py function test_get_set_dispatch_collect_cpu (line 21) | def test_get_set_dispatch_collect_cpu(): FILE: tests/single_controller/test_high_level_scheduling_api.py class TestActor (line 25) | class TestActor(Worker): method __init__ (line 27) | def __init__(self, cuda_visible_devices=None) -> None: method get_node_id (line 30) | def get_node_id(self): function test (line 34) | def test(): FILE: tests/single_controller/test_nested_worker.py class TestActor (line 24) | class TestActor(Worker): method __init__ (line 26) | def __init__(self, x) -> None: method get (line 31) | def get(self): class TestHighLevelActor (line 35) | class TestHighLevelActor(Worker): method __init__ (line 36) | def __init__(self, x=None) -> None: method get (line 41) | def get(self): function test_nested_worker (line 45) | def test_nested_worker(): FILE: tests/single_controller/test_ray_collectives.py class Actor (line 33) | class Actor(Worker): method init (line 35) | def init(self): method send_tensors (line 41) | def send_tensors(self): class Rollout (line 47) | class Rollout(Worker): method init (line 49) | def init(self): method receive_tensors (line 59) | def receive_tensors(self): method get_tensors (line 67) | def get_tensors(self): function test_ray_collective_group (line 71) | def test_ray_collective_group(): FILE: tests/single_controller/test_ray_local_envs_on_cpu.py class TestActor (line 27) | class TestActor(Worker): method __init__ (line 28) | def __init__(self) -> None: method getenv (line 31) | def getenv(self, key): function test_basics (line 36) | def test_basics(): function test_customized_worker_env (line 53) | def test_customized_worker_env(): FILE: tests/single_controller/test_ray_utils_on_cpu.py function init_ray (line 23) | def init_ray(): function test_parallel_put_basic (line 29) | def test_parallel_put_basic(init_ray): function test_parallel_put_empty (line 37) | def test_parallel_put_empty(init_ray): function test_parallel_put_workers (line 43) | def test_parallel_put_workers(init_ray): FILE: tests/single_controller/test_rvdz.py class TestWorker (line 19) | class TestWorker: method __init__ (line 20) | def __init__(self, rank, world_size, group_name): method init (line 26) | def init(self): method test (line 31) | def test(self): function test_rvdz (line 37) | def test_rvdz(): FILE: tests/single_controller/test_split_resource_pool.py class Actor (line 33) | class Actor(Worker): method __init__ (line 34) | def __init__(self, worker_id) -> None: method add (line 45) | def add(self, data: DataProto): function test_split_resource_pool_with_split_size (line 50) | def test_split_resource_pool_with_split_size(): function test_split_resource_pool_with_split_size_list (line 78) | def test_split_resource_pool_with_split_size_list(): function test_split_resource_pool_with_split_size_list_cross_nodes (line 112) | def test_split_resource_pool_with_split_size_list_cross_nodes(): function test_split_resource_pool_with_split_twice (line 147) | def test_split_resource_pool_with_split_twice(): FILE: tests/single_controller/test_worker_group_basics.py function two_to_all_dispatch_fn (line 27) | def two_to_all_dispatch_fn(worker_group, *args, **kwargs): function get_ray_remote_options (line 42) | def get_ray_remote_options() -> str: class TestActor (line 56) | class TestActor(Worker): method __init__ (line 58) | def __init__(self, x) -> None: method foo (line 62) | def foo(self, y): method foo_rank_zero (line 66) | def foo_rank_zero(self, x, y): method foo_one_to_all (line 70) | def foo_one_to_all(self, x, y): method foo_all_to_all (line 74) | def foo_all_to_all(self, x, y): method foo_custom (line 78) | def foo_custom(self, x, y): function remote_call_wg (line 83) | def remote_call_wg(worker_names): function add_one (line 99) | def add_one(data): function test_basics (line 106) | def test_basics(): FILE: tests/single_controller/test_worker_group_torch.py class TestAllGatherActor (line 30) | class TestAllGatherActor(Worker): method __init__ (line 31) | def __init__(self, size) -> None: method init (line 35) | def init(self): method all_gather (line 40) | def all_gather(self): class TestAllGatherActorV2 (line 50) | class TestAllGatherActorV2(Worker): method __init__ (line 51) | def __init__(self, size) -> None: method all_gather (line 59) | def all_gather(self): function test_all_gather_torch (line 68) | def test_all_gather_torch(): function test_all_gather_torch_v2 (line 94) | def test_all_gather_torch_v2(): FILE: tests/special_distributed/test_fsdp_ckpt.py function create_random_input_ids (line 31) | def create_random_input_ids(batch_size, seq_len, vocab_size): function test_fsdp_ckpt (line 50) | def test_fsdp_ckpt(strategy="fsdp"): FILE: tests/special_distributed/test_mcore_config_converter.py function check_config_converter_results (line 36) | def check_config_converter_results(tf_config: TransformerConfig | MLATra... function modify_hf_config (line 67) | def modify_hf_config(name: str, hf_config: PretrainedConfig): function test_mcore_config_converter (line 74) | def test_mcore_config_converter(): FILE: tests/special_distributed/test_tensor_dict.py function test_all_gather_data_proto (line 28) | def test_all_gather_data_proto(): function test_vocab_parallel_entropy (line 61) | def test_vocab_parallel_entropy(): FILE: tests/special_e2e/check_custom_rwd_fn.py function check_congratulations_in_file (line 18) | def check_congratulations_in_file(output_file): FILE: tests/special_e2e/check_results.py function extract_reward_from_line (line 20) | def extract_reward_from_line(line): FILE: tests/special_e2e/envs/digit_completion/task.py class DigitCompletion (line 19) | class DigitCompletion: method __init__ (line 35) | def __init__(self, max_number: int, max_diff: int, max_num_in_response... method __str__ (line 56) | def __str__(self): method get_state (line 63) | def get_state(self): method set_state (line 66) | def set_state(self, state): method prompt_length (line 71) | def prompt_length(self): method response_length (line 75) | def response_length(self): method add (line 80) | def add(self, a, b): method get_all_prompts (line 83) | def get_all_prompts(self): method sample_str_prompts (line 93) | def sample_str_prompts(self): method sample_batch_str_prompts (line 102) | def sample_batch_str_prompts(self, batch_size): function compute_attention_mask (line 109) | def compute_attention_mask(prompts, pad_token_id): function compute_position_id_with_mask (line 115) | def compute_position_id_with_mask(mask): function generate_ground_truth_response (line 119) | def generate_ground_truth_response(prompt: str): function compute_reward (line 139) | def compute_reward(prompt: str, response: str, sequence_reward=1.0): FILE: tests/special_e2e/envs/digit_completion/tokenizer.py class CharTokenizer (line 29) | class CharTokenizer(PreTrainedTokenizer): method __init__ (line 30) | def __init__(self, characters: Sequence[str], model_max_length: int, c... method vocab_size (line 83) | def vocab_size(self) -> int: method get_vocab (line 86) | def get_vocab(self): method _tokenize (line 89) | def _tokenize(self, text: str) -> list[str]: method _convert_token_to_id (line 92) | def _convert_token_to_id(self, token: str) -> int: method _convert_id_to_token (line 95) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 98) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 101) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 111) | def get_special_tokens_mask( method get_config (line 129) | def get_config(self) -> dict: method from_config (line 137) | def from_config(cls, config: dict): method save_pretrained (line 144) | def save_pretrained(self, save_directory: str | os.PathLike, **kwargs): method from_pretrained (line 151) | def from_pretrained(cls, save_directory: str | os.PathLike, **kwargs): FILE: tests/special_e2e/sft/compare_sft_engine_results.py function get_result (line 21) | def get_result(file): function compare_results (line 31) | def compare_results(golden_results, other_result): FILE: tests/special_sanity/check_api_docs.py function iter_submodules (line 57) | def iter_submodules(root: ModuleType) -> Iterable[ModuleType]: function names_missing_doc (line 72) | def names_missing_doc(mod: ModuleType) -> list[str]: function check_module (line 92) | def check_module(qualname: str) -> list[str]: function autodiscover_packages (line 106) | def autodiscover_packages() -> list[str]: function main (line 115) | def main() -> None: FILE: tests/special_sanity/check_docs_time_info.py function is_allowed (line 41) | def is_allowed(path: Path) -> bool: function main (line 52) | def main(): FILE: tests/special_sanity/check_docstrings.py class DocstringChecker (line 25) | class DocstringChecker(ast.NodeVisitor): method __init__ (line 28) | def __init__(self, filename: str): method visit_FunctionDef (line 34) | def visit_FunctionDef(self, node: ast.FunctionDef): method visit_AsyncFunctionDef (line 45) | def visit_AsyncFunctionDef(self, node: ast.AsyncFunctionDef): method visit_ClassDef (line 56) | def visit_ClassDef(self, node: ast.ClassDef): method _has_docstring (line 67) | def _has_docstring(self, node) -> bool: function check_file_docstrings (line 72) | def check_file_docstrings(filepath: str) -> list[tuple[str, str, int]]: function main (line 88) | def main(): FILE: tests/special_sanity/check_license.py function get_py_files (line 49) | def get_py_files(path_arg: Path) -> Iterable[Path]: FILE: tests/special_sanity/check_pr_description.py class TemplateFileError (line 24) | class TemplateFileError(Exception): class PRBodyLoadError (line 28) | class PRBodyLoadError(Exception): class PRDescriptionError (line 32) | class PRDescriptionError(Exception): function load_template (line 40) | def load_template(path): function load_pr_body (line 58) | def load_pr_body(event_path): function check_pr_description (line 67) | def check_pr_description(body, template_lines): function main (line 84) | def main(): FILE: tests/special_sanity/test_config_docs.py function validate_yaml_format (line 19) | def validate_yaml_format(yaml_lines): function test_trainer_config_doc (line 60) | def test_trainer_config_doc(): FILE: tests/special_sanity/test_import.py function test_import (line 16) | def test_import(): function test_single_controller_import (line 22) | def test_single_controller_import(): FILE: tests/special_sanity/type_coverage_check.py function get_changed_files (line 27) | def get_changed_files() -> list[Path]: function get_changed_lines (line 34) | def get_changed_lines(file_path: Path) -> set[int]: function should_check_type (line 61) | def should_check_type(arg_name: str) -> bool: function has_type_annotations (line 69) | def has_type_annotations(node: ast.AST, debug: bool = False) -> int: function check_file (line 87) | def check_file( function main (line 116) | def main() -> None: FILE: tests/special_sanity/validate_imported_docs.py function _parse_args (line 32) | def _parse_args() -> argparse.Namespace: function _import_attr (line 57) | def _import_attr(module_name: str, attr_name: str): function _check_file (line 63) | def _check_file(py_file: pathlib.Path, project_root: pathlib.Path, allow... function main (line 110) | def main() -> None: FILE: tests/special_sanity/validate_structure.py function discover_allowed_modules (line 39) | def discover_allowed_modules(impl_root: Path, extra: list[str]) -> set[s... function find_violations (line 46) | def find_violations(tests_root: Path, allowed: set[str], allowed_files: ... function main (line 66) | def main() -> None: FILE: tests/special_standalone/test_memory_buffers.py function test_memory_buffers (line 26) | def test_memory_buffers(): FILE: tests/test_base_config_on_cpu.py function base_config_mock (line 21) | def base_config_mock(): function test_getitem_success (line 28) | def test_getitem_success(base_config_mock): function test_getitem_nonexistent_attribute (line 33) | def test_getitem_nonexistent_attribute(base_config_mock): function test_getitem_invalid_key_type (line 39) | def test_getitem_invalid_key_type(base_config_mock): FILE: tests/test_protocol_on_cpu.py function test_union_tensor_dict (line 36) | def test_union_tensor_dict(): function test_union_numpy_dict (line 51) | def test_union_numpy_dict(): function test_tensor_dict_constructor (line 141) | def test_tensor_dict_constructor(): function test_tensor_dict_make_iterator (line 155) | def test_tensor_dict_make_iterator(): function test_reorder (line 184) | def test_reorder(): function test_chunk_concat (line 195) | def test_chunk_concat(): function test_concat_metrics_from_multiple_workers (line 219) | def test_concat_metrics_from_multiple_workers(): function test_concat_with_empty_and_non_list_meta_info (line 249) | def test_concat_with_empty_and_non_list_meta_info(): function test_concat_first_worker_missing_metrics (line 272) | def test_concat_first_worker_missing_metrics(): function test_concat_non_list_metrics (line 295) | def test_concat_non_list_metrics(): function test_concat_merge_different_non_metric_keys (line 315) | def test_concat_merge_different_non_metric_keys(): function test_concat_conflicting_non_metric_keys (line 339) | def test_concat_conflicting_non_metric_keys(): function test_pop (line 357) | def test_pop(): function test_repeat (line 370) | def test_repeat(): function test_dataproto_pad_unpad (line 395) | def test_dataproto_pad_unpad(): function test_dataproto_fold_unfold (line 447) | def test_dataproto_fold_unfold(): function test_torch_save_data_proto (line 470) | def test_torch_save_data_proto(): function test_len (line 486) | def test_len(): function test_dataproto_index (line 506) | def test_dataproto_index(): function test_old_vs_new_from_single_dict (line 570) | def test_old_vs_new_from_single_dict(): function test_dataproto_no_batch (line 607) | def test_dataproto_no_batch(): function test_sample_level_repeat (line 617) | def test_sample_level_repeat(): function test_dataproto_unfold_column_chunks (line 642) | def test_dataproto_unfold_column_chunks(): function test_dataproto_chunk_after_index (line 708) | def test_dataproto_chunk_after_index(): function test_to_tensordict (line 754) | def test_to_tensordict(): function test_from_tensordict (line 768) | def test_from_tensordict(): function test_to_tensordict_with_nested_lists (line 785) | def test_to_tensordict_with_nested_lists(): function test_to_tensordict_with_nested_dicts (line 810) | def test_to_tensordict_with_nested_dicts(): function test_to_tensordict_with_complex_nested_structures (line 834) | def test_to_tensordict_with_complex_nested_structures(): function test_to_tensordict_and_back_with_nested_data (line 862) | def test_to_tensordict_and_back_with_nested_data(): function test_to_tensordict_agent_loop_scenario (line 926) | def test_to_tensordict_agent_loop_scenario(): function test_serialize_deserialize_single_tensor (line 993) | def test_serialize_deserialize_single_tensor(): function test_serialize_deserialize_tensordict_regular_tensors (line 1010) | def test_serialize_deserialize_tensordict_regular_tensors(): function test_serialize_deserialize_tensordict_nested_tensors (line 1039) | def test_serialize_deserialize_tensordict_nested_tensors(): function test_serialize_deserialize_tensordict_mixed_types (line 1092) | def test_serialize_deserialize_tensordict_mixed_types(): function test_serialize_deserialize_tensordict_with_device (line 1177) | def test_serialize_deserialize_tensordict_with_device(): function test_serialize_dataproto_with_empty_tensordict (line 1208) | def test_serialize_dataproto_with_empty_tensordict(): FILE: tests/test_protocol_v2_on_cpu.py function test_union_tensor_dict (line 30) | def test_union_tensor_dict(): function test_tensor_dict_constructor (line 67) | def test_tensor_dict_constructor(): function test_index_select_tensor_dict (line 92) | def test_index_select_tensor_dict(): function test_tensordict_with_images (line 131) | def test_tensordict_with_images(): function test_tensordict_with_packing (line 159) | def test_tensordict_with_packing(): function test_tensordict_eq (line 185) | def test_tensordict_eq(): function test_tensor_dict_make_iterator (line 248) | def test_tensor_dict_make_iterator(): function test_reorder (line 300) | def test_reorder(): function test_chunk_concat (line 313) | def test_chunk_concat(): function test_pop (line 350) | def test_pop(): function test_get (line 382) | def test_get(): function test_repeat (line 412) | def test_repeat(): function test_dataproto_pad_unpad (line 437) | def test_dataproto_pad_unpad(): function test_torch_save_data_proto (line 488) | def test_torch_save_data_proto(): function test_len (line 506) | def test_len(): function test_dataproto_index (line 523) | def test_dataproto_index(): function test_select (line 583) | def test_select(): function test_dataproto_no_batch (line 596) | def test_dataproto_no_batch(): function test_sample_level_repeat (line 607) | def test_sample_level_repeat(): function test_dataproto_chunk_after_index (line 633) | def test_dataproto_chunk_after_index(): function test_concat_nested_tensor (line 676) | def test_concat_nested_tensor(): function test_concat_tensordict (line 731) | def test_concat_tensordict(): function test_chunk_tensordict (line 781) | def test_chunk_tensordict(): function test_assign_non_tensor_stack_with_nested_lists (line 840) | def test_assign_non_tensor_stack_with_nested_lists(): function test_assign_non_tensor_stack_with_nested_dicts (line 855) | def test_assign_non_tensor_stack_with_nested_dicts(): function test_assign_non_tensor_stack_with_complex_nested (line 870) | def test_assign_non_tensor_stack_with_complex_nested(): function test_assign_non_tensor_handles_wrappers (line 889) | def test_assign_non_tensor_handles_wrappers(): function test_assign_non_tensor_stack_batch_size_check (line 904) | def test_assign_non_tensor_stack_batch_size_check(): function test_assign_non_tensor_with_auto_detection (line 912) | def test_assign_non_tensor_with_auto_detection(): function test_get_tensordict_with_nested_lists (line 935) | def test_get_tensordict_with_nested_lists(): function test_get_tensordict_with_nested_dicts (line 950) | def test_get_tensordict_with_nested_dicts(): function test_get_tensordict_with_complex_nested_structures (line 962) | def test_get_tensordict_with_complex_nested_structures(): function test_get_tensordict_agent_loop_scenario (line 977) | def test_get_tensordict_agent_loop_scenario(): function test_contiguous (line 1040) | def test_contiguous(): FILE: tests/trainer/config/test_algo_config_on_cpu.py class TestAlgoConfig (line 30) | class TestAlgoConfig(unittest.TestCase): method setUp (line 33) | def setUp(self): method test_dataclass_creation_from_dict (line 56) | def test_dataclass_creation_from_dict(self): method test_dataclass_creation_from_omega_config (line 69) | def test_dataclass_creation_from_omega_config(self): method test_nested_configs (line 77) | def test_nested_configs(self): method test_default_values (line 92) | def test_default_values(self): method test_get_method_backward_compatibility (line 105) | def test_get_method_backward_compatibility(self): method test_post_init_nested_configs (line 117) | def test_post_init_nested_configs(self): method test_config_init_from_yaml (line 127) | def test_config_init_from_yaml(self): class TestAlgoCompute (line 140) | class TestAlgoCompute(unittest.TestCase): method setUp (line 143) | def setUp(self): method test_advantage_estimator_with_cfg (line 157) | def test_advantage_estimator_with_cfg(self): method test_grpo_advantage_estimator_with_cfg (line 182) | def test_grpo_advantage_estimator_with_cfg(self): FILE: tests/trainer/config/test_legacy_config_on_cpu.py class TestConfigComparison (line 35) | class TestConfigComparison(unittest.TestCase): method _compare_configs_recursively (line 55) | def _compare_configs_recursively( method test_ppo_trainer_config_matches_legacy (line 114) | def test_ppo_trainer_config_matches_legacy(self): method test_ppo_megatron_trainer_config_matches_legacy (line 138) | def test_ppo_megatron_trainer_config_matches_legacy(self): method test_load_component (line 160) | def test_load_component(self): FILE: tests/trainer/ppo/test_core_algos_on_cpu.py function mock_test_fn (line 34) | def mock_test_fn(): class TestRegisterAdvEst (line 38) | class TestRegisterAdvEst(unittest.TestCase): method setUp (line 39) | def setUp(self): method tearDown (line 48) | def tearDown(self) -> None: method test_register_new_function (line 52) | def test_register_new_function(self): method test_register_with_enum (line 62) | def test_register_with_enum(self): method test_duplicate_registration_same_function (line 76) | def test_duplicate_registration_same_function(self): method test_duplicate_registration_different_function (line 83) | def test_duplicate_registration_different_function(self): method test_decorator_preserves_function (line 96) | def test_decorator_preserves_function(self): method test_multiple_registrations (line 105) | def test_multiple_registrations(self): method test_get_adv_estimator_fn_valid_names (line 121) | def test_get_adv_estimator_fn_valid_names(self): method test_get_adv_estimator_fn_invalid_name (line 131) | def test_get_adv_estimator_fn_invalid_name(self): method test_get_adv_estimator_fn_case_sensitive (line 137) | def test_get_adv_estimator_fn_case_sensitive(self): function test_multi_turn_compute_gae_advantage_return (line 143) | def test_multi_turn_compute_gae_advantage_return(): function _make_group_index (line 200) | def _make_group_index(batch_size: int, num_groups: int) -> np.ndarray: function _rand_mask (line 214) | def _rand_mask(batch_size: int, seq_len: int) -> torch.Tensor: function test_rloo_and_vectorized_equivalence (line 230) | def test_rloo_and_vectorized_equivalence(batch_size: int, seq_len: int, ... function test_grpo_and_vectorized_equivalence (line 270) | def test_grpo_and_vectorized_equivalence(batch_size: int, seq_len: int, ... FILE: tests/trainer/ppo/test_metric_utils_on_cpu.py class TestReduceMetrics (line 41) | class TestReduceMetrics(unittest.TestCase): method test_reduce_metrics_basic (line 44) | def test_reduce_metrics_basic(self): method test_reduce_metrics_empty (line 55) | def test_reduce_metrics_empty(self): method test_reduce_metrics_single_value (line 64) | def test_reduce_metrics_single_value(self): class TestMetric (line 74) | class TestMetric(unittest.TestCase): method test_init_with_string_aggregation (line 77) | def test_init_with_string_aggregation(self): method test_init_with_enum_aggregation (line 83) | def test_init_with_enum_aggregation(self): method test_init_with_value (line 89) | def test_init_with_value(self): method test_init_with_invalid_aggregation (line 94) | def test_init_with_invalid_aggregation(self): method test_append_float (line 99) | def test_append_float(self): method test_append_int (line 106) | def test_append_int(self): method test_append_tensor (line 113) | def test_append_tensor(self): method test_append_non_scalar_tensor_raises (line 120) | def test_append_non_scalar_tensor_raises(self): method test_append_metric (line 126) | def test_append_metric(self): method test_extend_with_list (line 136) | def test_extend_with_list(self): method test_extend_with_metric (line 142) | def test_extend_with_metric(self): method test_extend_aggregation_mismatch_raises (line 153) | def test_extend_aggregation_mismatch_raises(self): method test_aggregate_mean (line 161) | def test_aggregate_mean(self): method test_aggregate_sum (line 167) | def test_aggregate_sum(self): method test_aggregate_min (line 173) | def test_aggregate_min(self): method test_aggregate_max (line 179) | def test_aggregate_max(self): method test_aggregate_dp_sum_mean (line 185) | def test_aggregate_dp_sum_mean(self): method test_aggregate_dp_min_max (line 215) | def test_aggregate_dp_min_max(self): method test_aggregate_dp_mismatched_lengths (line 245) | def test_aggregate_dp_mismatched_lengths(self): method test_from_dict (line 256) | def test_from_dict(self): method test_init_list (line 267) | def test_init_list(self): method test_reduce_metrics_with_metric (line 277) | def test_reduce_metrics_with_metric(self): class TestComputeDataMetrics (line 292) | class TestComputeDataMetrics(unittest.TestCase): method setUp (line 295) | def setUp(self): method test_compute_data_metrics_with_critic (line 320) | def test_compute_data_metrics_with_critic(self): method test_compute_data_metrics_without_critic (line 338) | def test_compute_data_metrics_without_critic(self): class TestComputeTimingMetrics (line 352) | class TestComputeTimingMetrics(unittest.TestCase): method setUp (line 355) | def setUp(self): method test_compute_timing_metrics (line 377) | def test_compute_timing_metrics(self, mock_compute_response_info): class TestComputeThroughputMetrics (line 403) | class TestComputeThroughputMetrics(unittest.TestCase): method setUp (line 406) | def setUp(self): method test_compute_throughout_metrics (line 414) | def test_compute_throughout_metrics(self): class TestBootstrapMetric (line 435) | class TestBootstrapMetric(unittest.TestCase): method test_bootstrap_metric_basic (line 438) | def test_bootstrap_metric_basic(self): method test_bootstrap_metric_empty (line 462) | def test_bootstrap_metric_empty(self): class TestCalcMajVal (line 468) | class TestCalcMajVal(unittest.TestCase): method test_calc_maj_val_basic (line 471) | def test_calc_maj_val_basic(self): method test_calc_maj_val_tie (line 484) | def test_calc_maj_val_tie(self): class TestProcessValidationMetrics (line 501) | class TestProcessValidationMetrics(unittest.TestCase): method test_process_validation_metrics_basic (line 504) | def test_process_validation_metrics_basic(self): method test_process_validation_metrics_with_pred (line 527) | def test_process_validation_metrics_with_pred(self): FILE: tests/trainer/ppo/test_rollout_corr.py function test_basic_rollout_correction (line 41) | def test_basic_rollout_correction(): function test_each_supported_rollout_rs_option (line 143) | def test_each_supported_rollout_rs_option(option: str, threshold): function test_rollout_rs_multiple_options (line 168) | def test_rollout_rs_multiple_options(): function test_metrics_completeness (line 194) | def test_metrics_completeness(): function test_offpolicy_metrics (line 254) | def test_offpolicy_metrics(): function test_mask_mode (line 311) | def test_mask_mode(): FILE: tests/trainer/ppo/test_rollout_corr_integration.py class TestRolloutISIntegration (line 28) | class TestRolloutISIntegration: method sample_data (line 32) | def sample_data(self): method config_with_rollout_is (line 46) | def config_with_rollout_is(self): method test_policy_loss_with_rollout_is (line 60) | def test_policy_loss_with_rollout_is(self, sample_data, config_with_ro... method test_rollout_is_weights_computation (line 96) | def test_rollout_is_weights_computation(self, sample_data): method test_all_aggregation_levels (line 120) | def test_all_aggregation_levels(self, sample_data): method test_both_bounding_modes (line 146) | def test_both_bounding_modes(self, sample_data): method test_offpolicy_metrics (line 172) | def test_offpolicy_metrics(self, sample_data): method test_metrics_only_mode (line 186) | def test_metrics_only_mode(self, sample_data, config_with_rollout_is): class TestRolloutCorrectionConfigNormalization (line 234) | class TestRolloutCorrectionConfigNormalization: method test_alias_normalization_and_threshold_parsing (line 237) | def test_alias_normalization_and_threshold_parsing(self): method test_missing_threshold_raises (line 250) | def test_missing_threshold_raises(self): method test_float_threshold_conversion_in_factory (line 255) | def test_float_threshold_conversion_in_factory(self): FILE: tests/utils/_test_module.py class TestClass (line 17) | class TestClass: method __init__ (line 20) | def __init__(self, value=None): method get_value (line 23) | def get_value(self): function test_function (line 30) | def test_function(): FILE: tests/utils/ckpt/test_checkpoint_cleanup_on_cpu.py class TestCheckpointCleanupLogic (line 22) | class TestCheckpointCleanupLogic: method setup (line 26) | def setup(self): method manager (line 33) | def manager(self, monkeypatch): method _create_checkpoint_dir (line 56) | def _create_checkpoint_dir(self, step: int) -> str: method test_max_ckpt_1_preserves_existing_before_save (line 64) | def test_max_ckpt_1_preserves_existing_before_save(self, manager): method test_max_ckpt_1_deletes_old_after_save (line 76) | def test_max_ckpt_1_deletes_old_after_save(self, manager): method test_max_ckpt_2_keeps_one_before_save (line 88) | def test_max_ckpt_2_keeps_one_before_save(self, manager): method test_max_ckpt_0_keeps_all (line 100) | def test_max_ckpt_0_keeps_all(self, manager): method test_full_save_cycle_max_ckpt_1 (line 115) | def test_full_save_cycle_max_ckpt_1(self, manager): FILE: tests/utils/ckpt/test_esi_save_ckpt_on_cpu.py class TestShouldSaveCkptEsi (line 22) | class TestShouldSaveCkptEsi(TestCase): method test_no_expiration_timestamp (line 23) | def test_no_expiration_timestamp(self): method test_mlp_expiration_valid (line 29) | def test_mlp_expiration_valid(self): method test_mlp_expiration_passed (line 35) | def test_mlp_expiration_passed(self): method test_mlp_invalid_timestamp (line 41) | def test_mlp_invalid_timestamp(self): method test_mlp_expiration_not_reached (line 46) | def test_mlp_expiration_not_reached(self): method test_aws_expiration_not_reached (line 52) | def test_aws_expiration_not_reached(self): method test_redundant_time (line 59) | def test_redundant_time(self): method test_zero_max_steps_duration (line 66) | def test_zero_max_steps_duration(self): FILE: tests/utils/dataset/test_create_rl_sampler_on_cpu.py class RandomCurriculumSampler (line 29) | class RandomCurriculumSampler(AbstractCurriculumSampler): method __init__ (line 30) | def __init__( method __iter__ (line 40) | def __iter__(self): method __len__ (line 43) | def __len__(self) -> int: method update (line 46) | def update(self, batch) -> None: class MockIncorrectSampler (line 50) | class MockIncorrectSampler: method __init__ (line 53) | def __init__(self, data_source, data_config): class MockChatDataset (line 57) | class MockChatDataset(Dataset): method __init__ (line 58) | def __init__(self): method __getitem__ (line 70) | def __getitem__(self, index): method __len__ (line 73) | def __len__(self): function test_create_custom_curriculum_samper (line 77) | def test_create_custom_curriculum_samper(): function test_create_custom_curriculum_samper_wrong_class (line 94) | def test_create_custom_curriculum_samper_wrong_class(): FILE: tests/utils/dataset/test_multiturn_sft_dataset_on_cpu.py function test_multiturn_sft_dataset (line 47) | def test_multiturn_sft_dataset(model_path: str, ignore_input_ids_mismatc... function generate_image (line 239) | def generate_image(description: str, size: str = "256x256"): function vlm_data_file (line 253) | def vlm_data_file(): function test_multiturn_sft_vlm_dataset_on_cpu (line 349) | def test_multiturn_sft_vlm_dataset_on_cpu(model_path, vlm_data_file): function test_multiturn_sft_vlm_dataloader_on_cpu (line 411) | def test_multiturn_sft_vlm_dataloader_on_cpu(model_path, vlm_data_file): FILE: tests/utils/dataset/test_rl_collate_fn_on_cpu.py function test_rl_collate_fn (line 17) | def test_rl_collate_fn(): FILE: tests/utils/dataset/test_rl_dataset_on_cpu.py function get_gsm8k_data (line 28) | def get_gsm8k_data(): function test_rl_dataset (line 36) | def test_rl_dataset(): function test_rl_dataset_with_max_samples (line 67) | def test_rl_dataset_with_max_samples(): function test_image_rl_data (line 83) | def test_image_rl_data(): function video_data_file (line 131) | def video_data_file(): function test_video_rl_data (line 166) | def test_video_rl_data(video_data_file): FILE: tests/utils/debug/test_metrics.py class TestMetrics (line 22) | class TestMetrics(unittest.TestCase): method test_calculate_debug_metrics (line 23) | def test_calculate_debug_metrics(self): FILE: tests/utils/megatron/test_pipeline_parallel.py function test_make_batch_generator_no_vpp (line 21) | def test_make_batch_generator_no_vpp(): function test_make_batch_generator_with_vpp (line 28) | def test_make_batch_generator_with_vpp(): function test_make_batch_generator_empty (line 40) | def test_make_batch_generator_empty(): function test_get_dynamic_pipeline_shards (line 63) | def test_get_dynamic_pipeline_shards(layer_num, pp_size, gt): FILE: tests/utils/reward_score/reward_score/test_sandbox_fusion_on_cpu.py function test_integration_success_correct (line 78) | def test_integration_success_correct(): function test_integration_success_wrong_output (line 89) | def test_integration_success_wrong_output(): function test_integration_compile_error (line 99) | def test_integration_compile_error(): function test_integration_runtime_error (line 108) | def test_integration_runtime_error(): function test_integration_runtime_timeout (line 117) | def test_integration_runtime_timeout(): function test_integration_concurrency_high_load (line 127) | def test_integration_concurrency_high_load(): function test_unit_concurrency_order (line 254) | def test_unit_concurrency_order(mock_call_sandbox_api): function test_unit_api_timeout_error_concurrent (line 298) | def test_unit_api_timeout_error_concurrent(mock_call_sandbox_api): function _mock_api_call_for_concurrency_tracking (line 351) | def _mock_api_call_for_concurrency_tracking( function _process_pool_worker_for_concurrency_test (line 391) | def _process_pool_worker_for_concurrency_test( function test_multiprocess_global_concurrency_limit_with_semaphore (line 458) | def test_multiprocess_global_concurrency_limit_with_semaphore(): function test_unit_invalid_input_format (line 556) | def test_unit_invalid_input_format(): function test_unit_input_output_mismatch (line 572) | def test_unit_input_output_mismatch(): function test_integration_concurrency_all_timeout (line 581) | def test_integration_concurrency_all_timeout(): function test_fn_name_success_single_case (line 633) | def test_fn_name_success_single_case(): function test_none_and_empty_stdin_passed_correctly (line 672) | def test_none_and_empty_stdin_passed_correctly(): function test_assert_case_success (line 696) | def test_assert_case_success(): FILE: tests/utils/reward_score/test_sandbox_on_cpu.py function test_parallelism (line 95) | def test_parallelism(): function test_prime_code (line 118) | def test_prime_code(): function test_prime_code_sandbox_fusion (line 130) | def test_prime_code_sandbox_fusion(): function test_continuous_score_consistency (line 147) | def test_continuous_score_consistency(): function test_check_correctness (line 176) | def test_check_correctness(): function test_prime_math (line 186) | def test_prime_math(): FILE: tests/utils/test_activation_offload.py function create_random_input_ids (line 33) | def create_random_input_ids(batch_size, seq_len, vocab_size): function _fsdp_activation_offloading_test (line 52) | def _fsdp_activation_offloading_test(rank, world_size, rendezvous_file, ... function test_activation_offloading (line 166) | def test_activation_offloading(world_size, strategy, tmp_path): FILE: tests/utils/test_bucketed_weight_transfer.py function _unique_zmq_handle (line 37) | def _unique_zmq_handle(): function _generate_weights (line 41) | def _generate_weights(weight_specs, seed): function _sender_fn (line 64) | def _sender_fn(zmq_handle, weight_specs, seed, bucket_size_mb, use_shm): function _receiver_fn (line 77) | def _receiver_fn(zmq_handle, use_shm, result_queue): function _transfer_and_validate (line 98) | def _transfer_and_validate(weight_specs, bucket_size_mb, use_shm): class TestBucketedWeightTransferSHM (line 149) | class TestBucketedWeightTransferSHM: method test_single_small_weight (line 152) | def test_single_small_weight(self): method test_multiple_weights_single_bucket (line 156) | def test_multiple_weights_single_bucket(self): method test_multiple_buckets (line 164) | def test_multiple_buckets(self): method test_mixed_dtypes (line 169) | def test_mixed_dtypes(self): method test_empty_weights (line 177) | def test_empty_weights(self): class TestBucketedWeightTransferIPC (line 185) | class TestBucketedWeightTransferIPC: method test_single_small_weight (line 188) | def test_single_small_weight(self): method test_multiple_weights_single_bucket (line 192) | def test_multiple_weights_single_bucket(self): method test_multiple_buckets (line 200) | def test_multiple_buckets(self): method test_mixed_dtypes (line 204) | def test_mixed_dtypes(self): method test_empty_weights (line 212) | def test_empty_weights(self): method test_exact_bucket_boundary (line 215) | def test_exact_bucket_boundary(self): FILE: tests/utils/test_check_ipc_version_support_on_npu.py class TestCheckIPCVersionSupport (line 22) | class TestCheckIPCVersionSupport(unittest.TestCase): method setUp (line 25) | def setUp(self): method tearDown (line 30) | def tearDown(self): method test_standard_version_with_support (line 34) | def test_standard_version_with_support(self): method test_standard_version_newer (line 40) | def test_standard_version_newer(self): method test_rc_version_format (line 46) | def test_rc_version_format(self): method test_exact_rc_version (line 53) | def test_exact_rc_version(self): method test_t_suffix_version (line 60) | def test_t_suffix_version(self): method test_t_suffix_version_older (line 67) | def test_t_suffix_version_older(self): method test_software_version_below_minimum (line 74) | def test_software_version_below_minimum(self): method test_cann_version_below_minimum (line 80) | def test_cann_version_below_minimum(self): method test_both_versions_below_minimum (line 87) | def test_both_versions_below_minimum(self): method test_invalid_software_version (line 94) | def test_invalid_software_version(self): method test_invalid_cann_version (line 100) | def test_invalid_cann_version(self): method test_rc_with_more_parts (line 106) | def test_rc_with_more_parts(self): method test_standard_with_more_parts (line 112) | def test_standard_with_more_parts(self): method test_rc_edge_case_versions (line 118) | def test_rc_edge_case_versions(self): method test_major_version_differences (line 128) | def test_major_version_differences(self): class TestGetNPUVersions (line 139) | class TestGetNPUVersions(unittest.TestCase): method test_get_npu_versions_success (line 146) | def test_get_npu_versions_success(self, mock_file, mock_exists, mock_m... method test_get_npu_versions_missing_software_version (line 163) | def test_get_npu_versions_missing_software_version(self, mock_run): method test_get_npu_versions_unsupported_architecture (line 176) | def test_get_npu_versions_unsupported_architecture(self, mock_file, mo... method test_get_npu_versions_cann_path_not_exists (line 192) | def test_get_npu_versions_cann_path_not_exists(self, mock_file, mock_e... method test_get_npu_versions_info_file_not_exists (line 208) | def test_get_npu_versions_info_file_not_exists(self, mock_file, mock_e... method test_get_npu_versions_missing_cann_version (line 226) | def test_get_npu_versions_missing_cann_version(self, mock_file, mock_e... FILE: tests/utils/test_check_profiler_output.py class DeviceCheckConfig (line 29) | class DeviceCheckConfig: class ProfilerChecker (line 40) | class ProfilerChecker: method __init__ (line 45) | def __init__(self, device_type: str, profiler_dir: str): method _init_device_config (line 56) | def _init_device_config(self): method _validate_stage_dirs (line 80) | def _validate_stage_dirs(self, stage: str) -> bool: method check (line 104) | def check(self) -> bool: function parse_args (line 122) | def parse_args(): function main (line 141) | def main(): FILE: tests/utils/test_config_on_cpu.py class TestDataclass (line 25) | class TestDataclass(BaseConfig): class TestTrainConfig (line 31) | class TestTrainConfig(BaseConfig): class TestConfigOnCPU (line 46) | class TestConfigOnCPU(unittest.TestCase): method setUp (line 55) | def setUp(self): method test_omega_conf_to_dataclass (line 58) | def test_omega_conf_to_dataclass(self): method test_nested_omega_conf_to_dataclass (line 65) | def test_nested_omega_conf_to_dataclass(self): class TestPrintCfgCommand (line 74) | class TestPrintCfgCommand(unittest.TestCase): method test_command_with_override (line 77) | def test_command_with_override(self): FILE: tests/utils/test_flops_counter.py class Config (line 24) | class Config: method __init__ (line 25) | def __init__(self, config_dict): function test_flops_counter (line 454) | def test_flops_counter(config_type: str): FILE: tests/utils/test_fs_on_cpu.py function test_record_and_check_directory_structure (line 21) | def test_record_and_check_directory_structure(tmp_path): function test_copy_from_hdfs_with_mocks (line 43) | def test_copy_from_hdfs_with_mocks(tmp_path, monkeypatch): function test_always_recopy_flag (line 66) | def test_always_recopy_flag(tmp_path, monkeypatch): FILE: tests/utils/test_fsdp2_peft_wrapping.py class MockDecoderLayer (line 30) | class MockDecoderLayer(nn.Module): method __init__ (line 33) | def __init__(self, hidden_size=64): class MockModulesToSaveWrapper (line 39) | class MockModulesToSaveWrapper(nn.Module): method __init__ (line 46) | def __init__(self, original_module): class MockCausalLM (line 52) | class MockCausalLM(nn.Module): method __init__ (line 57) | def __init__(self, vocab_size=1000, hidden_size=64, num_layers=2, tie_... class TestFSDP2PeftWrapping (line 69) | class TestFSDP2PeftWrapping(unittest.TestCase): method _get_wrapped_names (line 72) | def _get_wrapped_names(self, model, cls_names): method test_vanilla_model_wraps_layers_and_embedding (line 79) | def test_vanilla_model_wraps_layers_and_embedding(self): method test_peft_wrapped_model_wraps_embed_tokens_by_name (line 89) | def test_peft_wrapped_model_wraps_embed_tokens_by_name(self): method test_tied_embeddings_skips_name_based_wrapping (line 101) | def test_tied_embeddings_skips_name_based_wrapping(self): method test_peft_wrapped_tied_embeddings_skips_wrapping (line 110) | def test_peft_wrapped_tied_embeddings_skips_wrapping(self): method test_no_duplicate_wrapping_for_vanilla_embedding (line 121) | def test_no_duplicate_wrapping_for_vanilla_embedding(self): FILE: tests/utils/test_fsdp_lora_merge.py function _test_merged_lora_context_worker (line 36) | def _test_merged_lora_context_worker( function test_merged_lora_context_qwen2 (line 161) | def test_merged_lora_context_qwen2(world_size, strategy, backup_adapters... function test_merged_lora_context_gptoss (line 190) | def test_merged_lora_context_gptoss(world_size, strategy, backup_adapter... FILE: tests/utils/test_groupwise.py function test_as_torch_index_basic_integers (line 27) | def test_as_torch_index_basic_integers(): function test_as_torch_index_near_integer_floats (line 36) | def test_as_torch_index_near_integer_floats(): function test_as_torch_index_factorization_mixed (line 43) | def test_as_torch_index_factorization_mixed(): function test_group_mean_std_simple (line 51) | def test_group_mean_std_simple(): function test_group_mean_std_empty (line 68) | def test_group_mean_std_empty(): function test_group_mean_std_default_device_no_force_env (line 75) | def test_group_mean_std_default_device_no_force_env(monkeypatch): FILE: tests/utils/test_import_utils_on_cpu.py function test_load_extern_object_class (line 25) | def test_load_extern_object_class(): function test_load_extern_object_function (line 42) | def test_load_extern_object_function(): function test_load_extern_object_constant (line 55) | def test_load_extern_object_constant(): function test_load_extern_object_nonexistent_file (line 64) | def test_load_extern_object_nonexistent_file(): function test_load_extern_object_nonexistent_type (line 70) | def test_load_extern_object_nonexistent_type(): function test_load_extern_object_none_path (line 76) | def test_load_extern_object_none_path(): function test_load_extern_object_invalid_module (line 82) | def test_load_extern_object_invalid_module(): FILE: tests/utils/test_linear_cross_entropy.py function run_torch_entropy (line 49) | def run_torch_entropy( function run_verl_original_entropy (line 65) | def run_verl_original_entropy( function run_verl_torch_fused_entropy (line 83) | def run_verl_torch_fused_entropy( class TestLinearCrossEntropy (line 100) | class TestLinearCrossEntropy: method __init__ (line 101) | def __init__(self, test_case_idx: int, temperature: float = 1.5) -> None: method cleanup (line 105) | def cleanup(self): method generate_hyper (line 113) | def generate_hyper(self): method generate_forward_inputs (line 146) | def generate_forward_inputs(self): method generate_backward_inputs (line 160) | def generate_backward_inputs(self): method verify_correctness (line 165) | def verify_correctness(self, iterations=5): method check_storage (line 323) | def check_storage(self, method_name, run_forward): method check_storage_all (line 345) | def check_storage_all(self): function test_lce_non_divisible_vocab_padding (line 352) | def test_lce_non_divisible_vocab_padding(): FILE: tests/utils/test_mlflow_key_sanitization.py class TestMlflowLoggingAdapter (line 21) | class TestMlflowLoggingAdapter(unittest.TestCase): method test_sanitize_key_and_warning (line 22) | def test_sanitize_key_and_warning(self): FILE: tests/utils/test_model_on_cpu.py function test_update_model_config (line 30) | def test_update_model_config(override_kwargs): FILE: tests/utils/test_normalize_peft_param_name.py function _test_normalize_peft_with_fsdp_worker (line 37) | def _test_normalize_peft_with_fsdp_worker(rank, world_size, rendezvous_f... function test_normalize_peft_param_name_with_fsdp (line 200) | def test_normalize_peft_param_name_with_fsdp(world_size, strategy, tmp_p... FILE: tests/utils/test_normalize_peft_param_name_on_cpu.py function create_base_model (line 23) | def create_base_model(): function create_peft_model (line 36) | def create_peft_model(): function base_model (line 46) | def base_model(): function peft_model (line 52) | def peft_model(): function test_normalize_peft_param_name_keys_match_base_model (line 57) | def test_normalize_peft_param_name_keys_match_base_model(): function test_normalize_peft_param_name_removes_lora_keys (line 86) | def test_normalize_peft_param_name_removes_lora_keys(peft_model): function test_normalize_peft_param_name_removes_base_model_prefix (line 102) | def test_normalize_peft_param_name_removes_base_model_prefix(peft_model): function test_normalize_peft_param_name_removes_base_layer_suffix (line 118) | def test_normalize_peft_param_name_removes_base_layer_suffix(peft_model): function test_normalize_peft_param_name_tensor_shapes_match (line 134) | def test_normalize_peft_param_name_tensor_shapes_match(base_model, peft_... function test_normalize_peft_param_name_empty_dict (line 150) | def test_normalize_peft_param_name_empty_dict(): function test_normalize_peft_param_name_filters_lora_patterns (line 165) | def test_normalize_peft_param_name_filters_lora_patterns(lora_key_pattern): FILE: tests/utils/test_nvtx_profile.py class TestProfilerConfig (line 24) | class TestProfilerConfig(unittest.TestCase): method test_config_init (line 25) | def test_config_init(self): method test_frozen_config (line 51) | def test_frozen_config(self): class TestNsightSystemsProfiler (line 73) | class TestNsightSystemsProfiler(unittest.TestCase): method setUp (line 84) | def setUp(self): method test_initialization (line 89) | def test_initialization(self): method test_start_stop_profiling (line 93) | def test_start_stop_profiling(self): method test_annotate_decorator (line 118) | def test_annotate_decorator(self): FILE: tests/utils/test_padding_on_cpu.py function test_padding_conversion_with_log_probs (line 21) | def test_padding_conversion_with_log_probs(): function test_padding_conversion_without_log_probs (line 99) | def test_padding_conversion_without_log_probs(): function test_padding_roundtrip (line 130) | def test_padding_roundtrip(): function test_no_padding_2_padding_varying_lengths (line 178) | def test_no_padding_2_padding_varying_lengths(): FILE: tests/utils/test_prepare_micro_batches_with_group_size.py function _make_batch (line 34) | def _make_batch(seq_lens: list[int], force_group_size: int, max_token_le... function _verify_group_integrity (line 70) | def _verify_group_integrity(batch_idx_list: list[list[int]], force_group... function test_force_group_size_2_basic (line 99) | def test_force_group_size_2_basic(): function test_force_group_size_4_basic (line 116) | def test_force_group_size_4_basic(): function test_force_group_size_reconstruction (line 150) | def test_force_group_size_reconstruction(): function test_force_group_size_single_micro_batch (line 174) | def test_force_group_size_single_micro_batch(): function test_force_group_size_large_group (line 191) | def test_force_group_size_large_group(): function test_force_group_size_1_unchanged (line 227) | def test_force_group_size_1_unchanged(): FILE: tests/utils/test_rollout_skip_on_cpu.py function temp_dir (line 28) | def temp_dir(): function build_generate_fn (line 36) | def build_generate_fn(gen_bs, n): function mock_rollout_wg (line 56) | def mock_rollout_wg(request): class TestRolloutSkip (line 74) | class TestRolloutSkip: method test_initialization (line 75) | def test_initialization(self, capsys): method test_generate_without_wrap (line 95) | def test_generate_without_wrap(self, mock_rollout_wg): method test_dump (line 110) | def test_dump(self, mock_rollout_wg, capsys): method test_generate_with_wrap (line 125) | def test_generate_with_wrap(self, mock_rollout_wg, capsys): FILE: tests/utils/test_rollout_trace_on_cpu.py function reset_rollout_trace_config_singleton (line 25) | def reset_rollout_trace_config_singleton(): function mock_weave_client (line 31) | def mock_weave_client(): class TracedClass (line 46) | class TracedClass: method my_method (line 50) | async def my_method(self, a, b="default"): method middle_method (line 56) | async def middle_method(self, a, b="default"): method my_method_with_exception (line 62) | async def my_method_with_exception(self): method upper_method (line 65) | async def upper_method(self): class UntracedClass (line 71) | class UntracedClass: method my_method (line 73) | async def my_method(self, x): function test_rollout_trace_on_untraced_class (line 77) | async def test_rollout_trace_on_untraced_class(): function test_rollout_trace_with_tracer (line 83) | async def test_rollout_trace_with_tracer(mock_weave_client): function test_rollout_trace_with_exception (line 102) | async def test_rollout_trace_with_exception(mock_weave_client): function test_rollout_trace_with_dummy_backend (line 121) | async def test_rollout_trace_with_dummy_backend(mock_weave_client): function test_trace_disabled_with_trace_false (line 131) | async def test_trace_disabled_with_trace_false(mock_weave_client): function test_trace_false_disables_nested_trace_ops (line 157) | async def test_trace_false_disables_nested_trace_ops(mock_weave_client): function test_trace_enabled_restored_after_exception (line 182) | async def test_trace_enabled_restored_after_exception(mock_weave_client): function test_rollout_trace_with_real_weave_backend (line 211) | async def test_rollout_trace_with_real_weave_backend(): function test_rollout_trace_with_real_mlflow_backend (line 232) | async def test_rollout_trace_with_real_mlflow_backend(): FILE: tests/utils/test_seqlen_balancing.py function test_seqlen_balancing (line 31) | def test_seqlen_balancing(): function test_dynamic_batch (line 50) | def test_dynamic_batch(): function _worker (line 64) | def _worker(rank, world_size, init_method, max_token_len, use_same_dp, m... function test_dataproto_split_uneven (line 128) | def test_dataproto_split_uneven(): function test_seqlen_balancing_distributed_params (line 182) | def test_seqlen_balancing_distributed_params(tmp_path): function test_group_balanced_partitions (line 205) | def test_group_balanced_partitions(): function test_group_balanced_partitions_single_sample_groups (line 237) | def test_group_balanced_partitions_single_sample_groups(): function test_group_balanced_partitions_equal_size (line 254) | def test_group_balanced_partitions_equal_size(): FILE: tests/utils/test_server_profiler.py class TestServerProfilerArgs (line 28) | class TestServerProfilerArgs(unittest.TestCase): method test_build_vllm_profiler_args (line 29) | def test_build_vllm_profiler_args(self): method test_build_sglang_profiler_args (line 52) | def test_build_sglang_profiler_args(self): class TestServerProfilerFunctionality (line 63) | class TestServerProfilerFunctionality(unittest.IsolatedAsyncioTestCase): method test_vllm_start_stop_profile (line 64) | async def test_vllm_start_stop_profile(self): method test_sglang_start_stop_profile (line 93) | async def test_sglang_start_stop_profile(self): FILE: tests/utils/test_shared_memory.py class TestSharedMemory (line 24) | class TestSharedMemory(unittest.TestCase): method setUp (line 27) | def setUp(self): method tearDown (line 35) | def tearDown(self): method test_create_shared_memory_new (line 41) | def test_create_shared_memory_new(self): method test_create_shared_memory_attach_existing (line 56) | def test_create_shared_memory_attach_existing(self): method test_rebuild_shared_memory_default_dtype (line 78) | def test_rebuild_shared_memory_default_dtype(self): method test_rebuild_shared_memory_custom_dtype (line 101) | def test_rebuild_shared_memory_custom_dtype(self): method test_shared_memory_data_integrity (line 124) | def test_shared_memory_data_integrity(self): method test_shared_memory_different_dtypes (line 145) | def test_shared_memory_different_dtypes(self): method test_shared_memory_multiple_operations (line 176) | def test_shared_memory_multiple_operations(self): function child_process_function (line 200) | def child_process_function(name, size, test_data_bytes): class TestSharedMemoryIntegration (line 230) | class TestSharedMemoryIntegration(unittest.TestCase): method test_cross_process_shared_memory (line 233) | def test_cross_process_shared_memory(self): FILE: tests/utils/test_special_linear_cross_entropy_tp.py function run_torch_entropy (line 57) | def run_torch_entropy( class TorchEntropyTP (line 79) | class TorchEntropyTP(torch.autograd.Function): method forward (line 86) | def forward( method backward (line 128) | def backward(ctx, g_logprobs: torch.Tensor, g_entropy: torch.Tensor): class TestLinearCrossEntropy_TensorParallel (line 181) | class TestLinearCrossEntropy_TensorParallel: method __init__ (line 182) | def __init__(self): method initialize (line 192) | def initialize(self, test_case_idx: int, temperature: float = 1.5): method shutdown (line 196) | def shutdown(self): method cleanup (line 199) | def cleanup(self): method generate_hyper (line 207) | def generate_hyper(self): method generate_forward_inputs (line 242) | def generate_forward_inputs(self): method generate_backward_inputs (line 256) | def generate_backward_inputs(self): method verify_torch_itself (line 261) | def verify_torch_itself(self, iterations: int = 5): method check_torch_storage (line 331) | def check_torch_storage(self): method verify_kernel_correctness (line 364) | def verify_kernel_correctness(self, iterations: int = 5): method check_kernel_storage (line 455) | def check_kernel_storage(self): FILE: tests/utils/test_special_mstx_profile.py class TestNPUProfilerInitialization (line 23) | class TestNPUProfilerInitialization(unittest.TestCase): method setUp (line 24) | def setUp(self): method test_init_with_default_config (line 27) | def test_init_with_default_config(self): method test_init_with_disabled_config (line 33) | def test_init_with_disabled_config(self): method test_init_with_all_ranks_true (line 39) | def test_init_with_all_ranks_true(self): method test_init_with_ranks_list (line 45) | def test_init_with_ranks_list(self): method test_init_with_rank_not_in_ranks (line 51) | def test_init_with_rank_not_in_ranks(self): class TestNPUProfilerStart (line 58) | class TestNPUProfilerStart(unittest.TestCase): method setUp (line 59) | def setUp(self): method test_start_when_enabled_and_this_rank (line 65) | def test_start_when_enabled_and_this_rank(self, mock_get_profiler): method test_start_when_not_this_rank (line 73) | def test_start_when_not_this_rank(self, mock_get_profiler): method test_start_discrete_mode_does_not_increase_count (line 81) | def test_start_discrete_mode_does_not_increase_count(self, mock_get_pr... method test_multiple_start_calls_do_not_increase_count (line 89) | def test_multiple_start_calls_do_not_increase_count(self, mock_get_pro... class TestNPUProfilerStartStopInteraction (line 97) | class TestNPUProfilerStartStopInteraction(unittest.TestCase): method setUp (line 98) | def setUp(self): method test_start_stop_cycle (line 104) | def test_start_stop_cycle(self, mock_get_profiler): method test_multiple_instances_share_define_count (line 118) | def test_multiple_instances_share_define_count(self, mock_get_profiler): class TestNPUProfilerAnnotate (line 132) | class TestNPUProfilerAnnotate(unittest.TestCase): method setUp (line 133) | def setUp(self): method test_annotate_decorator_applied_correctly (line 138) | def test_annotate_decorator_applied_correctly(self): method test_annotate_when_profiler_disabled (line 166) | def test_annotate_when_profiler_disabled(self): method test_annotate_when_this_step_disabled (line 189) | def test_annotate_when_this_step_disabled(self): method test_annotate_discrete_mode_enabled (line 212) | def test_annotate_discrete_mode_enabled(self): method test_annotate_with_default_message (line 250) | def test_annotate_with_default_message(self): FILE: tests/utils/test_temp_env_on_cpu.py function clean_env (line 23) | def clean_env(): function test_set_new_env_var (line 42) | def test_set_new_env_var(): function test_restore_existing_env_var (line 56) | def test_restore_existing_env_var(): function test_env_var_restored_on_exception (line 69) | def test_env_var_restored_on_exception(): function test_nested_context_managers (line 85) | def test_nested_context_managers(): function test_multiple_different_vars (line 103) | def test_multiple_different_vars(): function test_empty_string_value (line 118) | def test_empty_string_value(): function test_overwrite_with_empty_string (line 128) | def test_overwrite_with_empty_string(): function test_context_manager_returns_none (line 139) | def test_context_manager_returns_none(): FILE: tests/utils/test_timeout_decorator_cpu.py function quick_task (line 30) | def quick_task(x): function slow_task (line 37) | def slow_task(x): function task_raises_value_error (line 44) | def task_raises_value_error(): # Now truly not globally decorated function top_level_decorated_quick_task_signal (line 52) | def top_level_decorated_quick_task_signal(): function top_level_decorated_slow_task_signal (line 62) | def top_level_decorated_slow_task_signal(): function run_target_and_put_in_queue (line 69) | def run_target_and_put_in_queue(target_func, q): function set_macos_start_method (line 83) | def set_macos_start_method(): function test_quick_task (line 97) | def test_quick_task(): # Renamed from test_multiprocessing_quick_task function test_slow_task_timeout (line 104) | def test_slow_task_timeout(): # Renamed from test_multiprocessing_slow_... function test_internal_exception (line 113) | def test_internal_exception(): # Renamed from test_multiprocessing_inte... function test_signal_quick_task_main_process (line 127) | def test_signal_quick_task_main_process(): # Removed self function test_signal_slow_task_main_process_timeout (line 139) | def test_signal_slow_task_main_process_timeout(): # Removed self function test_signal_in_thread_does_not_timeout (line 155) | def test_signal_in_thread_does_not_timeout(): function test_in_thread_timeout (line 200) | def test_in_thread_timeout(): FILE: tests/utils/test_tokenizer_normalize_on_cpu.py class DummyBatchEncoding (line 21) | class DummyBatchEncoding: method __init__ (line 22) | def __init__(self, input_ids): class DummyToList (line 26) | class DummyToList: method __init__ (line 27) | def __init__(self, data): method tolist (line 30) | def tolist(self): function test_normalize_token_ids_valid_outputs (line 53) | def test_normalize_token_ids_valid_outputs(tokenized_output, expected): function test_normalize_token_ids_invalid_outputs (line 66) | def test_normalize_token_ids_invalid_outputs(tokenized_output): FILE: tests/utils/test_torch_functional.py function _worker_mean (line 31) | def _worker_mean(rank: int, world_size: int, rendezvous_file: str): function test_masked_mean (line 68) | def test_masked_mean(value, mask, gt): function test_distributed_mean_max_min_std (line 75) | def test_distributed_mean_max_min_std(world_size, tmp_path): function _worker_mask (line 87) | def _worker_mask(rank: int, world_size: int, rendezvous_file: str): function test_distributed_masked_mean (line 113) | def test_distributed_masked_mean(world_size, tmp_path): function test_expand_as_nested (line 125) | def test_expand_as_nested(): FILE: tests/utils/test_torch_profile.py class TestTorchProfile (line 24) | class TestTorchProfile(unittest.TestCase): method setUp (line 25) | def setUp(self): method test_get_torch_profiler (line 30) | def test_get_torch_profiler(self, mock_profile): method test_profiler_lifecycle (line 47) | def test_profiler_lifecycle(self, mock_get_profiler): method test_discrete_mode (line 71) | def test_discrete_mode(self, mock_get_profiler): FILE: tests/workers/actor/test_special_dp_actor.py class MockTransformerModel (line 28) | class MockTransformerModel(nn.Module): method __init__ (line 31) | def __init__(self, vocab_size=1000, hidden_size=64): method forward (line 41) | def forward(self, input_ids, attention_mask=None, position_ids=None, u... class TestDataParallelPPOActor (line 55) | class TestDataParallelPPOActor(unittest.TestCase): method setUpClass (line 59) | def setUpClass(cls): method setUp (line 83) | def setUp(self): method tearDownClass (line 108) | def tearDownClass(cls): method _create_test_data_for_compute_log_prob (line 113) | def _create_test_data_for_compute_log_prob(self): method _create_test_data_for_update_policy (line 140) | def _create_test_data_for_update_policy(self): method test_compute_log_prob (line 173) | def test_compute_log_prob(self): method test_compute_log_prob_without_entropy (line 193) | def test_compute_log_prob_without_entropy(self): method test_update_policy (line 209) | def test_update_policy(self): method test_dataparallelppoactor_initialization (line 233) | def test_dataparallelppoactor_initialization(self): method test_dataparallelppoactor_with_qwen3_model (line 243) | def test_dataparallelppoactor_with_qwen3_model(self): FILE: tests/workers/config/test_actor_config_on_cpu.py class TestActorConfig (line 27) | class TestActorConfig(unittest.TestCase): method test_config_inheritance (line 30) | def test_config_inheritance(self): method test_actor_config_from_yaml (line 66) | def test_actor_config_from_yaml(self): method test_fsdp_actor_config_from_yaml (line 78) | def test_fsdp_actor_config_from_yaml(self): method test_megatron_actor_config_from_yaml (line 90) | def test_megatron_actor_config_from_yaml(self): method test_config_get_method (line 102) | def test_config_get_method(self): method test_config_dict_like_access (line 123) | def test_config_dict_like_access(self): method test_frozen_fields_modification_raises_exception (line 147) | def test_frozen_fields_modification_raises_exception(self): method test_actor_config_validation_exceptions (line 171) | def test_actor_config_validation_exceptions(self): method test_fsdp_actor_config_validation_exceptions (line 217) | def test_fsdp_actor_config_validation_exceptions(self): method test_actor_config_validate_method_exceptions (line 233) | def test_actor_config_validate_method_exceptions(self): FILE: tests/workers/config/test_critic_config_on_cpu.py class TestCriticConfig (line 34) | class TestCriticConfig: method config_dir (line 38) | def config_dir(self): method test_megatron_critic_config_instantiation_from_yaml (line 42) | def test_megatron_critic_config_instantiation_from_yaml(self, config_d... method test_fsdp_critic_config_instantiation_from_yaml (line 74) | def test_fsdp_critic_config_instantiation_from_yaml(self, config_dir): method test_config_inheritance_hierarchy (line 107) | def test_config_inheritance_hierarchy(self): method test_config_dict_interface (line 122) | def test_config_dict_interface(self): method test_frozen_fields_immutability (line 139) | def test_frozen_fields_immutability(self): method test_batch_size_fields_modifiable (line 162) | def test_batch_size_fields_modifiable(self): method test_profiler_config_type_validation (line 183) | def test_profiler_config_type_validation(self): method test_critic_config_validation_logic (line 211) | def test_critic_config_validation_logic(self): method test_micro_batch_size_divisibility_validation (line 254) | def test_micro_batch_size_divisibility_validation(self): method test_fsdp_sequence_parallelism_validation (line 279) | def test_fsdp_sequence_parallelism_validation(self): FILE: tests/workers/config/test_engine_config_on_cpu.py class TestMcoreEngineConfig (line 20) | class TestMcoreEngineConfig: method test_default_values (line 21) | def test_default_values(self): method test_post_init_validation (line 27) | def test_post_init_validation(self): method test_mutable_fields (line 36) | def test_mutable_fields(self): method test_offload_flags (line 43) | def test_offload_flags(self, offload_field): class TestFSDPEngineConfigCPU (line 48) | class TestFSDPEngineConfigCPU: method test_default_values (line 49) | def test_default_values(self): method test_offload_combinations (line 59) | def test_offload_combinations(self, offload_params): method test_wrap_policy_configuration (line 64) | def test_wrap_policy_configuration(self): FILE: tests/workers/config/test_model_config_on_cpu.py class TestHFModelConfigCPU (line 23) | class TestHFModelConfigCPU: method test_target_modules_accepts_list_via_omegaconf (line 26) | def test_target_modules_accepts_list_via_omegaconf(self): method test_target_modules_accepts_none_via_omegaconf (line 55) | def test_target_modules_accepts_none_via_omegaconf(self): method test_target_modules_accepts_string_via_omegaconf (line 70) | def test_target_modules_accepts_string_via_omegaconf(self): method test_target_modules_raises_on_invalid_type (line 85) | def test_target_modules_raises_on_invalid_type(self): FILE: tests/workers/config/test_optim_config_on_cpu.py class TestFSDPOptimizerConfigCPU (line 20) | class TestFSDPOptimizerConfigCPU: method test_default_configuration (line 21) | def test_default_configuration(self): method test_valid_lr_scheduler_types (line 28) | def test_valid_lr_scheduler_types(self, lr_scheduler_type): method test_valid_warmup_style_types (line 33) | def test_valid_warmup_style_types(self, warmup_style): method test_invalid_lr_scheduler_type (line 37) | def test_invalid_lr_scheduler_type(self): method test_invalid_warmup_style_type (line 41) | def test_invalid_warmup_style_type(self): method test_num_cycles_configuration (line 46) | def test_num_cycles_configuration(self, num_cycles): FILE: tests/workers/critic/test_special_dp_critic.py class TestCriticWorker (line 33) | class TestCriticWorker(unittest.TestCase): method setUpClass (line 35) | def setUpClass(cls): method tearDownClass (line 52) | def tearDownClass(cls): method setUp (line 57) | def setUp(self): method tearDown (line 88) | def tearDown(self): method _create_test_data_for_compute_values (line 94) | def _create_test_data_for_compute_values(self, batch_size=2, seq_len=1... method _create_test_data_for_update_critic (line 119) | def _create_test_data_for_update_critic(self, batch_size=2, seq_len=10... method test_init_model (line 149) | def test_init_model(self): method test_compute_values (line 159) | def test_compute_values(self): method test_update_critic (line 177) | def test_update_critic(self): method test_critic_attn_implementation_override_functionality (line 202) | def test_critic_attn_implementation_override_functionality(self, mock_... method test_critic_model_config_structure (line 260) | def test_critic_model_config_structure(self): method test_critic_hydra_config_compatibility (line 290) | def test_critic_hydra_config_compatibility(self): method test_critic_backward_compatibility (line 310) | def test_critic_backward_compatibility(self): method test_critic_and_actor_independent_configuration (line 333) | def test_critic_and_actor_independent_configuration(self): FILE: tests/workers/reward_manager/test_registry_on_cpu.py function setup (line 22) | def setup(): function test_get_existing_manager (line 29) | def test_get_existing_manager(setup): function test_get_nonexistent_manager (line 35) | def test_get_nonexistent_manager(setup): function test_case_sensitivity (line 42) | def test_case_sensitivity(setup): function test_empty_registry (line 50) | def test_empty_registry(setup): function test_register_new_class (line 58) | def test_register_new_class(setup): function test_register_different_classes_same_name (line 69) | def test_register_different_classes_same_name(setup): function test_decorator_returns_original_class (line 85) | def test_decorator_returns_original_class(setup): FILE: tests/workers/rollout/perf/vllm_async_rollout.py function init_config (line 48) | def init_config(n_gpus_per_node) -> DictConfig: function initialize (line 77) | def initialize(config, backend) -> tuple[AgentLoopManager | RayWorkerGro... function perf_rollout (line 107) | def perf_rollout(mode, backend, n_gpus_per_node, num_steps): FILE: tests/workers/rollout/rollout_sglang/test_http_server_engine.py function event_loop (line 63) | def event_loop(): function basic_adapter_kwargs (line 71) | def basic_adapter_kwargs(): function router_adapter_kwargs (line 82) | def router_adapter_kwargs(): function non_master_adapter_kwargs (line 95) | def non_master_adapter_kwargs(): function mock_launch_server_process (line 106) | def mock_launch_server_process(): function mock_multiprocessing_process (line 119) | def mock_multiprocessing_process(): function mock_requests_session (line 132) | def mock_requests_session(): function mock_requests_post (line 148) | def mock_requests_post(): function mock_requests_get (line 161) | def mock_requests_get(): function mock_aiohttp_session (line 174) | def mock_aiohttp_session(): function mock_kill_process_tree (line 193) | def mock_kill_process_tree(): function sglang_test_model_path (line 203) | def sglang_test_model_path(): function real_adapter_kwargs (line 215) | def real_adapter_kwargs(sglang_test_model_path): function mock_server_args_post_init (line 226) | def mock_server_args_post_init(): class TestLaunchServerProcess (line 236) | class TestLaunchServerProcess: method test_launch_server_process_success (line 239) | def test_launch_server_process_success( method test_launch_server_process_non_master (line 264) | def test_launch_server_process_non_master(self, mock_multiprocessing_p... method test_launch_server_process_timeout (line 279) | def test_launch_server_process_timeout(self, mock_multiprocessing_proc... method test_launch_server_process_died (line 305) | def test_launch_server_process_died(self, real_adapter_kwargs): class TestHttpServerEngineAdapter (line 322) | class TestHttpServerEngineAdapter: method test_init_with_router_registration (line 325) | def test_init_with_router_registration(self, mock_launch_server_proces... method test_init_without_router (line 334) | def test_init_without_router(self, mock_launch_server_process, basic_a... method test_register_with_router_failure (line 342) | def test_register_with_router_failure(self, mock_launch_server_process... method test_make_request_success (line 353) | def test_make_request_success(self, mock_launch_server_process, basic_... method test_make_request_get_method (line 372) | def test_make_request_get_method(self, mock_launch_server_process, bas... method test_make_request_non_master (line 387) | def test_make_request_non_master(self, mock_launch_server_process): method test_make_request_retry_logic (line 395) | def test_make_request_retry_logic(self, mock_launch_server_process, ba... method test_make_request_http_error (line 414) | def test_make_request_http_error(self, mock_launch_server_process, bas... method test_make_request_max_attempts_exceeded (line 426) | def test_make_request_max_attempts_exceeded(self, mock_launch_server_p... method test_update_weights_from_tensor_strict (line 439) | def test_update_weights_from_tensor_strict(self, mock_launch_server_pr... method test_update_weights_from_tensor_empty (line 473) | def test_update_weights_from_tensor_empty(self, mock_launch_server_pro... method test_update_weights_from_tensor_none (line 502) | def test_update_weights_from_tensor_none(self, mock_launch_server_proc... method test_generate (line 531) | def test_generate(self, mock_launch_server_process, basic_adapter_kwar... method test_flush_cache (line 555) | def test_flush_cache(self, mock_launch_server_process, basic_adapter_k... method test_flush_cache_non_master (line 574) | def test_flush_cache_non_master(self, mock_launch_server_process): method test_memory_management_methods (line 582) | def test_memory_management_methods(self, mock_launch_server_process, b... method test_generation_control_methods (line 599) | def test_generation_control_methods(self, mock_launch_server_process, ... method test_shutdown (line 606) | def test_shutdown(self, mock_launch_server_process, mock_kill_process_... method test_shutdown_with_errors (line 622) | def test_shutdown_with_errors(self, mock_launch_server_process, mock_k... method test_empty_and_none_parameters (line 643) | def test_empty_and_none_parameters(self, mock_launch_server_process, b... method test_large_payload_handling (line 667) | def test_large_payload_handling(self, mock_launch_server_process, basi... method test_timeout_edge_cases (line 690) | def test_timeout_edge_cases(self, mock_launch_server_process): method test_extreme_configuration_values (line 702) | def test_extreme_configuration_values(self, mock_launch_server_process): class TestAsyncHttpServerEngineAdapter (line 721) | class TestAsyncHttpServerEngineAdapter: method test_init (line 724) | def test_init(self, mock_launch_server_process, basic_adapter_kwargs): method test_make_async_request_success (line 731) | async def test_make_async_request_success(self, mock_launch_server_pro... method test_make_async_request_get_method (line 764) | async def test_make_async_request_get_method(self, mock_launch_server_... method test_make_async_request_non_master (line 793) | async def test_make_async_request_non_master(self, mock_launch_server_... method test_async_generate (line 802) | async def test_async_generate(self, mock_launch_server_process, basic_... method test_async_memory_management (line 819) | async def test_async_memory_management(self, mock_launch_server_proces... class TestErrorRecovery (line 840) | class TestErrorRecovery: method test_flush_cache_recovery (line 843) | def test_flush_cache_recovery(self, mock_launch_server_process, basic_... method test_flush_cache_max_attempts (line 860) | def test_flush_cache_max_attempts(self, mock_launch_server_process, ba... method test_network_partition_recovery (line 872) | def test_network_partition_recovery(self, mock_launch_server_process, ... class TestResourceManagement (line 889) | class TestResourceManagement: method test_resource_cleanup_on_exception (line 892) | def test_resource_cleanup_on_exception( method test_multiple_shutdown_calls (line 909) | def test_multiple_shutdown_calls(self, mock_launch_server_process, bas... class TestDataTypeHandling (line 919) | class TestDataTypeHandling: method test_complex_data_structures (line 922) | def test_complex_data_structures(self, mock_launch_server_process, bas... class TestIntegration (line 956) | class TestIntegration: method test_error_scenarios (line 959) | def test_error_scenarios(self, mock_launch_server_process, basic_adapt... FILE: tests/workers/rollout/rollout_trtllm/test_adapter.py class TestAsyncTRTLLMHttpAdapter (line 27) | class TestAsyncTRTLLMHttpAdapter: method _build_async_session (line 28) | def _build_async_session( method test_make_async_request_get_method (line 48) | async def test_make_async_request_get_method(self): method test_make_async_request_post_method (line 70) | async def test_make_async_request_post_method(self): method test_make_async_request_http_error (line 94) | async def test_make_async_request_http_error(self): method test_make_async_request_max_attempts_exceeded (line 120) | async def test_make_async_request_max_attempts_exceeded(self): class TestTRTLLMServerAdapter (line 135) | class TestTRTLLMServerAdapter: method test_init_without_device_mesh (line 136) | def test_init_without_device_mesh(self): FILE: tests/workers/rollout/rollout_trtllm/test_async_server.py class TestTRTLLMReplica (line 30) | class TestTRTLLMReplica: method test_placement_group_with_sub_ray_resource_pool (line 31) | def test_placement_group_with_sub_ray_resource_pool(self): method test_placement_group_with_ray_resource_pool (line 69) | def test_placement_group_with_ray_resource_pool(self): class TestTRTLLMHttpServer (line 110) | class TestTRTLLMHttpServer: method _build_rollout_config (line 112) | def _build_rollout_config(*, response_length: int | None = None, free_... method _create_server (line 137) | def _create_server(rollout_config, model_config, *, name: str): method test_async_generate (line 169) | def test_async_generate(self): method test_async_memory_management (line 215) | def test_async_memory_management(self): FILE: tests/workers/rollout/rollout_trtllm/test_trtllm_rollout_utils.py function create_test_image (line 35) | def create_test_image(width: int = 224, height: int = 224) -> Image.Image: function create_rollout_config_dict (line 47) | def create_rollout_config_dict(): function create_model_config_dict (line 77) | def create_model_config_dict(model_path: str): function get_tokenizer (line 87) | def get_tokenizer(model_path: str): function get_processor (line 91) | def get_processor(model_path: str): class TestUnimodalTRTLLMRollout (line 101) | class TestUnimodalTRTLLMRollout: method ray_context (line 103) | def ray_context(self): method trtllm_replica (line 111) | def trtllm_replica(self, ray_context): method tokenizer (line 134) | def tokenizer(self): method test_unimodal_generate (line 145) | def test_unimodal_generate(self, trtllm_replica, tokenizer, prompt): method test_unimodal_batch_generate (line 185) | def test_unimodal_batch_generate(self, trtllm_replica, tokenizer): class TestMultimodalTRTLLMRollout (line 230) | class TestMultimodalTRTLLMRollout: method ray_context (line 232) | def ray_context(self): method trtllm_vlm_replica (line 240) | def trtllm_vlm_replica(self, ray_context): method tokenizer (line 263) | def tokenizer(self): method processor (line 267) | def processor(self): method test_multimodal_generate_with_image (line 278) | def test_multimodal_generate_with_image(self, trtllm_vlm_replica, proc... method test_multimodal_different_image_sizes (line 336) | def test_multimodal_different_image_sizes(self, trtllm_vlm_replica, pr... method test_multimodal_text_only_fallback (line 376) | def test_multimodal_text_only_fallback(self, trtllm_vlm_replica, token... class TestTRTLLMServerLifecycle (line 413) | class TestTRTLLMServerLifecycle: method ray_context (line 415) | def ray_context(self): method trtllm_replica_lifecycle (line 423) | def trtllm_replica_lifecycle(self, ray_context): method tokenizer (line 446) | def tokenizer(self): method test_wake_sleep_cycle (line 449) | def test_wake_sleep_cycle(self, trtllm_replica_lifecycle, tokenizer): FILE: tests/workers/rollout/rollout_vllm/run_fsdp_vllm.py function _pre_process_inputs (line 30) | def _pre_process_inputs(pad_token_id, prompt_token_ids: torch.Tensor) ->... function main (line 36) | def main(): FILE: tests/workers/rollout/rollout_vllm/test_vllm_abort.py function test_vllm_abort (line 29) | def test_vllm_abort(): FILE: tests/workers/rollout/test_hf_rollout.py function prepare_input_dataproto (line 48) | def prepare_input_dataproto(tokenizer, config, validate): function prepare_fsdp_model (line 75) | def prepare_fsdp_model(model, world_size): function test_hf_rollout (line 100) | def test_hf_rollout(n: int = 1, do_sample: bool = True, validate: bool =... FILE: tests/workers/rollout/test_sglang_async_rollout_multimodal_delta.py function _test_add_tool_response_messages_image_delta (line 31) | def _test_add_tool_response_messages_image_delta(processor, image_list, ... function test_add_tool_response_messages_image_delta (line 157) | def test_add_tool_response_messages_image_delta(): function test_add_tool_response_messages_image_delta_resize_image (line 179) | def test_add_tool_response_messages_image_delta_resize_image(): FILE: tests/workers/rollout/test_sglang_rollout_sharding_manager.py function test_get_named_tensor_buckets (line 50) | def test_get_named_tensor_buckets(named_tensors, bucket_size_mb, gt_grou... FILE: tests/workers/rollout/test_vllm_cli_args_on_cpu.py class TestBuildCliArgsFromConfig (line 22) | class TestBuildCliArgsFromConfig: method test_string_value (line 25) | def test_string_value(self): method test_integer_value (line 31) | def test_integer_value(self): method test_float_value (line 37) | def test_float_value(self): method test_bool_true (line 43) | def test_bool_true(self): method test_bool_false (line 49) | def test_bool_false(self): method test_none_value (line 55) | def test_none_value(self): method test_list_values (line 61) | def test_list_values(self): method test_empty_list (line 67) | def test_empty_list(self): method test_list_with_strings (line 73) | def test_list_with_strings(self): method test_dict_value (line 79) | def test_dict_value(self): method test_mixed_config (line 87) | def test_mixed_config(self): method test_preserves_order (line 113) | def test_preserves_order(self): method test_empty_config (line 119) | def test_empty_config(self): method test_single_element_list (line 125) | def test_single_element_list(self): FILE: tests/workers/test_fsdp_attn_implementation.py class TestFSDPAttnImplementation (line 43) | class TestFSDPAttnImplementation: method test_attn_implementation_extraction_logic (line 46) | def test_attn_implementation_extraction_logic(self): method test_attn_implementation_passed_to_autoconfig (line 71) | def test_attn_implementation_passed_to_autoconfig(self, mock_model_fro... method test_attn_implementation_passed_to_model (line 109) | def test_attn_implementation_passed_to_model(self, mock_model_from_pre... method test_override_config_integration (line 144) | def test_override_config_integration(self): method test_hydra_plus_prefix_config (line 165) | def test_hydra_plus_prefix_config(self): method test_backward_compatibility (line 194) | def test_backward_compatibility(self): method test_critic_attn_implementation_extraction_logic (line 214) | def test_critic_attn_implementation_extraction_logic(self): method test_critic_attn_implementation_passed_to_autoconfig (line 238) | def test_critic_attn_implementation_passed_to_autoconfig(self, mock_co... method test_critic_override_config_integration (line 277) | def test_critic_override_config_integration(self): method test_critic_hydra_plus_prefix_config (line 302) | def test_critic_hydra_plus_prefix_config(self): method test_both_actor_and_critic_configuration (line 331) | def test_both_actor_and_critic_configuration(self): method test_critic_backward_compatibility (line 358) | def test_critic_backward_compatibility(self): function test_attn_implementation_fix_integration (line 379) | def test_attn_implementation_fix_integration(): function test_critic_attn_implementation_fix_integration (line 411) | def test_critic_attn_implementation_fix_integration(): function test_complete_training_configuration (line 438) | def test_complete_training_configuration(): FILE: tests/workers/test_fsdp_workers.py function test_actor_rollout_ref_worker_actor_ref_model (line 21) | def test_actor_rollout_ref_worker_actor_ref_model(): FILE: verl/__init__.py function _sync_all_patch (line 90) | def _sync_all_patch(self): FILE: verl/base_config.py class BaseConfig (line 22) | class BaseConfig(collections.abc.Mapping): method __setattr__ (line 33) | def __setattr__(self, name: str, value): method get (line 40) | def get(self, key: str, default: Any = None) -> Any: method __getitem__ (line 55) | def __getitem__(self, key: str): method __iter__ (line 70) | def __iter__(self): method __len__ (line 79) | def __len__(self): FILE: verl/checkpoint_engine/base.py class TensorMeta (line 30) | class TensorMeta(TypedDict): class CheckpointEngineRegistry (line 37) | class CheckpointEngineRegistry: method register (line 42) | def register(backend: str): method get (line 56) | def get(cls, backend: str) -> type["CheckpointEngine"]: method new (line 68) | def new(cls, backend: str, *args, **kwargs) -> "CheckpointEngine": class CheckpointEngine (line 84) | class CheckpointEngine(ABC): method prepare (line 99) | def prepare(self) -> dict[str, Any]: method build_topology (line 116) | def build_topology( method init_process_group (line 143) | def init_process_group(self, **kwargs): method finalize (line 152) | def finalize(self): method send_weights (line 162) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 171) | async def receive_weights(self) -> Generator[tuple[str, torch.Tensor],... class CheckpointEngineWithCache (line 180) | class CheckpointEngineWithCache(CheckpointEngine): method get_weights (line 188) | async def get_weights(self) -> Generator[tuple[str, torch.Tensor], Non... class ColocatedCheckpointEngine (line 198) | class ColocatedCheckpointEngine(CheckpointEngine): method __init__ (line 209) | def __init__(self, bucket_size: int, is_master: bool = False) -> None: method prepare (line 213) | def prepare(self): method init_process_group (line 216) | def init_process_group(self, **kwargs): method finalize (line 219) | def finalize(self): method build_topology (line 223) | def build_topology(cls, *args, **kwargs): method send_weights (line 226) | def send_weights(self, weights: Generator[tuple[str, torch.Tensor], No... method receive_weights (line 234) | def receive_weights(self) -> Generator[tuple[str, torch.Tensor], None,... class CheckpointEngineWorker (line 244) | class CheckpointEngineWorker(Worker): method __init__ (line 253) | def __init__( method update_weights (line 286) | async def update_weights(self, global_steps: int = None): method execute_checkpoint_engine (line 291) | def execute_checkpoint_engine(self, method: str, *args, **kwargs): method get_replica_rank (line 295) | def get_replica_rank(self) -> int: method is_leader_rank (line 300) | def is_leader_rank(self) -> bool: class CheckpointEngineManager (line 308) | class CheckpointEngineManager: method __init__ (line 337) | def __init__( method build_process_group (line 349) | def build_process_group(self, rollout: RayWorkerGroup): method add_replicas (line 376) | def add_replicas(self, replicas: list[RolloutReplica]): method remove_replicas (line 384) | def remove_replicas(self, replicas: list[RolloutReplica]): method sleep_replicas (line 394) | async def sleep_replicas(self): method wake_up_replicas (line 399) | async def wake_up_replicas(self): method update_weights (line 404) | async def update_weights(self, global_steps: int = None): FILE: verl/checkpoint_engine/hccl_checkpoint_engine.py class MasterMetadata (line 38) | class MasterMetadata: class BroadcastOperation (line 45) | class BroadcastOperation: method __init__ (line 57) | def __init__( method _run (line 75) | def _run(self): method wait_for_complete (line 87) | async def wait_for_complete(self) -> dict[str, TensorMeta]: class HCCLCheckpointEngine (line 97) | class HCCLCheckpointEngine(CheckpointEngine): method __init__ (line 109) | def __init__( method prepare (line 131) | def prepare(self) -> MasterMetadata: method finalize (line 141) | def finalize(self): method build_topology (line 155) | def build_topology(cls, trainer_world_size: int, rollout_world_size: i... method _start_zmq_server (line 168) | def _start_zmq_server(self): method _connect_zmq_client (line 182) | def _connect_zmq_client(self, metadata: MasterMetadata): method init_process_group (line 195) | def init_process_group(self, rank: int, world_size: int, master_metada... method send_weights (line 230) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 303) | async def receive_weights(self) -> AsyncGenerator[tuple[str, torch.Ten... FILE: verl/checkpoint_engine/kimi_checkpoint_engine.py function ckpt_get_named_tensor_buckets (line 37) | def ckpt_get_named_tensor_buckets( function receive_tensor (line 66) | async def receive_tensor( class MasterMetadata (line 176) | class MasterMetadata: class BroadcastOperation (line 183) | class BroadcastOperation: method __init__ (line 193) | def __init__( method _run (line 208) | def _run(self): method wait_for_complete (line 212) | async def wait_for_complete(self) -> list[ParameterMeta]: class KIMICheckpointEngine (line 223) | class KIMICheckpointEngine(CheckpointEngine): method __init__ (line 234) | def __init__( method prepare (line 248) | def prepare(self) -> MasterMetadata: method finalize (line 259) | def finalize(self): method build_topology (line 268) | def build_topology(cls, trainer_world_size: int, rollout_world_size: i... method init_process_group (line 285) | def init_process_group( method send_weights (line 321) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 362) | async def receive_weights(self) -> AsyncGenerator[tuple[str, torch.Ten... FILE: verl/checkpoint_engine/mooncake_checkpoint_engine.py class MooncakeCheckpointEngine (line 35) | class MooncakeCheckpointEngine(CheckpointEngine): method __init__ (line 45) | def __init__( method prepare (line 88) | def prepare(self) -> dict[str, Any]: method build_topology (line 98) | def build_topology(cls, trainer_world_size: int, rollout_world_size: i... method init_process_group (line 111) | def init_process_group(self, rank: int, world_size: int, metadata: dic... method finalize (line 135) | def finalize(self): method wait_for_complete (line 142) | async def wait_for_complete(self, buf: torch.Tensor): method send_weights (line 150) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 222) | async def receive_weights(self) -> AsyncGenerator[tuple[str, torch.Ten... FILE: verl/checkpoint_engine/nccl_checkpoint_engine.py class MasterMetadata (line 38) | class MasterMetadata: class BroadcastOperation (line 43) | class BroadcastOperation: method __init__ (line 55) | def __init__( method _run (line 74) | def _run(self): method wait_for_complete (line 86) | async def wait_for_complete(self) -> dict[str, TensorMeta]: class NCCLCheckpointEngine (line 97) | class NCCLCheckpointEngine(CheckpointEngine): method __init__ (line 109) | def __init__( method prepare (line 128) | def prepare(self) -> MasterMetadata: method finalize (line 140) | def finalize(self): method build_topology (line 154) | def build_topology(cls, trainer_world_size: int, rollout_world_size: i... method _start_zmq_server (line 167) | def _start_zmq_server(self): method _connect_zmq_client (line 181) | def _connect_zmq_client(self, metadata: MasterMetadata): method init_process_group (line 194) | def init_process_group(self, rank: int, world_size: int, master_metada... method send_weights (line 224) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 297) | async def receive_weights(self) -> AsyncGenerator[tuple[str, torch.Ten... FILE: verl/checkpoint_engine/nixl_checkpoint_engine.py class NixlAgentMetadata (line 42) | class NixlAgentMetadata: class NixlAgent (line 49) | class NixlAgent: method __init__ (line 54) | def __init__(self): method __getattr__ (line 63) | def __getattr__(self, name): method get_agent_metadata (line 75) | def get_agent_metadata(self) -> NixlAgentMetadata: method start_zmq_server (line 83) | def start_zmq_server(self): method add_remote_agent (line 97) | def add_remote_agent(self, metadata: NixlAgentMetadata) -> str: method remove_remote_agent (line 113) | def remove_remote_agent(self, agent_name: str): method send_message (line 118) | def send_message(self, agent_name, message: dict): method read_message (line 122) | async def read_message(self, agent_name: str) -> dict: method get_notification (line 128) | async def get_notification(self, remote_name: str) -> bytes: class ReadableOperation (line 137) | class ReadableOperation: method __init__ (line 150) | def __init__( method wait_for_complete (line 164) | async def wait_for_complete(self): class ReadOperation (line 171) | class ReadOperation: method __init__ (line 184) | def __init__(self, agent: NixlAgent, remote_agent: str, local_descs: n... method read_metadata (line 194) | async def read_metadata(self) -> dict: method begin_read (line 205) | def begin_read(self): method wait_for_complete (line 215) | async def wait_for_complete(self): class NIXLCheckpointEngine (line 233) | class NIXLCheckpointEngine(CheckpointEngine): method __init__ (line 246) | def __init__( method prepare (line 259) | def prepare(self) -> NixlAgentMetadata: method build_topology (line 283) | def build_topology(cls, trainer_world_size: int, rollout_world_size: i... method init_process_group (line 301) | def init_process_group( method finalize (line 343) | def finalize(self): method send_weights (line 365) | async def send_weights(self, weights: Generator[tuple[str, torch.Tenso... method receive_weights (line 435) | async def receive_weights(self) -> AsyncGenerator[tuple[str, torch.Ten... FILE: verl/experimental/agent_loop/agent_loop.py class GlobalRequestLoadBalancer (line 58) | class GlobalRequestLoadBalancer: method __init__ (line 61) | def __init__(self, server_actor_ids: list[str], max_cache_size: int = ... method acquire_server (line 68) | def acquire_server(self, request_id: str) -> str: method release_server (line 82) | def release_server(self, server_id: str) -> None: function _get_rollout_and_model_config (line 91) | def _get_rollout_and_model_config(config: DictConfig) -> tuple[DictConfi... class AsyncLLMServerManager (line 99) | class AsyncLLMServerManager: method __init__ (line 106) | def __init__( method _acquire_server (line 123) | async def _acquire_server(self, request_id: str) -> tuple[str, ray.act... method _release_server (line 130) | def _release_server(self, server_id: str) -> None: method generate (line 136) | async def generate( class AgentLoopMetrics (line 169) | class AgentLoopMetrics(BaseModel): class AgentLoopOutput (line 177) | class AgentLoopOutput(BaseModel): class _InternalAgentLoopOutput (line 202) | class _InternalAgentLoopOutput(AgentLoopOutput): class DictConfigWrap (line 229) | class DictConfigWrap: method __init__ (line 232) | def __init__(self, config: DictConfig): class AgentLoopBase (line 236) | class AgentLoopBase(ABC): method __init__ (line 249) | def __init__( method process_vision_info (line 270) | async def process_vision_info(self, messages: list[dict]) -> dict: method apply_chat_template (line 291) | async def apply_chat_template( method run (line 360) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... function register (line 381) | def register(agent_name: str): class AgentLoopWorker (line 392) | class AgentLoopWorker: method __init__ (line 401) | def __init__( method generate_sequences (line 454) | async def generate_sequences(self, batch: DataProto) -> DataProto: method _run_agent_loop (line 535) | async def _run_agent_loop( method _agent_loop_postprocess (line 569) | async def _agent_loop_postprocess(self, output, **kwargs) -> _Internal... method _compute_multi_modal_inputs (line 693) | def _compute_multi_modal_inputs(self, output, input_ids) -> dict[str, ... method _compute_position_ids (line 728) | def _compute_position_ids(self, input_ids, attention_mask, multi_modal... method _compute_score (line 759) | async def _compute_score(self, output, prompts, responses, attention_m... method _postprocess (line 789) | def _postprocess( function get_trajectory_info (line 880) | async def get_trajectory_info(step, index, validate): class AgentLoopManager (line 902) | class AgentLoopManager: method __init__ (line 915) | def __init__( method create (line 938) | async def create( method _initialize_llm_servers (line 952) | async def _initialize_llm_servers(self): method _init_agent_loop_workers (line 999) | async def _init_agent_loop_workers(self): method _init_global_load_balancer (line 1023) | async def _init_global_load_balancer(self) -> None: method generate_sequences (line 1030) | async def generate_sequences(self, prompts: DataProto) -> DataProto: method _performance_metrics (line 1056) | def _performance_metrics(self, metrics: list[list[dict[str, str]]], ou... method clear_kv_cache (line 1084) | async def clear_kv_cache(self): method start_profile (line 1089) | async def start_profile(self, **kwargs): method stop_profile (line 1094) | async def stop_profile(self): FILE: verl/experimental/agent_loop/prometheus_utils.py function update_prometheus_config (line 28) | def update_prometheus_config(config: PrometheusConfig, server_addresses:... FILE: verl/experimental/agent_loop/single_turn_agent_loop.py class SingleTurnAgentLoop (line 28) | class SingleTurnAgentLoop(AgentLoopBase): method __init__ (line 31) | def __init__(self, *args, **kwargs): method run (line 36) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... FILE: verl/experimental/agent_loop/tool_agent_loop.py class AgentState (line 44) | class AgentState(Enum): class AgentData (line 52) | class AgentData: method __init__ (line 56) | def __init__( class ToolAgentLoop (line 96) | class ToolAgentLoop(AgentLoopBase): method __init__ (line 97) | def __init__(self, *args, **kwargs): method run (line 124) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... method _handle_pending_state (line 203) | async def _handle_pending_state(self, agent_data: AgentData, sampling_... method _handle_generating_state (line 214) | async def _handle_generating_state( method _handle_processing_tools_state (line 281) | async def _handle_processing_tools_state(self, agent_data: AgentData) ... method _handle_interacting_state (line 384) | async def _handle_interacting_state(self, agent_data: AgentData) -> Ag... method _call_tool (line 421) | async def _call_tool( method _initialize_interactions (line 471) | def _initialize_interactions(self, interaction_config_file): FILE: verl/experimental/agent_loop/tool_parser.py class FunctionCall (line 31) | class FunctionCall(BaseModel): class ToolParser (line 44) | class ToolParser(ABC): method __init__ (line 47) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 51) | async def extract_tool_calls( method get_tool_parser (line 66) | def get_tool_parser(cls, name: str, tokenizer): method register (line 72) | def register(cls, name: str): class HermesToolParser (line 81) | class HermesToolParser(ToolParser): method __init__ (line 84) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 92) | async def extract_tool_calls( class GptOssToolParser (line 117) | class GptOssToolParser(ToolParser): method __init__ (line 126) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 141) | async def extract_tool_calls( class Qwen3XMLToolParser (line 174) | class Qwen3XMLToolParser(ToolParser): method __init__ (line 183) | def __init__(self, tokenizer): method _parse_xml_function_call (line 195) | def _parse_xml_function_call( method _get_function_calls (line 299) | def _get_function_calls(self, model_output: str) -> list[str]: method extract_tool_calls (line 316) | async def extract_tool_calls( FILE: verl/experimental/agent_loop/utils.py function resolve_config_path (line 19) | def resolve_config_path(config_path: str) -> str: function format_gpt_oss_tool_response_manually (line 78) | def format_gpt_oss_tool_response_manually(tool_response: str, tool_call_... function add_generation_prompt_for_gpt_oss (line 90) | def add_generation_prompt_for_gpt_oss(message_content: str) -> str: function build_gpt_oss_tool_response_text (line 101) | def build_gpt_oss_tool_response_text(messages: list[dict[str, Any]], too... FILE: verl/experimental/dataset/sampler.py class AbstractSampler (line 23) | class AbstractSampler(Sampler[int]): method __init__ (line 27) | def __init__( class AbstractCurriculumSampler (line 35) | class AbstractCurriculumSampler(AbstractSampler): method update (line 39) | def update(self, batch: DataProto) -> None: FILE: verl/experimental/dynamic_dataset/dynamicgen_dataset.py class AbstractDataGenerator (line 38) | class AbstractDataGenerator(ABC): method __init__ (line 39) | def __init__(self, config: DictConfig): method generate (line 43) | def generate(self, dataset: Dataset) -> datasets.Dataset: class MockDataGenerator (line 54) | class MockDataGenerator(AbstractDataGenerator): method __init__ (line 60) | def __init__(self, config: DictConfig = None): method generate (line 63) | def generate(self, dataset: Dataset) -> datasets.Dataset: class DynamicGenDataset (line 68) | class DynamicGenDataset(RLHFDataset): method __init__ (line 74) | def __init__( method append_dataframe (line 100) | def append_dataframe(self, new_dataframe: datasets.Dataset): method on_batch_end (line 106) | def on_batch_end(self, batch: DataProto) -> None: FILE: verl/experimental/fully_async_policy/agent_loop/agent_loop.py class FullyAsyncLLMServerManager (line 40) | class FullyAsyncLLMServerManager(AsyncLLMServerManager): method generate (line 46) | async def generate( class FullyAsyncAgentLoopWorker (line 127) | class FullyAsyncAgentLoopWorker(AgentLoopWorker): method __init__ (line 128) | def __init__( class FullyAsyncAgentLoopManager (line 139) | class FullyAsyncAgentLoopManager(AgentLoopManager): method __init__ (line 140) | def __init__( method generate_sequences_single (line 151) | async def generate_sequences_single(self, prompts: DataProto) -> DataP... method _select_best_worker (line 163) | def _select_best_worker(self): FILE: verl/experimental/fully_async_policy/detach_utils.py class RolloutSample (line 28) | class RolloutSample: class ValidateMetrics (line 43) | class ValidateMetrics: function prepare_single_generation_data (line 50) | def prepare_single_generation_data(batch_dict, config) -> DataProto: function addition_process (line 84) | def addition_process(output: DataProto): function assemble_batch_from_rollout_samples (line 94) | def assemble_batch_from_rollout_samples( class MetricsAggregator (line 189) | class MetricsAggregator: method __init__ (line 192) | def __init__(self, total_gpus: int): method _init_aggregation_rules (line 207) | def _init_aggregation_rules(self) -> dict[str, dict[str, list[str]]]: method add_step_metrics (line 225) | def add_step_metrics(self, metrics: dict[str, Any], sample_count: int,... method _get_aggregation_type (line 241) | def _get_aggregation_type(self, metric_name: str) -> str: method _aggregate_single_metric (line 263) | def _aggregate_single_metric(self, metric_name: str, values: list[floa... method get_aggregated_metrics (line 302) | def get_aggregated_metrics(self) -> dict[str, Any]: method _special_metrics_aggergate (line 321) | def _special_metrics_aggergate(self, aggregated: dict[str, Any]) -> di... method reset (line 341) | def reset(self): method get_current_stats (line 348) | def get_current_stats(self) -> dict[str, Any]: function task_exception_handler (line 358) | def task_exception_handler(task: asyncio.Task): function safe_create_task (line 369) | def safe_create_task(coro, name: str, task_set: set = None): FILE: verl/experimental/fully_async_policy/fully_async_main.py class FullyAsyncTaskRunner (line 35) | class FullyAsyncTaskRunner: method __init__ (line 40) | def __init__(self): method run (line 45) | def run(self, config): method _initialize_components (line 50) | def _initialize_components(self, config) -> None: method _create_rollouter (line 118) | def _create_rollouter(self, config) -> None: method _create_trainer (line 136) | def _create_trainer(self, config) -> None: method _run_training_loop (line 158) | def _run_training_loop(self): function main (line 195) | def main(config): FILE: verl/experimental/fully_async_policy/fully_async_rollouter.py class FullyAsyncRollouter (line 43) | class FullyAsyncRollouter(SeparateRayPPOTrainer): method __init__ (line 50) | def __init__( method _init_async_objects (line 183) | def _init_async_objects(self): method set_message_queue_client (line 193) | async def set_message_queue_client(self, message_queue_client: Message... method set_max_required_samples (line 198) | async def set_max_required_samples(self): method get_rollout_wg (line 223) | def get_rollout_wg(self): method get_replicas (line 227) | def get_replicas(self): method get_max_queue_size (line 231) | def get_max_queue_size(self): method get_total_train_steps (line 234) | def get_total_train_steps(self): method reset_staleness (line 237) | async def reset_staleness(self): method do_validate (line 263) | def do_validate(self) -> ValidateMetrics: method save_checkpoint (line 270) | async def save_checkpoint(self, local_global_step_folder: str): method load_checkpoint (line 286) | def load_checkpoint(self): method _validate_config (line 344) | def _validate_config(self): method init_workers (line 350) | async def init_workers(self): method _create_actor_rollout_classes (line 362) | def _create_actor_rollout_classes(self): method _init_models (line 366) | def _init_models(self): method _create_continuous_iterator (line 371) | def _create_continuous_iterator(self): method _init_async_rollout_manager (line 380) | async def _init_async_rollout_manager(self): method _feed_samples (line 400) | async def _feed_samples(self): method _processor_worker (line 433) | async def _processor_worker(self): method _process_single_sample_streaming (line 500) | async def _process_single_sample_streaming(self, rollout_sample: Rollo... method _streaming_generation_main (line 519) | async def _streaming_generation_main(self): method fit (line 578) | async def fit(self): method _async_monitor_loop (line 614) | async def _async_monitor_loop(self): method _should_pause_generation (line 643) | async def _should_pause_generation(self) -> bool: method get_statistics (line 667) | async def get_statistics(self) -> dict: FILE: verl/experimental/fully_async_policy/fully_async_trainer.py class TrainingStopException (line 47) | class TrainingStopException(Exception): class FullyAsyncTrainer (line 54) | class FullyAsyncTrainer(SeparateRayPPOTrainer): method __init__ (line 60) | def __init__( method _setup_checkpoint_manager (line 189) | def _setup_checkpoint_manager(self, rollouter): method set_message_queue_client (line 198) | def set_message_queue_client(self, message_queue_client: MessageQueueC... method set_rollouter (line 202) | def set_rollouter(self, rollouter): method set_total_train_steps (line 208) | def set_total_train_steps(self, total_training_steps): method get_actor_wg (line 223) | def get_actor_wg(self): method _get_samples_from_queue (line 227) | async def _get_samples_from_queue(self) -> tuple[None, None] | tuple[i... method _create_actor_rollout_classes (line 286) | def _create_actor_rollout_classes(self): method _init_models (line 297) | def _init_models(self): method init_workers (line 314) | async def init_workers(self): method _init_reward_loop (line 327) | def _init_reward_loop(self): method _init_async_rollout_manager (line 332) | async def _init_async_rollout_manager(self): method fit (line 389) | async def fit(self): method fit_step (line 421) | async def fit_step(self, batch_dict: dict = None): method _fit_generate (line 462) | async def _fit_generate(self, batch: DataProto = None) -> DataProto | ... method _compute_old_log_prob (line 473) | def _compute_old_log_prob(self, batch: DataProto): method _fit_update_local_step (line 495) | def _fit_update_local_step(self): method _fit_update_weights (line 509) | async def _fit_update_weights(self): method _validate_process (line 535) | async def _validate_process(self): method _fit_validate (line 558) | async def _fit_validate(self, val_before_train=False): method _fit_save_checkpoint (line 599) | def _fit_save_checkpoint(self, force=False): method _fit_postprocess_step (line 626) | def _fit_postprocess_step(self): method _save_checkpoint (line 636) | def _save_checkpoint(self): method load_checkpoint (line 699) | async def load_checkpoint(self): method _collect_metrics_from_samples (line 756) | def _collect_metrics_from_samples(self, batch, metrics): FILE: verl/experimental/fully_async_policy/message_queue.py class MessageQueue (line 27) | class MessageQueue: method __init__ (line 32) | def __init__(self, config: DictConfig, max_queue_size: int = 1000): method put_sample (line 55) | async def put_sample(self, sample: Any) -> bool: method get_sample (line 85) | async def get_sample(self) -> Any | None: method get_queue_size (line 105) | async def get_queue_size(self) -> int: method get_statistics (line 110) | async def get_statistics(self) -> dict[str, Any]: method clear_queue (line 121) | async def clear_queue(self): method shutdown (line 128) | async def shutdown(self): method get_memory_usage (line 136) | async def get_memory_usage(self) -> dict: method put_validate (line 168) | async def put_validate(self, data): method get_validate (line 172) | async def get_validate(self): class MessageQueueClient (line 180) | class MessageQueueClient: method __init__ (line 183) | def __init__(self, queue_actor: Any): method put_sample (line 186) | async def put_sample(self, sample: Any) -> bool: method put_validate (line 191) | async def put_validate(self, data: Any) -> bool: method get_validate_sync (line 195) | def get_validate_sync(self) -> Any | None: method get_sample (line 198) | async def get_sample(self) -> Any | None: method get_queue_size (line 203) | async def get_queue_size(self) -> int: method get_statistics (line 208) | async def get_statistics(self) -> dict[str, Any]: method clear_queue (line 213) | async def clear_queue(self): method shutdown (line 218) | async def shutdown(self): method get_memory_usage (line 223) | async def get_memory_usage(self) -> dict: method get_sample_sync (line 228) | def get_sample_sync(self) -> Any | None: method get_statistics_sync (line 232) | def get_statistics_sync(self) -> dict[str, Any]: FILE: verl/experimental/fully_async_policy/unittest/simple_streaming_demo.py class SimpleStreamingSystem (line 20) | class SimpleStreamingSystem: method __init__ (line 23) | def __init__(self, max_concurrent_tasks: int = 4): method data_stream (line 30) | async def data_stream(self): method add_data_stream (line 47) | async def add_data_stream(self, data_list: list[dict]): method _process_data_async (line 61) | async def _process_data_async(self, data_item: dict): method _submit_worker (line 85) | async def _submit_worker(self): method _consumer_worker (line 120) | async def _consumer_worker(self): method run_demo (line 140) | async def run_demo(self): function main (line 169) | async def main(): FILE: verl/experimental/one_step_off_policy/main_ppo.py class OneStepTaskRunner (line 35) | class OneStepTaskRunner: method run (line 36) | def run(self, config): function main (line 111) | def main(config): FILE: verl/experimental/one_step_off_policy/ray_trainer.py class OneStepOffRayTrainer (line 48) | class OneStepOffRayTrainer(SeparateRayPPOTrainer): method __init__ (line 49) | def __init__( method _create_actor_rollout_classes (line 141) | def _create_actor_rollout_classes(self): method _init_models (line 151) | def _init_models(self): method _init_async_rollout_manager (line 169) | def _init_async_rollout_manager(self): method _create_continuous_iterator (line 188) | def _create_continuous_iterator(self): method _async_gen_next_batch (line 197) | async def _async_gen_next_batch(self, continuous_iterator): method _launch_individual_rewards (line 252) | def _launch_individual_rewards(batch, config, tokenizer): method fit (line 256) | async def fit(self): method fit_step (line 318) | async def fit_step(self, batch_data_future, continuous_iterator): method _fit_generate (line 383) | async def _fit_generate(self, batch_data_future, continuous_iterator): FILE: verl/experimental/reward_loop/reward_loop.py function migrate_legacy_reward_impl (line 38) | def migrate_legacy_reward_impl(config): class RewardLoopWorker (line 92) | class RewardLoopWorker: method __init__ (line 108) | def __init__(self, config: DictConfig, reward_router_address: str = No... method _init_reward_fn (line 118) | def _init_reward_fn(self): method compute_score_batch (line 133) | async def compute_score_batch(self, data: DataProto) -> list[dict]: method compute_score (line 140) | async def compute_score(self, data: DataProto) -> dict: method _post_request (line 153) | async def _post_request(self, payload: dict, endpoint: str, max_retrie... method _preprocess_reward_inputs (line 193) | async def _preprocess_reward_inputs(self, data: DataProto) -> str: method compute_score_disrm (line 229) | async def compute_score_disrm(self, data: DataProto) -> dict: class RewardLoopManager (line 271) | class RewardLoopManager: method __init__ (line 277) | def __init__(self, config: DictConfig, rm_resource_pool: RayResourcePo... method _init_reward_loop_workers (line 289) | def _init_reward_loop_workers(self): method compute_rm_score (line 308) | def compute_rm_score(self, data: DataProto) -> DataProto: method _run_all (line 344) | def _run_all(self, tasks: list[asyncio.Task]): FILE: verl/experimental/reward_loop/reward_manager/base.py class RewardManagerBase (line 33) | class RewardManagerBase(ABC): method __init__ (line 36) | def __init__(self, config: DictConfig, tokenizer: AutoTokenizer, compu... method init_class (line 50) | def init_class(cls, config: DictConfig, tokenizer: AutoTokenizer): method run_single (line 57) | async def run_single(self, data: DataProto): FILE: verl/experimental/reward_loop/reward_manager/dapo.py class DAPORewardManager (line 24) | class DAPORewardManager(RewardManagerBase): method __init__ (line 27) | def __init__(self, config, tokenizer, compute_score, reward_router_add... method run_single (line 52) | async def run_single(self, data: DataProto) -> dict: FILE: verl/experimental/reward_loop/reward_manager/gdpo.py class GDPORewardManager (line 24) | class GDPORewardManager(RewardManagerBase): method __init__ (line 27) | def __init__(self, config, tokenizer, compute_score, reward_router_add... method run_single (line 35) | async def run_single(self, data: DataProto) -> dict: FILE: verl/experimental/reward_loop/reward_manager/limited.py class AsyncTokenBucket (line 32) | class AsyncTokenBucket: method __init__ (line 83) | def __init__(self, rate_limit: float, max_tokens: float = None): method acquire (line 90) | async def acquire(self, num_tokens: float = 1.0) -> None: class RateLimitedRewardManager (line 174) | class RateLimitedRewardManager(RewardManagerBase): method init_class (line 265) | def init_class(cls, config: DictConfig, tokenizer: AutoTokenizer): method __init__ (line 341) | def __init__( method _compute_reward (line 367) | async def _compute_reward( method run_single (line 398) | async def run_single(self, data: DataProto) -> dict: method __call__ (line 471) | def __call__(self, data: DataProto, return_dict: bool = False): FILE: verl/experimental/reward_loop/reward_manager/naive.py class NaiveRewardManager (line 24) | class NaiveRewardManager(RewardManagerBase): method __init__ (line 27) | def __init__(self, config, tokenizer, compute_score, reward_router_add... method run_single (line 34) | async def run_single(self, data: DataProto) -> dict: FILE: verl/experimental/reward_loop/reward_manager/registry.py function register (line 24) | def register(name: str) -> Callable[[type[RewardManagerBase]], type[Rewa... function get_reward_manager_cls (line 41) | def get_reward_manager_cls(name: str) -> type[RewardManagerBase]: FILE: verl/experimental/reward_loop/reward_manager/remote.py class RewardComputeWorker (line 27) | class RewardComputeWorker: method __init__ (line 32) | def __init__(self, compute_score_fn): method compute_score (line 36) | def compute_score(self, **kwargs) -> dict: class RemoteRewardManager (line 41) | class RemoteRewardManager(RewardManagerBase): method __init__ (line 50) | def __init__(self, config, tokenizer, compute_score, reward_router_add... method choose_reward_worker (line 72) | def choose_reward_worker(self): method run_single (line 75) | async def run_single(self, data: DataProto) -> dict: FILE: verl/experimental/reward_loop/reward_model.py class RewardModelManager (line 27) | class RewardModelManager: method __init__ (line 30) | def __init__( method _initialize_llm_servers (line 50) | def _initialize_llm_servers(self): method _initialize_router (line 87) | def _initialize_router(self): method get_router_address (line 100) | def get_router_address(self): method wake_up (line 103) | def wake_up(self): method sleep (line 107) | def sleep(self): method _run_all (line 111) | def _run_all(self, tasks: list[asyncio.Task]): FILE: verl/experimental/reward_loop/router/inner_sglang_router.py function launch_router_process (line 30) | def launch_router_process( FILE: verl/experimental/reward_loop/router/naive_router.py function _read_async_response (line 34) | async def _read_async_response(resp: aiohttp.ClientResponse) -> dict[str... function launch_router_process (line 51) | def launch_router_process( function run_router (line 77) | def run_router(router_ip: str, router_port: int, worker_urls: list[str]): class NaiveRouter (line 82) | class NaiveRouter: method __init__ (line 83) | def __init__( method _on_startup (line 115) | async def _on_startup(self): method _on_shutdown (line 128) | async def _on_shutdown(self): method _make_async_request (line 135) | async def _make_async_request(self, request: Request, endpoint: str): method _select_worker (line 175) | def _select_worker(self) -> str: method _release_worker (line 181) | def _release_worker(self, url: str) -> None: FILE: verl/experimental/separation/engine_workers.py class DetachActorWorker (line 35) | class DetachActorWorker(ActorRolloutRefWorker): method __init__ (line 44) | def __init__(self, config: DictConfig, role: str): method _get_strategy_handlers (line 56) | def _get_strategy_handlers(self): method save_model_to_cpu (line 91) | def save_model_to_cpu(self, n): method restore_model_from_cpu (line 104) | def restore_model_from_cpu(self, n): method clear_cpu_model (line 121) | def clear_cpu_model(self, n): FILE: verl/experimental/separation/ray_trainer.py class SeparateRayPPOTrainer (line 55) | class SeparateRayPPOTrainer(RayPPOTrainer): method __init__ (line 62) | def __init__( method init_workers (line 108) | def init_workers(self): method _init_resource_pools (line 128) | def _init_resource_pools(self): method _create_worker_classes (line 132) | def _create_worker_classes(self): method _create_actor_rollout_classes (line 138) | def _create_actor_rollout_classes(self): method _create_critic_class (line 141) | def _create_critic_class(self): method _create_reference_policy_class (line 171) | def _create_reference_policy_class(self): method _create_reward_model_class (line 183) | def _create_reward_model_class(self): method _init_worker_groups (line 193) | def _init_worker_groups(self): method _init_models (line 227) | def _init_models(self): method _init_reward_loop (line 254) | def _init_reward_loop(self): method _init_async_rollout_manager (line 266) | def _init_async_rollout_manager(self): method fit (line 269) | def fit(self): method fit_step (line 336) | def fit_step(self, batch_dict: Any = None): method _fit_prepare_step (line 378) | def _fit_prepare_step(self): method _fit_start_profile (line 383) | def _fit_start_profile(self): method _fit_get_batch (line 392) | def _fit_get_batch(self, batch_dict: dict) -> DataProto: method _fit_generate (line 399) | def _fit_generate(self, batch: DataProto = None) -> DataProto: method _fit_compute_reward (line 470) | def _fit_compute_reward(self, batch: DataProto) -> DataProto: method _fit_compute_log_prob (line 484) | def _fit_compute_log_prob(self, batch: DataProto) -> DataProto: method _fit_compute_ref_log_prob (line 535) | def _fit_compute_ref_log_prob(self, batch: DataProto) -> DataProto: method _fit_compute_critic (line 543) | def _fit_compute_critic(self, batch: DataProto) -> DataProto: method _fit_compute_advantage (line 551) | def _fit_compute_advantage(self, batch) -> DataProto: method _fit_update_critic (line 607) | def _fit_update_critic(self, batch: DataProto) -> DataProto: method _fit_update_actor (line 617) | def _fit_update_actor(self, batch: DataProto) -> DataProto: method _fit_update_weights (line 630) | def _fit_update_weights(self): method _fit_dump_data (line 637) | def _fit_dump_data(self, batch: DataProto): method _fit_validate (line 645) | def _fit_validate(self): method _fit_save_checkpoint (line 657) | def _fit_save_checkpoint(self): method _fit_stop_profile (line 684) | def _fit_stop_profile(self): method _fit_collect_metrics (line 700) | def _fit_collect_metrics(self, batch): method _fit_torch_memory (line 714) | def _fit_torch_memory(self): method _fit_experimental (line 723) | def _fit_experimental(self, batch): method _fit_postprocess_step (line 734) | def _fit_postprocess_step(self): FILE: verl/experimental/separation/utils.py function create_resource_pool_manager (line 22) | def create_resource_pool_manager(config, roles: list) -> ResourcePoolMan... function create_role_worker_mapping (line 57) | def create_role_worker_mapping(config): FILE: verl/experimental/vla/dp_rob.py class RobDataParallelPPOActor (line 39) | class RobDataParallelPPOActor(BasePPOActor): method __init__ (line 40) | def __init__( method process_tensor (line 57) | def process_tensor(self, tensor, pad_id): method generate_traj_mask (line 65) | def generate_traj_mask(self, end_step, traj_len): method apply_mask_with_grad_control (line 78) | def apply_mask_with_grad_control(self, log_probs, entropy, mask): method _forward_micro_batch (line 95) | def _forward_micro_batch(self, micro_batch, temperature) -> tuple[torc... method _forward_micro_batch_update (line 139) | def _forward_micro_batch_update( method _optimizer_step (line 165) | def _optimizer_step(self): method compute_log_prob (line 175) | def compute_log_prob(self, data: DataProto, calculate_entropy=False) -... method update_policy (line 231) | def update_policy(self, data: DataProto): FILE: verl/experimental/vla/env_loop.py class EnvLoop (line 30) | class EnvLoop: method __init__ (line 34) | def __init__(self, env_wg: RayWorkerGroup, rollout_wg: RayWorkerGroup,... method generate_sequences (line 61) | def generate_sequences(self, prompts: DataProto, reset_future: asyncio... method run (line 80) | async def run(self, prompts: DataProto, reset_results: DataProto) -> D... method _restructure_obs_data (line 146) | def _restructure_obs_data(self, data_proto: DataProto) -> list[DataPro... method _collate_trajectories (line 164) | def _collate_trajectories(self, trajectories: dict, initial_state_ids:... FILE: verl/experimental/vla/envs/action_utils.py function prepare_actions_simplevla (line 28) | def prepare_actions_simplevla( function prepare_actions (line 38) | def prepare_actions( function to_tensor (line 54) | def to_tensor(array: dict | torch.Tensor | np.ndarray | list | Any, devi... function tile_images (line 87) | def tile_images(images: list[np.ndarray | torch.Tensor], nrows: int = 1)... function put_text_on_image (line 155) | def put_text_on_image(image: np.ndarray, lines: list[str], max_width: in... function put_info_on_image (line 203) | def put_info_on_image( function list_of_dict_to_dict_of_list (line 224) | def list_of_dict_to_dict_of_list( function save_rollout_video (line 247) | def save_rollout_video(rollout_images: list[np.ndarray], output_dir: str... function resize_image (line 265) | def resize_image(img: np.ndarray, resize_size: tuple[int, int]) -> np.nd... function center_crop_image (line 298) | def center_crop_image(image: Image.Image) -> Image.Image: FILE: verl/experimental/vla/envs/isaac_env/isaac_env.py class IsaacEnv (line 34) | class IsaacEnv(gym.Env): method __init__ (line 35) | def __init__(self, cfg, rank, world_size): method _init_env (line 70) | def _init_env(self, task_id=0): method _init_metrics (line 116) | def _init_metrics(self): method _reset_metrics (line 120) | def _reset_metrics(self, env_idx=None): method _record_metrics (line 134) | def _record_metrics(self, step_reward, terminations, infos): method reset (line 151) | def reset(self, env_idx: Optional[int | list[int] | np.ndarray] = None... method step (line 163) | def step(self, actions=None, critic_values=None): method chunk_step (line 204) | def chunk_step(self, chunk_actions, chunk_values=None): method _calc_step_reward (line 241) | def _calc_step_reward(self, reward): method _wrap_obs (line 249) | def _wrap_obs(self, raw_obs): method _extract_image_and_state (line 258) | def _extract_image_and_state(self, obs): method add_new_frames (line 282) | def add_new_frames(self, obs, plot_infos): method flush_video (line 291) | def flush_video(self, video_sub_dir: Optional[str] = None): method close (line 303) | def close(self): method load_state (line 308) | def load_state(self, state_buffer: bytes): method get_state (line 311) | def get_state(self): method reset_envs_to_state_ids (line 314) | def reset_envs_to_state_ids(self, state_ids_list, task_ids_list): FILE: verl/experimental/vla/envs/libero_env/libero_env.py function patched_get_task_init_states (line 42) | def patched_get_task_init_states(self, i): class LiberoEnv (line 55) | class LiberoEnv(gym.Env): method __init__ (line 56) | def __init__(self, cfg, rank, world_size, stage_id: int = 0): method _compose_seed (line 89) | def _compose_seed(self, env_id: int, rollout_id: Optional[int] = None,... method elapsed_steps (line 103) | def elapsed_steps(self): method get_all_state_ids (line 106) | def get_all_state_ids(self): method _init_env (line 110) | def _init_env(self): method get_env_fns (line 114) | def get_env_fns(self): method get_env_fn_params (line 128) | def get_env_fn_params(self, env_idx=None): method _compute_total_num_group_envs (line 158) | def _compute_total_num_group_envs(self): method _init_task_and_trial_ids (line 169) | def _init_task_and_trial_ids(self): method _get_random_reset_state_ids (line 172) | def _get_random_reset_state_ids(self, num_reset_states): method get_reset_state_ids_all (line 176) | def get_reset_state_ids_all(self): method _get_ordered_reset_state_ids (line 185) | def _get_ordered_reset_state_ids(self, num_reset_states): method _get_task_and_trial_ids_from_reset_state_ids (line 193) | def _get_task_and_trial_ids_from_reset_state_ids(self, reset_state_ids): method _get_reset_states (line 214) | def _get_reset_states(self, env_idx): method _init_metrics (line 222) | def _init_metrics(self): method _reset_metrics (line 227) | def _reset_metrics(self, env_idx=None): method _record_metrics (line 243) | def _record_metrics(self, step_reward, terminations, infos): method _extract_image_and_state (line 254) | def _extract_image_and_state(self, obs): method _wrap_obs (line 267) | def _wrap_obs(self, obs_list): method _reconfigure (line 279) | def _reconfigure(self, reset_state_ids, env_idx): method reset (line 297) | def reset( method step (line 325) | def step(self, actions=None, critic_values=None): method chunk_step (line 363) | def chunk_step(self, chunk_actions, chunk_values=None): method _calc_step_reward (line 398) | def _calc_step_reward(self, terminations): method add_new_frames (line 408) | def add_new_frames(self, raw_obs, plot_infos): method flush_video (line 418) | def flush_video(self, video_sub_dir: Optional[str] = None): method reset_envs_to_state_ids (line 430) | def reset_envs_to_state_ids(self, state_ids_list, task_ids_list): method load_state (line 440) | def load_state(self, state_buffer: bytes): FILE: verl/experimental/vla/envs/libero_env/utils.py function get_libero_image (line 24) | def get_libero_image(obs: dict[str, np.ndarray]) -> np.ndarray: function get_libero_wrist_image (line 39) | def get_libero_wrist_image(obs: dict[str, np.ndarray]) -> np.ndarray: function quat2axisangle (line 54) | def quat2axisangle(quat: np.ndarray) -> np.ndarray: function normalize_gripper_action (line 81) | def normalize_gripper_action(action: np.ndarray, binarize: bool = True) ... function invert_gripper_action (line 112) | def invert_gripper_action(action: np.ndarray) -> np.ndarray: FILE: verl/experimental/vla/envs/libero_env/venv.py function _worker (line 35) | def _worker( class ReconfigureSubprocEnvWorker (line 121) | class ReconfigureSubprocEnvWorker(SubprocEnvWorker): method __init__ (line 122) | def __init__(self, env_fn: Callable[[], gym.Env], share_memory: bool =... method reconfigure_env_fn (line 143) | def reconfigure_env_fn(self, env_fn_param): class ReconfigureSubprocEnv (line 148) | class ReconfigureSubprocEnv(SubprocVectorEnv): method __init__ (line 149) | def __init__(self, env_fns: list[Callable[[], gym.Env]], **kwargs: Any... method reconfigure_env_fns (line 155) | def reconfigure_env_fns(self, env_fns, id=None): FILE: verl/experimental/vla/fsdp_workers.py class RobActorRolloutRefWorker (line 52) | class RobActorRolloutRefWorker(ActorRolloutRefWorker): method _build_rollout (line 60) | def _build_rollout(self, trust_remote_code=False): method switch_to_rollout (line 111) | def switch_to_rollout(self): method switch_to_train (line 117) | def switch_to_train(self): method rollout_mode (line 122) | async def rollout_mode(self): method trainer_mode (line 168) | async def trainer_mode(self): method generate_sequences (line 201) | def generate_sequences(self, prompts: DataProto): method init_model (line 240) | def init_model(self): FILE: verl/experimental/vla/main_ppo.py function calculate_reward (line 35) | def calculate_reward(data: DataProto, return_dict: bool = False) -> torc... function main (line 48) | def main(config): function main_task (line 84) | def main_task(config): FILE: verl/experimental/vla/main_sac.py function calculate_reward (line 36) | def calculate_reward(data: DataProto, return_dict: bool = False) -> torc... function main (line 46) | def main(config): function main_task (line 59) | def main_task(config): FILE: verl/experimental/vla/models/modules/mlp.py class MLP (line 19) | class MLP(nn.Module): method __init__ (line 36) | def __init__( method _get_activation (line 68) | def _get_activation(self, name: str): method init_weights (line 90) | def init_weights(self, m: nn.Module): method forward (line 122) | def forward(self, x): FILE: verl/experimental/vla/models/openvla_oft/configuration_prismatic.py class PrismaticConfig (line 88) | class PrismaticConfig(PretrainedConfig): method __init__ (line 92) | def __init__( class OpenVLAConfig (line 145) | class OpenVLAConfig(PrismaticConfig): method __init__ (line 148) | def __init__( FILE: verl/experimental/vla/models/openvla_oft/constants.py class NormalizationType (line 35) | class NormalizationType(str, Enum): function detect_robot_platform (line 67) | def detect_robot_platform(): FILE: verl/experimental/vla/models/openvla_oft/modeling_prismatic.py function unpack_tuple (line 61) | def unpack_tuple(fn: Callable[[Any], tuple[Any]]) -> Callable[[Any], Any]: function _ls_new_forward (line 72) | def _ls_new_forward(self, x: torch.Tensor) -> torch.Tensor: function ls_apply_patch (line 76) | def ls_apply_patch(ls_module: LayerScale): class PrismaticVisionBackbone (line 83) | class PrismaticVisionBackbone(nn.Module): method __init__ (line 91) | def __init__( method _create_featurizer (line 131) | def _create_featurizer(self, model_id: str, img_size: int, act_layer: ... method _patch_layer_scales (line 157) | def _patch_layer_scales(self) -> None: method get_num_patches (line 175) | def get_num_patches(self) -> int: method get_num_images_in_input (line 184) | def get_num_images_in_input(self) -> int: method set_num_images_in_input (line 193) | def set_num_images_in_input(self, num_images_in_input: int) -> None: method forward (line 202) | def forward(self, pixel_values: torch.Tensor) -> torch.Tensor: class PrismaticProjector (line 247) | class PrismaticProjector(nn.Module): method __init__ (line 248) | def __init__(self, use_fused_vision_backbone: bool, vision_dim: int, l... method forward (line 266) | def forward(self, img_patches: torch.Tensor) -> torch.Tensor: class PrismaticCausalLMOutputWithPast (line 283) | class PrismaticCausalLMOutputWithPast(ModelOutput): class PrismaticPreTrainedModel (line 296) | class PrismaticPreTrainedModel(PreTrainedModel): method _init_weights (line 305) | def _init_weights(self, module: nn.Module) -> None: method _supports_sdpa (line 328) | def _supports_sdpa(self) -> bool: class PrismaticForConditionalGeneration (line 333) | class PrismaticForConditionalGeneration(PrismaticPreTrainedModel): method __init__ (line 334) | def __init__(self, config: PrismaticConfig) -> None: method get_input_embeddings (line 379) | def get_input_embeddings(self) -> nn.Module: method set_input_embeddings (line 382) | def set_input_embeddings(self, value: nn.Module) -> None: method get_output_embeddings (line 385) | def get_output_embeddings(self) -> nn.Module: method set_output_embeddings (line 388) | def set_output_embeddings(self, new_embeddings: nn.Module) -> None: method get_decoder (line 391) | def get_decoder(self) -> nn.Module: method set_decoder (line 394) | def set_decoder(self, decoder: nn.Module) -> None: method tie_weights (line 397) | def tie_weights(self) -> None: method resize_token_embeddings (line 400) | def resize_token_embeddings( method _replace_input_embeddings (line 411) | def _replace_input_embeddings(self, input_embeddings, all_actions_mask... method _process_action_masks (line 447) | def _process_action_masks(self, labels): method _process_vision_features (line 454) | def _process_vision_features(self, pixel_values, language_embeddings=N... method _process_proprio_features (line 465) | def _process_proprio_features(self, projected_patch_embeddings, propri... method _build_multimodal_attention (line 477) | def _build_multimodal_attention(self, input_embeddings, projected_patc... method _build_multimodal_labels (line 502) | def _build_multimodal_labels(self, labels, projected_patch_embeddings): method prepare_inputs_for_generation (line 701) | def prepare_inputs_for_generation( method _reorder_cache (line 739) | def _reorder_cache(self, *args, **kwargs) -> Any: method _prepare_input_for_action_prediction_verl (line 742) | def _prepare_input_for_action_prediction_verl(self, input_ids, attenti... method _prepare_labels_for_action_prediction_verl (line 765) | def _prepare_labels_for_action_prediction_verl(self, labels, input_ids): method _verl_discrete_compute_logits (line 780) | def _verl_discrete_compute_logits( method forward (line 1091) | def forward( class OpenVLAForActionPrediction (line 1336) | class OpenVLAForActionPrediction(PrismaticForConditionalGeneration): method __init__ (line 1340) | def __init__(self, config: OpenVLAConfig) -> None: method _prepare_input_for_action_prediction (line 1351) | def _prepare_input_for_action_prediction(self, input_ids, attention_ma... method _prepare_labels_for_action_prediction (line 1374) | def _prepare_labels_for_action_prediction(self, labels, input_ids): method _unnormalize_actions (line 1389) | def _unnormalize_actions(self, normalized_actions, unnorm_key=None): method _run_diffusion_prediction (line 1410) | def _run_diffusion_prediction( method _regression_or_discrete_prediction (line 1496) | def _regression_or_discrete_prediction( method _verl_discrete_prediction (line 1563) | def _verl_discrete_prediction( method predict_action (line 1715) | def predict_action( method generate_action_verl (line 1833) | def generate_action_verl( method _check_unnorm_key (line 1976) | def _check_unnorm_key(norm_stats: dict[str, dict[str, Any]], unnorm_ke... method get_action_dim (line 1992) | def get_action_dim(self, unnorm_key: Optional[str] = None) -> int: method get_action_stats (line 1997) | def get_action_stats(self, unnorm_key: Optional[str] = None) -> dict[s... FILE: verl/experimental/vla/models/openvla_oft/processing_prismatic.py function letterbox_pad_transform (line 40) | def letterbox_pad_transform(image: Image.Image, padding_fill_value: tupl... class PrismaticImageProcessor (line 49) | class PrismaticImageProcessor(ImageProcessingMixin): method __init__ (line 52) | def __init__( method apply_transform (line 145) | def apply_transform(self, img: Image.Image) -> torch.Tensor: method preprocess (line 164) | def preprocess( method __call__ (line 186) | def __call__(self, images: Image.Image | list[Image.Image], **kwargs) ... class PrismaticProcessor (line 192) | class PrismaticProcessor(ProcessorMixin): method __init__ (line 197) | def __init__( method __call__ (line 204) | def __call__( method batch_decode (line 236) | def batch_decode( method decode (line 250) | def decode( method model_input_names (line 265) | def model_input_names(self) -> list[str]: FILE: verl/experimental/vla/models/openvla_oft/train_utils.py function get_current_action_mask (line 24) | def get_current_action_mask(token_ids): function get_next_actions_mask (line 41) | def get_next_actions_mask(token_ids): function compute_token_accuracy (line 58) | def compute_token_accuracy(predicted_token_ids, ground_truth_token_ids, ... function compute_actions_l1_loss (line 64) | def compute_actions_l1_loss(action_tokenizer, predicted_token_ids, groun... FILE: verl/experimental/vla/models/pi0_torch/configuration_pi0_torch.py class PI0TorchConfig (line 18) | class PI0TorchConfig(PretrainedConfig): method __init__ (line 21) | def __init__(self, **kwargs): FILE: verl/experimental/vla/models/pi0_torch/model/modeling_pi0.py function get_safe_dtype (line 30) | def get_safe_dtype(dtype: torch.dtype, device: str | torch.device) -> to... function create_sinusoidal_pos_embedding (line 40) | def create_sinusoidal_pos_embedding( function make_att_2d_masks (line 62) | def make_att_2d_masks(pad_masks: torch.Tensor, att_masks: torch.Tensor) ... class PI0Model (line 98) | class PI0Model(ModelMixin, ConfigMixin): method __init__ (line 124) | def __init__( method forward (line 161) | def forward( method sample_noise (line 209) | def sample_noise(self, shape: tuple[int, ...], device: torch.device | ... method embed_prefix (line 228) | def embed_prefix( method embed_suffix (line 304) | def embed_suffix( method sample_actions (line 384) | def sample_actions( method denoise_step (line 443) | def denoise_step( FILE: verl/experimental/vla/models/pi0_torch/model/paligemma_with_expert.py function get_transformers_siglip_vision_config (line 38) | def get_transformers_siglip_vision_config() -> SiglipVisionConfig: class GemmaRMSNorm (line 54) | class GemmaRMSNorm(nn.Module): method __init__ (line 55) | def __init__(self, dim: int, eps: float = 1e-6, use_ada_rms_norm: bool... method _norm (line 65) | def _norm(self, x): method forward (line 68) | def forward(self, x, cond: torch.Tensor | None = None): method extra_repr (line 82) | def extra_repr(self): class SiglipVisionTransformer (line 89) | class SiglipVisionTransformer(nn.Module): method __init__ (line 90) | def __init__(self, config: SiglipVisionConfig): method forward (line 105) | def forward( class PaliGemmaMultiModalProjector (line 150) | class PaliGemmaMultiModalProjector(nn.Module): method __init__ (line 151) | def __init__(self, vision_hidden_size: int = 1152, projection_dim: int... method forward (line 155) | def forward(self, image_features: torch.Tensor) -> torch.Tensor: class RoPEEmbedding (line 161) | class RoPEEmbedding(nn.Module): method __init__ (line 168) | def __init__(self, dim: int, max_wavelength: int = 10_000, max_seq_len... method forward (line 193) | def forward(self, x: torch.Tensor, positions: torch.LongTensor) -> tor... class GemmaAttentionWithExpert (line 223) | class GemmaAttentionWithExpert(nn.Module): method __init__ (line 224) | def __init__( method forward (line 300) | def forward( class GemmaMLP (line 414) | class GemmaMLP(nn.Module): method __init__ (line 415) | def __init__(self, hidden_size: int = 1024, intermediate_size: int = 4... method forward (line 424) | def forward(self, x: torch.Tensor) -> torch.Tensor: class GemmaDecoderLayerWithExpert (line 430) | class GemmaDecoderLayerWithExpert(nn.Module): method __init__ (line 431) | def __init__( method gated_residual (line 496) | def gated_residual(self, x, y, gate): method forward (line 503) | def forward( class PaliGemmaWithExpertModel (line 574) | class PaliGemmaWithExpertModel(nn.Module): method __init__ (line 575) | def __init__( method embed_image (line 654) | def embed_image(self, image: torch.Tensor) -> torch.Tensor: method embed_language_tokens (line 661) | def embed_language_tokens(self, tokens: torch.Tensor) -> torch.Tensor: method forward (line 665) | def forward( FILE: verl/experimental/vla/models/pi0_torch/modeling_pi0_torch.py function beta_schedule (line 43) | def beta_schedule(step, beta0, beta_min, T): class PI0ForActionPrediction (line 49) | class PI0ForActionPrediction(PreTrainedModel, SupportSACTraining): method __init__ (line 53) | def __init__(self, config: PI0TorchConfig): method _to (line 136) | def _to(self, device: torch.device | str): method forward (line 143) | def forward( method sample_actions (line 182) | def sample_actions( method from_pretrained (line 254) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... method freeze_vision_tower (line 272) | def freeze_vision_tower(self) -> None: method bc_loss (line 281) | def bc_loss( method _multi_heads_value (line 321) | def _multi_heads_value( method _cross_attention_pool_prefix (line 334) | def _cross_attention_pool_prefix( method _gaussian_log_prob (line 356) | def _gaussian_log_prob( method flow_sde_beta (line 366) | def flow_sde_beta(self) -> torch.Tensor: method _sample_actions_flow_sde (line 375) | def _sample_actions_flow_sde( method _build_kv_cache_from_prefix (line 460) | def _build_kv_cache_from_prefix( method sac_init (line 482) | def sac_init(self): method sac_forward_actor (line 494) | def sac_forward_actor( method sac_forward_critic (line 519) | def sac_forward_critic( method sac_get_critic_parameters (line 558) | def sac_get_critic_parameters(self) -> list[torch.nn.Parameter]: method sac_get_named_actor_parameters (line 564) | def sac_get_named_actor_parameters(self) -> list[tuple[str, torch.nn.P... method sac_forward_state_features (line 569) | def sac_forward_state_features( method sac_update_target_network (line 583) | def sac_update_target_network(self, tau: float): FILE: verl/experimental/vla/models/pi0_torch/pi0_utils.py class Normalize (line 26) | class Normalize: method __init__ (line 34) | def __init__(self, stats: dict[str, Any], *, use_quantiles: bool = Fal... method to (line 54) | def to(self, device: torch.device | str) -> None: method __call__ (line 62) | def __call__(self, x: torch.Tensor) -> torch.Tensor: class Unnormalize (line 72) | class Unnormalize: method __init__ (line 73) | def __init__(self, stats, *, use_quantiles: bool = False): method to (line 85) | def to(self, device: torch.device | str) -> None: method __call__ (line 93) | def __call__(self, x: torch.Tensor) -> torch.Tensor: class DeltaActions (line 103) | class DeltaActions: method __init__ (line 106) | def __init__(self): method to (line 110) | def to(self, device: torch.device | str) -> None: method __call__ (line 113) | def __call__(self, data: dict[str, Any]) -> dict[str, Any]: class AbsoluteActions (line 125) | class AbsoluteActions: method __init__ (line 128) | def __init__(self): method to (line 132) | def to(self, device: torch.device | str) -> None: method __call__ (line 135) | def __call__(self, data: dict[str, Any]) -> dict[str, Any]: class AlohaInputs (line 147) | class AlohaInputs: method __init__ (line 150) | def __init__(self, adapt_to_pi: bool = True) -> None: method to (line 154) | def to(self, device: torch.device | str) -> None: method _gripper_from_angular_inv (line 157) | def _gripper_from_angular_inv(self, value: torch.Tensor) -> torch.Tensor: method _gripper_to_angular (line 162) | def _gripper_to_angular(self, value: torch.Tensor) -> torch.Tensor: method _encode_actions_inv (line 184) | def _encode_actions_inv(self, actions: torch.Tensor) -> torch.Tensor: method _decode_state (line 190) | def _decode_state(self, state: torch.Tensor) -> torch.Tensor: method _decode_aloha (line 198) | def _decode_aloha(self, state: torch.Tensor) -> torch.Tensor: method __call__ (line 204) | def __call__(self, data: dict[str, Any]) -> dict[str, Any]: method _encode_actions_inv_batch (line 218) | def _encode_actions_inv_batch(self, actions: torch.Tensor) -> torch.Te... method _decode_state_batch (line 224) | def _decode_state_batch(self, state: torch.Tensor) -> torch.Tensor: method call_batch (line 230) | def call_batch(self, data: dict[str, Any]) -> dict[str, Any]: class AlohaOutputs (line 240) | class AlohaOutputs: method __init__ (line 243) | def __init__(self, original_action_dim: int, adapt_to_pi: bool = True): method to (line 255) | def to(self, device: torch.device | str) -> None: method _gripper_from_angular (line 258) | def _gripper_from_angular(self, value: torch.Tensor) -> torch.Tensor: method _encode_actions (line 270) | def _encode_actions(self, actions: torch.Tensor) -> torch.Tensor: method __call__ (line 277) | def __call__(self, data: dict[str, Any]) -> dict[str, Any]: method _encode_actions_batch (line 283) | def _encode_actions_batch(self, actions: torch.Tensor) -> torch.Tensor: method call_batch (line 289) | def call_batch(self, data: dict[str, Any]) -> dict[str, Any]: class PadStatesAndActions (line 294) | class PadStatesAndActions: method __init__ (line 297) | def __init__(self, action_dim: int) -> None: method _pad_to_dim (line 300) | def _pad_to_dim(self, x: torch.Tensor, target_dim: int, axis: int = -1... method __call__ (line 312) | def __call__(self, data: dict[str, Any]) -> dict[str, Any]: function _normalize (line 319) | def _normalize(x: torch.Tensor, min_val: float, max_val: float) -> torch... function _unnormalize (line 323) | def _unnormalize(x: torch.Tensor, min_val: float, max_val: float) -> tor... function resize_with_pad (line 327) | def resize_with_pad(img: torch.Tensor, width: int, height: int, pad_valu... class ImageTransform (line 366) | class ImageTransform: method __init__ (line 367) | def __init__( method __call__ (line 397) | def __call__(self, data: dict[str, torch.Tensor]) -> tuple[list[torch.... method call_batch (line 437) | def call_batch(self, data: dict[str, torch.Tensor]) -> tuple[list[torc... class PromptTokenizerTransform (line 483) | class PromptTokenizerTransform: method __init__ (line 484) | def __init__(self, max_length: int, discrete_state_input: bool = False... method __call__ (line 489) | def __call__(self, data: dict[str, Any], tokenizer) -> tuple[torch.Ten... method call_batch (line 528) | def call_batch(self, data: dict[str, Any], tokenizer) -> tuple[torch.T... FILE: verl/experimental/vla/models/pi0_torch/policy/base.py class Pi0Input (line 20) | class Pi0Input(ABC): method __init__ (line 21) | def __init__(self): method from_env_obs (line 42) | def from_env_obs(cls, env_obs) -> "Pi0Input": ... class Pi0Output (line 45) | class Pi0Output: method __init__ (line 46) | def __init__(self): method from_model_output (line 51) | def from_model_output(cls, model_output) -> "Pi0Output": ... FILE: verl/experimental/vla/models/pi0_torch/policy/libero_policy.py class LiberoPi0Input (line 27) | class LiberoPi0Input(Pi0Input): method from_env_obs (line 30) | def from_env_obs(cls, env_obs: DataProto) -> "LiberoPi0Input": class LiberoPi0Output (line 68) | class LiberoPi0Output(Pi0Output): method from_model_output (line 71) | def from_model_output(cls, model_output: dict) -> "LiberoPi0Output": FILE: verl/experimental/vla/models/register_vla_models.py function register_openvla_oft (line 34) | def register_openvla_oft() -> None: function register_pi0_torch_model (line 47) | def register_pi0_torch_model() -> None: function register_vla_models (line 58) | def register_vla_models() -> None: FILE: verl/experimental/vla/naive_rollout_rob.py function pad_sequence_to_length (line 45) | def pad_sequence_to_length(tensors, max_seq_len, pad_token_id, left_pad=... function process_input (line 58) | def process_input(task_descriptions, images_and_states, processor): class NaiveRolloutRob (line 112) | class NaiveRolloutRob(BaseRollout): method __init__ (line 113) | def __init__( method _generate_one_step (line 136) | def _generate_one_step(self, prompts: dict, do_sample, temperature, ma... method generate_sequences (line 181) | def generate_sequences(self, prompts: DataProto) -> DataProto: method update_weights (line 197) | async def update_weights(self, weights_iterator, **kwargs): method release (line 214) | async def release(self): method resume (line 221) | async def resume(self, **kwargs): FILE: verl/experimental/vla/prepare_libero_dataset.py function patched_get_task_init_states (line 29) | def patched_get_task_init_states(self, i): function compute_total_num_group_envs (line 42) | def compute_total_num_group_envs(task_suite: Benchmark): function build_dataset_for_suite (line 55) | def build_dataset_for_suite(task_suite_name: str, local_save_dir: str): function resolve_task_suites (line 160) | def resolve_task_suites(task_suite_name: str) -> list[str]: FILE: verl/experimental/vla/rob_ray_trainer.py function compute_response_mask (line 51) | def compute_response_mask(config, data: DataProto) -> torch.Tensor: function flatten_trajectories (line 85) | def flatten_trajectories(data: DataProto) -> DataProto: class RobRayPPOTrainer (line 105) | class RobRayPPOTrainer(RayPPOTrainer): method _start_profiling (line 113) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 119) | def _stop_profiling(self, do_profile: bool) -> None: method init_workers (line 125) | def init_workers(self): method _get_gen_batch (line 195) | def _get_gen_batch(self, batch: DataProto) -> DataProto: method _reset_envs (line 206) | def _reset_envs(self, gen_batch: DataProto) -> asyncio.Future: method fit (line 213) | def fit(self): method _validate (line 561) | def _validate(self): FILE: verl/experimental/vla/sac/base.py class SupportSACTraining (line 23) | class SupportSACTraining: method sac_init (line 39) | def sac_init(self): method sac_get_critic_parameters (line 42) | def sac_get_critic_parameters(self) -> list[torch.nn.Parameter]: method sac_get_named_actor_parameters (line 51) | def sac_get_named_actor_parameters(self) -> list[tuple[str, torch.nn.P... method sac_forward_critic (line 60) | def sac_forward_critic( method sac_forward_actor (line 85) | def sac_forward_actor( method sac_forward_state_features (line 106) | def sac_forward_state_features(self, s: dict[str, torch.Tensor]) -> Any: method bc_loss (line 122) | def bc_loss( method sac_update_target_network (line 132) | def sac_update_target_network(self, tau: float): class BaseSACActor (line 142) | class BaseSACActor(ABC): method update_policy (line 144) | def update_policy(self, data: DataProto) -> dict: FILE: verl/experimental/vla/sac/naive_rollout_pi05.py class PI0RolloutRob (line 37) | class PI0RolloutRob(NaiveRolloutRob): method __init__ (line 38) | def __init__( method generate_sequences (line 55) | def generate_sequences(self, prompts: DataProto) -> DataProto: FILE: verl/experimental/vla/sac/replay_pool.py class _DualPoolState (line 28) | class _DualPoolState: class SACReplayPool (line 37) | class SACReplayPool: method __init__ (line 47) | def __init__( method add_batch (line 65) | def add_batch(self, batch: TensorDict, task_ids: Sequence[Any]): method sample_batch (line 110) | def sample_batch( method insert_and_resample (line 193) | def insert_and_resample( method save (line 203) | def save(self, directory: str): method load (line 242) | def load(self, directory: str): method from_path (line 275) | def from_path( method _insert_block_to_pool (line 299) | def _insert_block_to_pool( method _get_or_create_task_pool (line 331) | def _get_or_create_task_pool(self, task_id: str, sample: TensorDict) -... method _extract_positive_mask (line 361) | def _extract_positive_mask(self, batch: TensorDict) -> torch.Tensor: method _pad_sampled_batch (line 367) | def _pad_sampled_batch(self, sampled_batch: TensorDict, target_batch_s... method _index_select_batch (line 389) | def _index_select_batch(self, batch: TensorDict, idx: torch.Tensor) ->... method _sample_from_task_pools (line 397) | def _sample_from_task_pools(self, batch_size: int, is_positive_pool: b... method _sample_from_single_task_pool (line 421) | def _sample_from_single_task_pool( method _allocate_counts_across_tasks (line 438) | def _allocate_counts_across_tasks(self, task_sizes: dict[str, int], to... method _refresh_global_stats (line 462) | def _refresh_global_stats(self): method _normalize_task_id (line 467) | def _normalize_task_id(self, task_id: Any) -> str: method __repr__ (line 472) | def __repr__(self): method __len__ (line 479) | def __len__(self): FILE: verl/experimental/vla/sac/sac_actor.py function get_dict_from_prefix (line 39) | def get_dict_from_prefix(tensordict: TensorDict, prefix: str) -> dict: function merge_nested_dicts_or_tuples (line 60) | def merge_nested_dicts_or_tuples(a: dict | tuple, b: dict | tuple) -> di... function split_nested_dicts_or_tuples (line 79) | def split_nested_dicts_or_tuples(data: dict | tuple, split_num: int) -> ... function valid_mean (line 103) | def valid_mean(x: torch.Tensor, valid: torch.Tensor) -> torch.Tensor: class RobDataParallelSACActor (line 119) | class RobDataParallelSACActor(BaseSACActor): method __init__ (line 120) | def __init__( method _init_critic (line 152) | def _init_critic(self): method _init_alpha (line 162) | def _init_alpha(self): method _init_actor_ema (line 189) | def _init_actor_ema(self): method _update_actor_ema (line 205) | def _update_actor_ema(self): method _apply_actor_ema_to_actor_module (line 215) | def _apply_actor_ema_to_actor_module(self): method _get_alpha (line 223) | def _get_alpha(self) -> torch.Tensor: method _calculate_actor_loss (line 234) | def _calculate_actor_loss( method _calculate_alpha_loss (line 260) | def _calculate_alpha_loss(self, log_probs: Optional[torch.Tensor], val... method _calculate_critic_loss (line 278) | def _calculate_critic_loss( method _forward_critic (line 317) | def _forward_critic( method _forward_actor (line 364) | def _forward_actor( method _force_set_lr (line 402) | def _force_set_lr(self, opt: torch.optim.Optimizer, lr: float): method update_policy (line 407) | def update_policy(self, data: DataProto): method _optimizer_step (line 614) | def _optimizer_step(self) -> torch.Tensor: FILE: verl/experimental/vla/sac/sac_ray_trainer.py function compute_avg_positive_trajectory_length (line 34) | def compute_avg_positive_trajectory_length(batch: DataProto) -> float: function flatten_trajectories (line 49) | def flatten_trajectories(data: DataProto) -> DataProto: function add_transition_prefixes (line 66) | def add_transition_prefixes(data: DataProto) -> DataProto: class RobRaySACTrainer (line 103) | class RobRaySACTrainer(RayPPOTrainer): method _start_profiling (line 104) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 110) | def _stop_profiling(self, do_profile: bool) -> None: method init_workers (line 116) | def init_workers(self): method _get_gen_batch (line 186) | def _get_gen_batch(self, batch: DataProto) -> DataProto: method _reset_envs (line 197) | def _reset_envs(self, gen_batch: DataProto) -> asyncio.Future: method _next_rollout_batch (line 204) | def _next_rollout_batch(self, train_iter) -> Optional[DataProto]: method _prepare_actor_input (line 218) | def _prepare_actor_input(self, rollout_output: Optional[DataProto]) ->... method fit (line 257) | def fit(self): method _validate (line 462) | def _validate(self) -> dict: FILE: verl/experimental/vla/workers/env/env_loop_wg_test.py function restructure_data_proto (line 95) | def restructure_data_proto(data_proto: DataProto) -> list[DataProto]: function run (line 134) | async def run(): FILE: verl/experimental/vla/workers/env/env_manager.py function cleanup_device_tensors (line 30) | def cleanup_device_tensors(): function get_gpu_numa_node (line 35) | def get_gpu_numa_node(gpu_id: int) -> int: function get_numa_cpus (line 87) | def get_numa_cpus(numa_node: int) -> list: function set_process_numa_affinity (line 111) | def set_process_numa_affinity(gpu_id: int) -> None: function recursive_to_own (line 134) | def recursive_to_own(obj): class EnvManager (line 147) | class EnvManager: method __init__ (line 148) | def __init__(self, cfg, rank, world_size, env_cls, stage_id: int = 0): method start_simulator (line 160) | def start_simulator(self): method stop_simulator (line 193) | def stop_simulator(self): method __getattr__ (line 220) | def __getattr__(self, name): method get_all_state_ids (line 251) | def get_all_state_ids(self): method reset_envs_to_state_ids (line 263) | def reset_envs_to_state_ids(self, state_ids_list, task_ids_list): method __setattr__ (line 285) | def __setattr__(self, name, value): function _simulator_worker (line 320) | def _simulator_worker( FILE: verl/experimental/vla/workers/env/env_worker.py function put_tensor_cpu (line 34) | def put_tensor_cpu(data_dict): function create_env_batch (line 43) | def create_env_batch(obs, rews, dones, infos, meta=None): function create_env_batch_dataproto (line 52) | def create_env_batch_dataproto(obs, rews, terminations, truncations, inf... class EnvWorker (line 72) | class EnvWorker(Worker, DistProfilerExtension): method __init__ (line 73) | def __init__(self, config: DictConfig): method init_worker (line 105) | def init_worker(self): method init_simulator (line 138) | def init_simulator(self): method env_interact_step (line 145) | def env_interact_step(self, data: DataProto) -> dict: method get_all_state_ids (line 186) | def get_all_state_ids(self): method reset_envs_to_state_ids (line 193) | def reset_envs_to_state_ids(self, data: DataProto): method finish_rollout (line 244) | def finish_rollout(self, mode="train"): FILE: verl/interactions/base.py class BaseInteraction (line 20) | class BaseInteraction: method __init__ (line 21) | def __init__(self, config: dict[str, Any]): method start_interaction (line 25) | async def start_interaction(self, instance_id: Optional[str] = None, *... method generate_response (line 39) | async def generate_response( method calculate_score (line 56) | async def calculate_score(self) -> float: # More clear score calculat... method finalize_interaction (line 66) | async def finalize_interaction(self) -> None: # More clear interactio... FILE: verl/interactions/gsm8k_interaction.py class Gsm8kInteraction (line 30) | class Gsm8kInteraction(BaseInteraction): method __init__ (line 39) | def __init__(self, config: dict): method start_interaction (line 43) | async def start_interaction( method generate_response (line 55) | async def generate_response( method calculate_score (line 77) | async def calculate_score(self, instance_id: str, **kwargs) -> float: method finalize_interaction (line 86) | async def finalize_interaction(self, instance_id: str, **kwargs) -> None: FILE: verl/interactions/utils/interaction_registry.py function get_interaction_class (line 27) | def get_interaction_class(cls_name): function initialize_interactions_from_config (line 42) | def initialize_interactions_from_config(interaction_config_file): FILE: verl/interactions/weather_interaction.py class WeatherInteraction (line 26) | class WeatherInteraction(BaseInteraction): method __init__ (line 35) | def __init__(self, config: dict): method start_interaction (line 39) | async def start_interaction( method generate_response (line 51) | async def generate_response( method calculate_score (line 71) | async def calculate_score(self, instance_id: str, **kwargs) -> float: method finalize_interaction (line 78) | async def finalize_interaction(self, instance_id: str, **kwargs) -> None: FILE: verl/model_merger/__main__.py function main (line 52) | def main(): FILE: verl/model_merger/base_model_merger.py function parse_args (line 37) | def parse_args(): class ModelMergerConfig (line 87) | class ModelMergerConfig: method __post_init__ (line 122) | def __post_init__(self): function generate_config_from_args (line 130) | def generate_config_from_args(args: argparse.Namespace) -> ModelMergerCo... class BaseModelMerger (line 165) | class BaseModelMerger(ABC): method __init__ (line 187) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 194) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 223) | def patch_model_generation_config(self, model): method _load_lora_train_meta (line 240) | def _load_lora_train_meta(self) -> Optional[dict[str, object]]: method save_lora_adapter (line 281) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 372) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 399) | def upload_to_huggingface(self): method merge_and_save (line 437) | def merge_and_save(self): method cleanup (line 441) | def cleanup(self): FILE: verl/model_merger/fsdp_model_merger.py class FSDPModelMerger (line 35) | class FSDPModelMerger(BaseModelMerger): method _get_world_size (line 68) | def _get_world_size(self) -> int: method _load_rank_zero_state_dict (line 89) | def _load_rank_zero_state_dict(self, world_size: int) -> dict: method _extract_device_mesh_info (line 96) | def _extract_device_mesh_info(self, state_dict: dict, world_size: int)... method _calculate_shard_configuration (line 116) | def _calculate_shard_configuration( method _merge_by_placement (line 132) | def _merge_by_placement(self, tensors: list[torch.Tensor], placement: ... method _load_and_merge_state_dicts (line 143) | def _load_and_merge_state_dicts( method merge_and_save (line 206) | def merge_and_save(self): method _validate_state_dict (line 229) | def _validate_state_dict(self, state_dict: dict[str, torch.Tensor]): method cleanup (line 262) | def cleanup(self): FILE: verl/model_merger/megatron_model_merger.py function noop_context (line 53) | def noop_context() -> Any: function get_dynamic_pipeline_shards (line 57) | def get_dynamic_pipeline_shards(layer_num: int, pp_size: int) -> list[int]: class MegatronModelMerger (line 101) | class MegatronModelMerger(BaseModelMerger): method __init__ (line 143) | def __init__(self, config: ModelMergerConfig): method _load_state_dicts (line 220) | def _load_state_dicts(self, model_ckpt_path: str) -> dict[str, Any]: method _check_megatron_state_key (line 288) | def _check_megatron_state_key(self, key: str) -> bool: method _split_tensors (line 313) | def _split_tensors( method _merge_state_dicts (line 358) | def _merge_state_dicts(self, model_state_dict_list: list[dict[str, Any... method save_hf_model_and_tokenizer (line 422) | def save_hf_model_and_tokenizer(self, merged_state_dict): method merge_and_save (line 491) | def merge_and_save(self): method _validate_state_dict (line 511) | def _validate_state_dict(self, state_dict: dict[str, torch.Tensor]): method _replace_name (line 533) | def _replace_name(self, megatron_name: str, name_mapping: dict[str, st... method cleanup (line 545) | def cleanup(self): FILE: verl/models/llama/megatron/checkpoint_utils/llama_loader.py function _megatron_calc_layer_map (line 23) | def _megatron_calc_layer_map(config): function load_state_dict_to_megatron_llama (line 55) | def load_state_dict_to_megatron_llama( FILE: verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py function _megatron_calc_layer_map (line 23) | def _megatron_calc_layer_map(config): function load_state_dict_to_megatron_llama (line 55) | def load_state_dict_to_megatron_llama( FILE: verl/models/llama/megatron/checkpoint_utils/llama_saver.py function _megatron_calc_global_rank (line 29) | def _megatron_calc_global_rank(tp_rank: int = 0, dp_rank: int = 0, pp_ra... function _megatron_calc_layer_map (line 42) | def _megatron_calc_layer_map(config): function merge_megatron_ckpt_llama (line 72) | def merge_megatron_ckpt_llama(wrapped_models, config, dtype, is_value_mo... FILE: verl/models/llama/megatron/layers/parallel_attention.py class LlamaRotaryEmbedding (line 38) | class LlamaRotaryEmbedding(nn.Module): method __init__ (line 39) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 53) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 63) | def forward(self, x, seq_len=None): class LlamaLinearScalingRotaryEmbedding (line 74) | class LlamaLinearScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 77) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 81) | def _set_cos_sin_cache(self, seq_len, device, dtype): class LlamaDynamicNTKScalingRotaryEmbedding (line 93) | class LlamaDynamicNTKScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 96) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 100) | def _set_cos_sin_cache(self, seq_len, device, dtype): class LlamaLlama3ScalingRotaryEmbedding (line 119) | class LlamaLlama3ScalingRotaryEmbedding(LlamaRotaryEmbedding): method __init__ (line 120) | def __init__(self, dim, config, max_position_embeddings=2048, base=100... function rotate_half (line 152) | def rotate_half(x): function apply_rotary_pos_emb (line 159) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): function repeat_kv (line 167) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class ParallelLlamaAttention (line 179) | class ParallelLlamaAttention(nn.Module): method __init__ (line 182) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method _init_rope (line 250) | def _init_rope(self): method _shape (line 285) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 288) | def forward( function apply_rotary_pos_emb_rmpad (line 352) | def apply_rotary_pos_emb_rmpad(q, k, cos, sin, position_ids, indices, se... function apply_rotary_pos_emb_rmpad_flash (line 370) | def apply_rotary_pos_emb_rmpad_flash(q, k, cos, sin, cu_seqlens, max_seq... class ParallelLlamaAttentionRmPad (line 380) | class ParallelLlamaAttentionRmPad(ParallelLlamaAttention): method forward (line 381) | def forward( FILE: verl/models/llama/megatron/layers/parallel_decoder.py class ParallelLlamaDecoderLayer (line 35) | class ParallelLlamaDecoderLayer(nn.Module): method __init__ (line 36) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 47) | def forward( class ParallelLlamaDecoderLayerRmPad (line 102) | class ParallelLlamaDecoderLayerRmPad(nn.Module): method __init__ (line 103) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 114) | def forward( FILE: verl/models/llama/megatron/layers/parallel_linear.py class QKVParallelLinear (line 20) | class QKVParallelLinear(tensor_parallel.ColumnParallelLinear): method __init__ (line 21) | def __init__( class MergedColumnParallelLinear (line 54) | class MergedColumnParallelLinear(tensor_parallel.ColumnParallelLinear): method __init__ (line 55) | def __init__( class LinearForLastLayer (line 82) | class LinearForLastLayer(torch.nn.Linear): method __init__ (line 83) | def __init__( method forward (line 96) | def forward( FILE: verl/models/llama/megatron/layers/parallel_mlp.py class ParallelLlamaMLP (line 30) | class ParallelLlamaMLP(nn.Module): method __init__ (line 31) | def __init__(self, config, megatron_config: ModelParallelConfig = None... method forward (line 71) | def forward(self, x): FILE: verl/models/llama/megatron/layers/parallel_rmsnorm.py class ParallelLlamaRMSNorm (line 25) | class ParallelLlamaRMSNorm(nn.Module): method __init__ (line 26) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 40) | def forward(self, hidden_states): FILE: verl/models/llama/megatron/modeling_llama_megatron.py function _make_causal_mask (line 47) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, d... function _expand_mask (line 60) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class ParallelLlamaModel (line 74) | class ParallelLlamaModel(nn.Module): method __init__ (line 82) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method _prepare_decoder_attention_mask (line 101) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 123) | def forward( class ParallelLlamaForCausalLM (line 161) | class ParallelLlamaForCausalLM(nn.Module): method __init__ (line 162) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 182) | def forward( class ParallelLlamaModelRmPad (line 223) | class ParallelLlamaModelRmPad(nn.Module): method __init__ (line 231) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 250) | def forward( class ParallelLlamaForCausalLMRmPad (line 293) | class ParallelLlamaForCausalLMRmPad(nn.Module): method __init__ (line 294) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method _init_head (line 302) | def _init_head(self, config): method _forward_head (line 316) | def _forward_head(self, hidden_states): method forward (line 323) | def forward( class ParallelLlamaForValueRmPad (line 385) | class ParallelLlamaForValueRmPad(ParallelLlamaForCausalLMRmPad): method _init_head (line 386) | def _init_head(self, config): method _forward_head (line 395) | def _forward_head(self, hidden_states): method forward (line 402) | def forward( class ParallelLlamaModelRmPadPP (line 418) | class ParallelLlamaModelRmPadPP(nn.Module): method __init__ (line 428) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method set_input_tensor (line 472) | def set_input_tensor(self, input_tensor): method forward (line 482) | def forward( class ParallelLlamaForCausalLMRmPadPP (line 533) | class ParallelLlamaForCausalLMRmPadPP(nn.Module): method __init__ (line 534) | def __init__( method set_input_tensor (line 558) | def set_input_tensor(self, input_tensor): method _init_head (line 569) | def _init_head(self, config): method _forward_head (line 583) | def _forward_head(self, hidden_states): method forward (line 591) | def forward( class ParallelLlamaForValueRmPadPP (line 659) | class ParallelLlamaForValueRmPadPP(ParallelLlamaForCausalLMRmPadPP): method _init_head (line 660) | def _init_head(self, config): method _forward_head (line 669) | def _forward_head(self, hidden_states): method forward (line 676) | def forward( FILE: verl/models/mcore/bridge.py function _ensure_model_list (line 31) | def _ensure_model_list(model): class LinearForLastLayer (line 35) | class LinearForLastLayer(torch.nn.Linear): method __init__ (line 46) | def __init__( method forward (line 66) | def forward( function make_value_model (line 97) | def make_value_model(hidden_size, sequence_parallel): function freeze_moe_router (line 138) | def freeze_moe_router(model): FILE: verl/models/mcore/config_converter.py function _get_base_transformer_config (line 32) | def _get_base_transformer_config( function _get_mla_transformer_config (line 99) | def _get_mla_transformer_config( function check_and_construct_configs (line 137) | def check_and_construct_configs(original_config: dict, cls: type[T]) -> T: function hf_to_mcore_config_dense (line 165) | def hf_to_mcore_config_dense( function hf_to_mcore_config_qwen2moe (line 185) | def hf_to_mcore_config_qwen2moe( function hf_to_mcore_config_mixtral (line 219) | def hf_to_mcore_config_mixtral( function hf_to_mcore_config_qwen3moe (line 252) | def hf_to_mcore_config_qwen3moe( function hf_to_mcore_config_dpskv3 (line 284) | def hf_to_mcore_config_dpskv3( function hf_to_mcore_config_qwen2_5_vl (line 368) | def hf_to_mcore_config_qwen2_5_vl( function hf_to_mcore_config_llama4 (line 387) | def hf_to_mcore_config_llama4( function mapping_string_to_attn_backend (line 394) | def mapping_string_to_attn_backend(args: dict) -> dict: FILE: verl/models/mcore/loader.py function _megatron_calc_layer_map (line 26) | def _megatron_calc_layer_map(config): function load_state_dict_to_megatron_gptmodel (line 56) | def load_state_dict_to_megatron_gptmodel(state_dict, wrapped_models, con... FILE: verl/models/mcore/model_forward.py function model_forward_gen (line 35) | def model_forward_gen(vision_model: bool = False): function _convert_to_nested_tensor (line 178) | def _convert_to_nested_tensor(v, input_ids_lengths): function gptmodel_forward_no_padding (line 210) | def gptmodel_forward_no_padding( FILE: verl/models/mcore/model_forward_1f1b_overlap.py function gptmodel_forward_1f1b_overlap (line 33) | def gptmodel_forward_1f1b_overlap( FILE: verl/models/mcore/model_forward_fused.py function _get_patching_model (line 40) | def _get_patching_model(model: torch.nn.Module): function patch_fused_forward (line 52) | def patch_fused_forward(model: torch.nn.Module): function unpatch_fused_forward (line 62) | def unpatch_fused_forward(model: torch.nn.Module): function fused_forward_model_gen (line 68) | def fused_forward_model_gen(vision_model: bool = False): function fused_forward_no_padding_gen (line 140) | def fused_forward_no_padding_gen(vision_model: bool = False): function _fused_GPTModel_forward (line 220) | def _fused_GPTModel_forward( FILE: verl/models/mcore/model_initializer.py class BaseModelInitializer (line 27) | class BaseModelInitializer(ABC): method __init__ (line 30) | def __init__(self, tfconfig: TransformerConfig, hf_config: PretrainedC... method get_transformer_layer_spec (line 36) | def get_transformer_layer_spec(self, vp_stage=None): method get_rope_scaling_args (line 41) | def get_rope_scaling_args(self) -> dict: method initialize (line 50) | def initialize( class DenseModel (line 99) | class DenseModel(BaseModelInitializer): method get_transformer_layer_spec (line 102) | def get_transformer_layer_spec(self, vp_stage=None): class Qwen2MoEModel (line 108) | class Qwen2MoEModel(BaseModelInitializer): method get_transformer_layer_spec (line 111) | def get_transformer_layer_spec(self, vp_stage=None): method initialize (line 122) | def initialize(self, **kwargs): class MixtralModel (line 132) | class MixtralModel(BaseModelInitializer): method get_transformer_layer_spec (line 135) | def get_transformer_layer_spec(self, vp_stage=None): method initialize (line 141) | def initialize(self, **kwargs): class Qwen3MoEModel (line 150) | class Qwen3MoEModel(BaseModelInitializer): method get_transformer_layer_spec (line 153) | def get_transformer_layer_spec(self, vp_stage=None): method initialize (line 159) | def initialize(self, **kwargs): class DeepseekV3Model (line 169) | class DeepseekV3Model(BaseModelInitializer): method get_transformer_layer_spec (line 172) | def get_transformer_layer_spec(self, vp_stage=None): method get_rope_scaling_args (line 177) | def get_rope_scaling_args(self) -> dict: method initialize (line 182) | def initialize( class Qwen25VLModel (line 206) | class Qwen25VLModel(BaseModelInitializer): method get_transformer_layer_spec (line 209) | def get_transformer_layer_spec(self, vp_stage=None): method initialize (line 214) | def initialize( FILE: verl/models/mcore/mtp_patch.py function _get_patching_model (line 35) | def _get_patching_model(model: torch.nn.Module): function patch_postprocess (line 47) | def patch_postprocess(model: torch.nn.Module): function unpatch_postprocess (line 54) | def unpatch_postprocess(model: torch.nn.Module): function _megatron_gptmodel_postprocess (line 62) | def _megatron_gptmodel_postprocess( function patch_mtp_layer_get_embeddings (line 172) | def patch_mtp_layer_get_embeddings(model: torch.nn.Module): function unpatch_mtp_layer_get_embeddings (line 205) | def unpatch_mtp_layer_get_embeddings(model: torch.nn.Module): function _patched_get_embeddings_for_detach (line 241) | def _patched_get_embeddings_for_detach( FILE: verl/models/mcore/patch.py function apply_patch (line 20) | def apply_patch(): function apply_patch_mbridge (line 358) | def apply_patch_mbridge(): function apply_patch_megatron_v012_with_torch_v28 (line 388) | def apply_patch_megatron_v012_with_torch_v28(): FILE: verl/models/mcore/qwen2_5_vl/attention.py class Qwen2_5VLSelfAttention (line 22) | class Qwen2_5VLSelfAttention(SelfAttention): method forward (line 28) | def forward( FILE: verl/models/mcore/qwen2_5_vl/model.py class Qwen2_5VLModel (line 37) | class Qwen2_5VLModel(MegatronModule): method __init__ (line 76) | def __init__( method shared_embedding_or_output_weight (line 154) | def shared_embedding_or_output_weight(self): method set_input_tensor (line 161) | def set_input_tensor(self, input_tensor) -> None: method freeze (line 173) | def freeze(self, freeze_language_model: bool, freeze_vision_model: boo... method forward (line 195) | def forward( FILE: verl/models/mcore/qwen2_5_vl/rope_utils.py function get_rope_index (line 32) | def get_rope_index( function apply_rotary_pos_emb_thd_absolute (line 222) | def apply_rotary_pos_emb_thd_absolute( function apply_rotary_pos_emb_absolute (line 239) | def apply_rotary_pos_emb_absolute( FILE: verl/models/mcore/qwen2_5_vl/vision_config.py function get_vision_model_config (line 22) | def get_vision_model_config(config: TransformerConfig) -> TransformerCon... function get_vision_projection_config (line 68) | def get_vision_projection_config( FILE: verl/models/mcore/qwen2_5_vl/vision_model.py class PatchEmbed (line 34) | class PatchEmbed(nn.Module): method __init__ (line 35) | def __init__( method forward (line 51) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: class VisionRotaryEmbedding (line 61) | class VisionRotaryEmbedding(nn.Module): method __init__ (line 62) | def __init__(self, dim: int, theta: float = 10000.0) -> None: method forward (line 67) | def forward(self, seqlen: int) -> torch.Tensor: class Qwen2_5VisionModel (line 73) | class Qwen2_5VisionModel(VisionModule): method __init__ (line 87) | def __init__( method set_input_tensor (line 151) | def set_input_tensor(self, input_tensor: torch.Tensor) -> None: method rot_pos_emb (line 162) | def rot_pos_emb(self, grid_thw): method get_window_index (line 191) | def get_window_index(self, grid_thw): method forward (line 232) | def forward( method build_packed_seq_params (line 289) | def build_packed_seq_params( FILE: verl/models/mcore/qwen2_5_vl/vision_transformer_block.py class Qwen2_5VisionTransformerBlock (line 21) | class Qwen2_5VisionTransformerBlock(TransformerBlock): method _checkpointed_forward (line 22) | def _checkpointed_forward( method forward (line 120) | def forward( FILE: verl/models/mcore/registry.py class SupportedVLM (line 29) | class SupportedVLM(Enum): function get_mcore_forward_fn (line 40) | def get_mcore_forward_fn(hf_config) -> Callable: function get_mcore_forward_no_padding_fn (line 52) | def get_mcore_forward_no_padding_fn(hf_config) -> Callable: function get_mcore_forward_fused_fn (line 60) | def get_mcore_forward_fused_fn(hf_config) -> Callable: function get_mcore_forward_fused_no_padding_fn (line 72) | def get_mcore_forward_fused_no_padding_fn(hf_config) -> Callable: class SupportedModel (line 120) | class SupportedModel(Enum): function get_supported_model (line 242) | def get_supported_model(model_type: str) -> SupportedModel: function hf_to_mcore_config (line 252) | def hf_to_mcore_config( function init_mcore_model (line 270) | def init_mcore_model( function get_mcore_weight_converter (line 308) | def get_mcore_weight_converter(hf_config: PretrainedConfig, dtype: torch... FILE: verl/models/mcore/saver.py function _megatron_calc_global_rank (line 30) | def _megatron_calc_global_rank( function _megatron_calc_layer_map (line 53) | def _megatron_calc_layer_map(config): function merge_megatron_ckpt_gptmodel (line 83) | def merge_megatron_ckpt_gptmodel(wrapped_models, config, dtype, is_value... function merge_megatron_ckpt_gptmodel_qwen_moe (line 478) | def merge_megatron_ckpt_gptmodel_qwen_moe( function merge_megatron_ckpt_gptmodel_qwen2_5_vl (line 484) | def merge_megatron_ckpt_gptmodel_qwen2_5_vl( function merge_megatron_ckpt_gptmodel_dpskv3 (line 490) | def merge_megatron_ckpt_gptmodel_dpskv3(wrapped_models, config, dtype, i... function merge_megatron_ckpt_gptmodel_mixtral (line 494) | def merge_megatron_ckpt_gptmodel_mixtral( FILE: verl/models/mcore/util.py function _compute_fp8_thd_align_size (line 31) | def _compute_fp8_thd_align_size(align_size: int) -> tuple[int, int]: function preprocess_packed_seqs (line 43) | def preprocess_packed_seqs( function postprocess_packed_seqs (line 133) | def postprocess_packed_seqs( function preprocess_bshd (line 193) | def preprocess_bshd( function postprocess_bshd (line 234) | def postprocess_bshd( function postprocess_packed_seqs_for_dict_output (line 256) | def postprocess_packed_seqs_for_dict_output( function preprocess_thd_no_padding (line 293) | def preprocess_thd_no_padding( function postprocess_thd_no_padding (line 438) | def postprocess_thd_no_padding( function preprocess_bshd_no_padding (line 502) | def preprocess_bshd_no_padding( function postprocess_bshd_no_padding (line 544) | def postprocess_bshd_no_padding( FILE: verl/models/mcore/weight_converter.py class McoreToHFWeightConverterBase (line 25) | class McoreToHFWeightConverterBase: method __init__ (line 26) | def __init__(self, hf_config: PretrainedConfig, mcore_config: Transfor... method convert_param (line 30) | def convert_param(self, name: str, params_one_group: list[torch.Tensor... class McoreToHFWeightConverterDense (line 34) | class McoreToHFWeightConverterDense(McoreToHFWeightConverterBase): method _convert_attention_param (line 35) | def _convert_attention_param(self, name: str, params: list[torch.Tenso... method _convert_mlp_param (line 65) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... method convert_param (line 86) | def convert_param(self, name: str, params_one_group: list[torch.Tensor... class McoreToHFWeightConverterQwen2Moe (line 103) | class McoreToHFWeightConverterQwen2Moe(McoreToHFWeightConverterDense): method _convert_mlp_param (line 104) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... class McoreToHFWeightConverterQwen2_5_VL (line 150) | class McoreToHFWeightConverterQwen2_5_VL(McoreToHFWeightConverterDense): method convert_param (line 151) | def convert_param(self, name: str, params_one_group: list[torch.Tensor... method _convert_attention_param (line 173) | def _convert_attention_param(self, name: str, params: list[torch.Tenso... method _convert_mlp_param (line 225) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... class McoreToHFWeightConverterDpskv3 (line 269) | class McoreToHFWeightConverterDpskv3(McoreToHFWeightConverterBase): method _convert_attention_param (line 270) | def _convert_attention_param(self, name: str, params: list[torch.Tenso... method _convert_mlp_param (line 309) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... method _convert_mtp_param (line 382) | def _convert_mtp_param(self, name: str, params: list[torch.Tensor]) ->... method convert_param (line 404) | def convert_param(self, name: str, params_one_group: list[torch.Tensor... class McoreToHFWeightConverterMixtral (line 422) | class McoreToHFWeightConverterMixtral(McoreToHFWeightConverterDense): method _convert_mlp_param (line 423) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... class McoreToHFWeightConverterQwen3Moe (line 446) | class McoreToHFWeightConverterQwen3Moe(McoreToHFWeightConverterDense): method _convert_mlp_param (line 447) | def _convert_mlp_param(self, name: str, params: list[torch.Tensor]) ->... FILE: verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py function _megatron_calc_layer_map (line 23) | def _megatron_calc_layer_map(config): function load_state_dict_to_megatron_qwen2 (line 53) | def load_state_dict_to_megatron_qwen2( FILE: verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py function _megatron_calc_layer_map (line 23) | def _megatron_calc_layer_map(config): function load_state_dict_to_megatron_qwen2 (line 53) | def load_state_dict_to_megatron_qwen2( FILE: verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py function _megatron_calc_global_rank (line 29) | def _megatron_calc_global_rank(tp_rank: int = 0, dp_rank: int = 0, pp_ra... function _megatron_calc_layer_map (line 42) | def _megatron_calc_layer_map(config): function merge_megatron_ckpt_qwen2 (line 72) | def merge_megatron_ckpt_qwen2(wrapped_models, config, dtype, is_value_mo... FILE: verl/models/qwen2/megatron/layers/parallel_attention.py class Qwen2RotaryEmbedding (line 43) | class Qwen2RotaryEmbedding(nn.Module): method __init__ (line 44) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 58) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 68) | def forward(self, x, seq_len=None): class Qwen2LinearScalingRotaryEmbedding (line 79) | class Qwen2LinearScalingRotaryEmbedding(Qwen2RotaryEmbedding): method __init__ (line 82) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 86) | def _set_cos_sin_cache(self, seq_len, device, dtype): class Qwen2DynamicNTKScalingRotaryEmbedding (line 98) | class Qwen2DynamicNTKScalingRotaryEmbedding(Qwen2RotaryEmbedding): method __init__ (line 101) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 105) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 124) | def rotate_half(x): function apply_rotary_pos_emb (line 131) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): function repeat_kv (line 139) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class ParallelQwen2Attention (line 151) | class ParallelQwen2Attention(nn.Module): method __init__ (line 154) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method _init_rope (line 224) | def _init_rope(self): method _shape (line 231) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 234) | def forward( function apply_rotary_pos_emb_rmpad (line 293) | def apply_rotary_pos_emb_rmpad(q, k, cos, sin, position_ids, indices, se... function apply_rotary_pos_emb_rmpad_flash (line 311) | def apply_rotary_pos_emb_rmpad_flash(q, k, cos, sin, cu_seqlens, max_seq... class ParallelQwen2AttentionRmPad (line 321) | class ParallelQwen2AttentionRmPad(ParallelQwen2Attention): method forward (line 322) | def forward( FILE: verl/models/qwen2/megatron/layers/parallel_decoder.py class ParallelQwen2DecoderLayer (line 35) | class ParallelQwen2DecoderLayer(nn.Module): method __init__ (line 36) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method forward (line 47) | def forward( class ParallelQwen2DecoderLayerRmPad (line 102) | class ParallelQwen2DecoderLayerRmPad(nn.Module): method __init__ (line 103) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method forward (line 114) | def forward( FILE: verl/models/qwen2/megatron/layers/parallel_linear.py class QKVParallelLinear (line 20) | class QKVParallelLinear(tensor_parallel.ColumnParallelLinear): method __init__ (line 21) | def __init__( class MergedColumnParallelLinear (line 54) | class MergedColumnParallelLinear(tensor_parallel.ColumnParallelLinear): method __init__ (line 55) | def __init__( FILE: verl/models/qwen2/megatron/layers/parallel_mlp.py class ParallelQwen2MLP (line 30) | class ParallelQwen2MLP(nn.Module): method __init__ (line 31) | def __init__(self, config, megatron_config: ModelParallelConfig = None... method forward (line 71) | def forward(self, x): FILE: verl/models/qwen2/megatron/layers/parallel_rmsnorm.py class ParallelQwen2RMSNorm (line 26) | class ParallelQwen2RMSNorm(nn.Module): method __init__ (line 27) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method forward (line 41) | def forward(self, hidden_states): FILE: verl/models/qwen2/megatron/modeling_qwen2_megatron.py function _make_causal_mask (line 48) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, d... function _expand_mask (line 61) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... class ParallelQwen2Model (line 75) | class ParallelQwen2Model(nn.Module): method __init__ (line 83) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method _prepare_decoder_attention_mask (line 102) | def _prepare_decoder_attention_mask(self, attention_mask, input_shape,... method forward (line 124) | def forward( class ParallelQwen2ForCausalLM (line 162) | class ParallelQwen2ForCausalLM(nn.Module): method __init__ (line 163) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method forward (line 183) | def forward( class ParallelQwen2ModelRmPad (line 224) | class ParallelQwen2ModelRmPad(nn.Module): method __init__ (line 232) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method forward (line 251) | def forward( class ParallelQwen2ForCausalLMRmPad (line 294) | class ParallelQwen2ForCausalLMRmPad(nn.Module): method __init__ (line 295) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method _init_head (line 303) | def _init_head(self, config: Qwen2Config): method _forward_head (line 317) | def _forward_head(self, hidden_states): method forward (line 324) | def forward( class ParallelQwen2ForValueRmPad (line 386) | class ParallelQwen2ForValueRmPad(ParallelQwen2ForCausalLMRmPad): method _init_head (line 387) | def _init_head(self, config): method _forward_head (line 396) | def _forward_head(self, hidden_states): method forward (line 403) | def forward( class ParallelQwen2ModelRmPadPP (line 419) | class ParallelQwen2ModelRmPadPP(nn.Module): method __init__ (line 429) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method set_input_tensor (line 472) | def set_input_tensor(self, input_tensor): method forward (line 482) | def forward( class ParallelQwen2ForCausalLMRmPadPP (line 533) | class ParallelQwen2ForCausalLMRmPadPP(nn.Module): method __init__ (line 534) | def __init__( method set_input_tensor (line 557) | def set_input_tensor(self, input_tensor): method _init_head (line 568) | def _init_head(self, config): method setup_embeddings_and_output_layer (line 583) | def setup_embeddings_and_output_layer(self) -> None: method shared_embedding_or_output_weight (line 622) | def shared_embedding_or_output_weight(self) -> torch.Tensor: method _forward_head (line 629) | def _forward_head(self, hidden_states): method forward (line 641) | def forward( class ParallelQwen2ForValueRmPadPP (line 708) | class ParallelQwen2ForValueRmPadPP(ParallelQwen2ForCausalLMRmPadPP): method _init_head (line 709) | def _init_head(self, config): method _forward_head (line 718) | def _forward_head(self, hidden_states): method forward (line 725) | def forward( FILE: verl/models/registry.py class ModelRegistry (line 43) | class ModelRegistry: method load_model_cls (line 45) | def load_model_cls(model_arch: str, value=False) -> Optional[type[nn.M... method get_supported_archs (line 61) | def get_supported_archs() -> list[str]: FILE: verl/models/transformers/apertus.py function apertus_attn_forward (line 41) | def apertus_attn_forward( FILE: verl/models/transformers/dense_common.py class CausalLMOutputForPPO (line 24) | class CausalLMOutputForPPO(CausalLMOutputWithPast): function forward_base_model (line 29) | def forward_base_model( function forward_with_torch_backend (line 71) | def forward_with_torch_backend( function forward_with_triton_backend (line 133) | def forward_with_triton_backend( FILE: verl/models/transformers/glm4v.py function get_rope_index (line 64) | def get_rope_index( function prepare_fa2_from_position_ids (line 184) | def prepare_fa2_from_position_ids( function _custom_flash_attention_forward (line 202) | def _custom_flash_attention_forward( function glm4v_attn_forward (line 283) | def glm4v_attn_forward( function _get_input_embeds (line 335) | def _get_input_embeds( function process_position_ids (line 393) | def process_position_ids(position_ids: torch.Tensor) -> torch.Tensor: class Glm4vCausalLMOutputForPPO (line 403) | class Glm4vCausalLMOutputForPPO(Glm4vCausalLMOutputWithPast): function glm4v_base_forward (line 408) | def glm4v_base_forward( function glm4v_forward (line 428) | def glm4v_forward( function forward_with_normal_backend (line 451) | def forward_with_normal_backend( function forward_with_torch_backend (line 468) | def forward_with_torch_backend( function forward_with_triton_backend (line 502) | def forward_with_triton_backend( FILE: verl/models/transformers/kimi_vl.py function rotate_half (line 35) | def rotate_half(x): function apply_rotary_pos_emb (line 43) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): function repeat_kv (line 79) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function _ulysses_flash_attn_forward (line 91) | def _ulysses_flash_attn_forward( FILE: verl/models/transformers/llama.py function llama_flash_attn_forward (line 42) | def llama_flash_attn_forward( function llama_attn_forward (line 170) | def llama_attn_forward( FILE: verl/models/transformers/monkey_patch.py function _create_prefix_grouper_wrapper (line 40) | def _create_prefix_grouper_wrapper(original_fn): function apply_prefix_grouper_patch (line 57) | def apply_prefix_grouper_patch(): function repeat_kv (line 75) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function _ulysses_flash_attention_forward (line 87) | def _ulysses_flash_attention_forward( function patch_vlm_for_ulysses_input_slicing (line 158) | def patch_vlm_for_ulysses_input_slicing(model_class: type): function patch_forward_with_backends (line 234) | def patch_forward_with_backends( function apply_monkey_patch (line 286) | def apply_monkey_patch( FILE: verl/models/transformers/npu_patch.py function rms_norm_forward_npu (line 35) | def rms_norm_forward_npu(self, x): function silu_forward_npu (line 42) | def silu_forward_npu(self, hidden_state): function apply_rotary_pos_emb_npu (line 48) | def apply_rotary_pos_emb_npu(q, k, cos, sin, position_ids=None, unsqueez... function qwen3_next_rms_norm_forward_npu (line 57) | def qwen3_next_rms_norm_forward_npu(self, x): function qwen3_next_rms_norm_forward_gated_npu (line 61) | def qwen3_next_rms_norm_forward_gated_npu(self, hidden_states, gate=None): function qwen3_next_apply_rotary_pos_emb_npu (line 69) | def qwen3_next_apply_rotary_pos_emb_npu(q, k, cos, sin, position_ids=Non... class NPUGmmFunction (line 85) | class NPUGmmFunction(torch.autograd.Function): method forward (line 87) | def forward(ctx, x, weight, group_list, group_list_type=1): method backward (line 109) | def backward(ctx, grad_output): function _qwen3_sparse_moe_routed_forward_npu (line 137) | def _qwen3_sparse_moe_routed_forward_npu(self, hidden_states: torch.Tens... function qwen3_moe_sparse_moe_block_forward_npu (line 179) | def qwen3_moe_sparse_moe_block_forward_npu(self, hidden_states: torch.Te... function qwen3_next_sparse_moe_block_forward_npu (line 187) | def qwen3_next_sparse_moe_block_forward_npu(self, hidden_states: torch.T... class NPUQwen3VLMoeTextExperts (line 199) | class NPUQwen3VLMoeTextExperts(nn.Module): method __init__ (line 202) | def __init__(self, config): method forward (line 212) | def forward( class NPUQwen3VLMoeTextSparseMoeBlock (line 262) | class NPUQwen3VLMoeTextSparseMoeBlock(nn.Module): method __init__ (line 265) | def __init__(self, config): method forward (line 273) | def forward(self, hidden_states: torch.Tensor) -> torch.Tensor: FILE: verl/models/transformers/qwen2.py function qwen2_flash_attn_forward (line 35) | def qwen2_flash_attn_forward( function qwen2_attn_forward (line 159) | def qwen2_attn_forward( FILE: verl/models/transformers/qwen2_vl.py function get_rope_index (line 64) | def get_rope_index( function prepare_fa2_from_position_ids (line 164) | def prepare_fa2_from_position_ids( function _custom_flash_attention_forward (line 182) | def _custom_flash_attention_forward( function qwen2_vl_attn_forward (line 268) | def qwen2_vl_attn_forward( function _get_input_embeds (line 335) | def _get_input_embeds( function process_position_ids (line 395) | def process_position_ids(position_ids: torch.Tensor) -> torch.Tensor: class Qwen2VLCausalLMOutputForPPO (line 409) | class Qwen2VLCausalLMOutputForPPO(Qwen2VLCausalLMOutputWithPast): function qwen2_vl_base_forward (line 414) | def qwen2_vl_base_forward( function qwen2_vl_forward (line 431) | def qwen2_vl_forward( function forward_with_normal_backend (line 466) | def forward_with_normal_backend( function forward_with_torch_backend (line 483) | def forward_with_torch_backend( function forward_with_triton_backend (line 517) | def forward_with_triton_backend( FILE: verl/models/transformers/qwen3_vl.py function get_rope_index (line 31) | def get_rope_index( function _get_input_embeds (line 137) | def _get_input_embeds( class Qwen3VLCausalLMOutputForPPO (line 230) | class Qwen3VLCausalLMOutputForPPO(Qwen3VLCausalLMOutputWithPast): function qwen3_vl_base_forward (line 235) | def qwen3_vl_base_forward( function forward_with_normal_backend (line 255) | def forward_with_normal_backend( function forward_with_torch_backend (line 272) | def forward_with_torch_backend( function forward_with_triton_backend (line 306) | def forward_with_triton_backend( function patch_qwen3_vl_moe_sparse_moe_block_forward (line 340) | def patch_qwen3_vl_moe_sparse_moe_block_forward(): FILE: verl/models/transformers/tiled_mlp.py class GradientAccumulator (line 29) | class GradientAccumulator: method __init__ (line 37) | def __init__(self, params: list[torch.nn.Parameter], total_shards: int... method install_hooks (line 52) | def install_hooks(self, is_last_shard: bool): method _remove_hooks (line 75) | def _remove_hooks(self): method cleanup (line 81) | def cleanup(self): class TiledMLP (line 86) | class TiledMLP(torch.autograd.Function): method forward (line 94) | def forward(ctx, fn, module, x, shards, compute_params): method backward (line 109) | def backward(ctx, *grads): function _mlp_forward_fn (line 159) | def _mlp_forward_fn(module, x): function apply_tiled_mlp_monkey_patch (line 177) | def apply_tiled_mlp_monkey_patch( function _patch_mlp_class (line 229) | def _patch_mlp_class(mlp_class: type[nn.Module], forward_fn, num_shards:... FILE: verl/models/weight_loader_registry.py function get_weight_loader (line 16) | def get_weight_loader(arch: str): function get_weight_saver (line 32) | def get_weight_saver(arch: str): FILE: verl/protocol.py class _DataProtoConfigMeta (line 50) | class _DataProtoConfigMeta(type): method auto_padding (line 56) | def auto_padding(cls): method auto_padding (line 61) | def auto_padding(cls, enabled: bool): class DataProtoConfig (line 66) | class DataProtoConfig(metaclass=_DataProtoConfigMeta): function pad_dataproto_to_divisor (line 73) | def pad_dataproto_to_divisor(data: "DataProto", size_divisor: int): function unpad_dataproto (line 101) | def unpad_dataproto(data: "DataProto", pad_size): function union_tensor_dict (line 108) | def union_tensor_dict(tensor_dict1: TensorDict, tensor_dict2: TensorDict... function _array_equal (line 124) | def _array_equal(array1: np.ndarray, array2: np.ndarray, visited: set[in... function _deep_equal (line 151) | def _deep_equal(a: Any, b: Any, visited: set[int]) -> bool: function union_numpy_dict (line 187) | def union_numpy_dict(tensor_dict1: dict[str, np.ndarray], tensor_dict2: ... function fold_batch_dim (line 201) | def fold_batch_dim(data: "DataProto", new_batch_size): function unfold_batch_dim (line 221) | def unfold_batch_dim(data: "DataProto", batch_dims=2): function serialize_single_tensor (line 240) | def serialize_single_tensor(obj: torch.Tensor) -> tuple[str, tuple[int, ... function serialize_tensordict (line 246) | def serialize_tensordict(batch: TensorDict) -> tuple[tuple[int, ...], Op... function deserialize_single_tensor (line 261) | def deserialize_single_tensor(arr: Any) -> torch.Tensor: function deserialize_tensordict (line 274) | def deserialize_tensordict(arr: Any) -> TensorDict: function collate_fn (line 295) | def collate_fn(x: list["DataProtoItem"]): class DataProtoItem (line 309) | class DataProtoItem: class DataProto (line 317) | class DataProto: method __post_init__ (line 329) | def __post_init__(self): method __len__ (line 333) | def __len__(self): method __getitem__ (line 342) | def __getitem__(self, item): method __getstate__ (line 376) | def __getstate__(self): method __setstate__ (line 403) | def __setstate__(self, data): method save_to_disk (line 425) | def save_to_disk(self, filepath): method load_from_disk (line 430) | def load_from_disk(filepath) -> "DataProto": method print_size (line 435) | def print_size(self, prefix=""): method check_consistency (line 453) | def check_consistency(self): method from_single_dict (line 479) | def from_single_dict(cls, data: dict[str, torch.Tensor | np.ndarray], ... method from_dict (line 495) | def from_dict( method from_tensordict (line 545) | def from_tensordict( method to (line 585) | def to(self, device) -> "DataProto": method select (line 599) | def select(self, batch_keys=None, non_tensor_batch_keys=None, meta_inf... method select_idxs (line 634) | def select_idxs(self, idxs): method slice (line 674) | def slice(self, start=None, end=None, step=None): method pop (line 720) | def pop(self, batch_keys=None, non_tensor_batch_keys=None, meta_info_k... method rename (line 753) | def rename(self, old_keys=None, new_keys=None) -> "DataProto": method union (line 780) | def union(self, other: "DataProto") -> "DataProto": method make_iterator (line 799) | def make_iterator(self, mini_batch_size, epochs, seed=None, dataloader... method is_padding_enabled (line 839) | def is_padding_enabled(self): method padding (line 848) | def padding(self, padding_size, padding_candidate=""): method chunk (line 863) | def chunk(self, chunks: int) -> list["DataProto"]: method split (line 904) | def split(self, split_size: int) -> list["DataProto"]: method concat (line 916) | def concat(data: list["DataProto"]) -> "DataProto": method reorder (line 962) | def reorder(self, indices): method repeat (line 970) | def repeat(self, repeat_times=2, interleave=True): method unfold_column_chunks (line 1014) | def unfold_column_chunks(self, n_split: int, split_keys: Optional[list... method sample_level_repeat (line 1053) | def sample_level_repeat(self, repeat_times): method to_tensordict (line 1101) | def to_tensordict(self) -> TensorDict: method get_data_info (line 1127) | def get_data_info(self) -> str: method _get_type_info (line 1154) | def _get_type_info(self, value): class DataProtoFuture (line 1173) | class DataProtoFuture: method concat (line 1192) | def concat(data: list[ray.ObjectRef]) -> "DataProtoFuture": method chunk (line 1196) | def chunk(self, chunks: int) -> list["DataProtoFuture"]: method get (line 1211) | def get(self): class BatchData (line 1230) | class BatchData: method __init__ (line 1252) | def __init__(self, data): method is_chunkable (line 1257) | def is_chunkable(self) -> bool: method is_concatable (line 1261) | def is_concatable(self) -> bool: method chunk (line 1270) | def chunk(self, chunks: int): method concat (line 1284) | def concat(self): method _chunkable_types (line 1305) | def _chunkable_types(cls): method _concatable_types (line 1309) | def _concatable_types(cls): function all_gather_data_proto (line 1313) | def all_gather_data_proto(data: DataProto, process_group): FILE: verl/single_controller/base/decorator.py class Dispatch (line 25) | class Dispatch(DynamicEnum): function init_predefined_dispatch_mode (line 37) | def init_predefined_dispatch_mode(): class Execute (line 49) | class Execute(DynamicEnum): function init_predefined_execute_mode (line 60) | def init_predefined_execute_mode(): function _split_args_kwargs_data_proto (line 70) | def _split_args_kwargs_data_proto(chunks, *args, **kwargs): function _split_args_kwargs_data_proto_with_auto_padding (line 90) | def _split_args_kwargs_data_proto_with_auto_padding(chunks, *args, **kwa... function dispatch_one_to_all (line 119) | def dispatch_one_to_all(worker_group, *args, **kwargs): function dummy_direct_rollout_call (line 125) | def dummy_direct_rollout_call(worker_group, *args, **kwargs): function dispatch_all_to_all (line 129) | def dispatch_all_to_all(worker_group, *args, **kwargs): function collect_all_to_all (line 133) | def collect_all_to_all(worker_group, output): function _concat_data_proto_or_future (line 137) | def _concat_data_proto_or_future(output: list): function dispatch_dp_compute (line 147) | def dispatch_dp_compute(worker_group, *args, **kwargs): function collect_dp_compute (line 158) | def collect_dp_compute(worker_group, output): function dispatch_dp_compute_data_proto (line 166) | def dispatch_dp_compute_data_proto(worker_group, *args, **kwargs): function dispatch_dp_compute_data_proto_with_func (line 179) | def dispatch_dp_compute_data_proto_with_func(worker_group, *args, **kwar... function collect_dp_compute_data_proto (line 190) | def collect_dp_compute_data_proto(worker_group, output): function dispatch_nd_compute (line 201) | def dispatch_nd_compute(dp_rank_mapping: list[int], dp_size, worker_grou... function collect_nd_compute (line 235) | def collect_nd_compute(collect_mask: list[bool], worker_group, output): function dispatch_nd_compute_dataproto (line 249) | def dispatch_nd_compute_dataproto(dp_rank_mapping: list[int], dp_size, w... function collect_nd_compute_dataproto (line 254) | def collect_nd_compute_dataproto(collect_mask: list[bool], worker_group,... function dispatch_lazy_compute_data_proto (line 265) | def dispatch_lazy_compute_data_proto(mesh_name, worker_group, *args, **k... function collect_lazy_compute_data_proto (line 281) | def collect_lazy_compute_data_proto(mesh_name, worker_group, *args, **kw... function make_nd_compute_dataproto_dispatch_fn (line 299) | def make_nd_compute_dataproto_dispatch_fn(mesh_name): function get_predefined_dispatch_fn (line 333) | def get_predefined_dispatch_fn(dispatch_mode): function register_dispatch_mode (line 337) | def register_dispatch_mode(dispatch_mode_name, dispatch_fn, collect_fn): function update_dispatch_mode (line 347) | def update_dispatch_mode(dispatch_mode, dispatch_fn, collect_fn): function get_predefined_execute_fn (line 356) | def get_predefined_execute_fn(execute_mode): function _check_dispatch_mode (line 368) | def _check_dispatch_mode(dispatch_mode): function _check_execute_mode (line 378) | def _check_execute_mode(execute_mode): function _materialize_futures (line 382) | def _materialize_futures(*args, **kwargs): function register (line 397) | def register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL... FILE: verl/single_controller/base/worker.py class DistRankInfo (line 35) | class DistRankInfo: class DistGlobalInfo (line 43) | class DistGlobalInfo: class WorkerHelper (line 50) | class WorkerHelper: method _get_node_ip (line 52) | def _get_node_ip(): method _get_free_port (line 59) | def _get_free_port(): method get_availale_master_addr_port (line 64) | def get_availale_master_addr_port(self): method get_available_master_addr_port (line 71) | def get_available_master_addr_port(self): class Worker (line 76) | class Worker(WorkerHelper): method _register_dispatch_collect_info (line 86) | def _register_dispatch_collect_info(self, mesh_name: str, dp_rank: int... method _query_dispatch_info (line 103) | def _query_dispatch_info(self, mesh_name: str): method _query_collect_info (line 119) | def _query_collect_info(self, mesh_name: str): method query_collect_info (line 122) | def query_collect_info(self, mesh_name: str): method get_dispatch_collect (line 136) | def get_dispatch_collect(self): method set_dispatch_collect (line 147) | def set_dispatch_collect(self, mesh_name: str, dispatch_dp_rank: dict[... method env_keys (line 169) | def env_keys(cls): method __init__ (line 181) | def __init__(self, cuda_visible_devices=None) -> None: method get_fused_worker_by_name (line 222) | def get_fused_worker_by_name(self, worker_name: str): method _setup_env_cuda_visible_devices (line 231) | def _setup_env_cuda_visible_devices(self): method _configure_with_store (line 283) | def _configure_with_store(self, store: dict): method get_master_addr_port (line 299) | def get_master_addr_port(self): method get_cuda_visible_devices (line 303) | def get_cuda_visible_devices(self): method world_size (line 311) | def world_size(self): method rank (line 316) | def rank(self): method execute_with_func_generator (line 321) | def execute_with_func_generator(self, func, *args, **kwargs): method execute_func_rank_zero (line 336) | def execute_func_rank_zero(self, func, *args, **kwargs): FILE: verl/single_controller/base/worker_group.py class ResourcePool (line 27) | class ResourcePool: method __init__ (line 34) | def __init__(self, process_on_nodes=None, max_colocate_count: int = 10... method add_node (line 48) | def add_node(self, process_count): method world_size (line 52) | def world_size(self): method __call__ (line 56) | def __call__(self) -> Any: method store (line 60) | def store(self): method local_world_size_list (line 63) | def local_world_size_list(self) -> list[int]: method local_rank_list (line 70) | def local_rank_list(self) -> list[int]: class ClassWithInitArgs (line 76) | class ClassWithInitArgs: method __init__ (line 83) | def __init__(self, cls, *args, **kwargs) -> None: method __call__ (line 97) | def __call__(self) -> Any: function check_workers_alive (line 102) | def check_workers_alive(workers: list, is_alive: Callable, gap_time: flo... class WorkerGroup (line 123) | class WorkerGroup: method __init__ (line 131) | def __init__(self, resource_pool: ResourcePool, **kwargs) -> None: method _is_worker_alive (line 153) | def _is_worker_alive(self, worker): method _block_until_all_workers_alive (line 157) | def _block_until_all_workers_alive(self) -> None: method start_worker_aliveness_check (line 166) | def start_worker_aliveness_check(self, every_n_seconds=1) -> None: method world_size (line 181) | def world_size(self): method _bind_worker_method (line 185) | def _bind_worker_method(self, user_defined_cls, func_generator): FILE: verl/single_controller/ray/base.py function get_random_string (line 40) | def get_random_string(length: int) -> str: function func_generator (line 48) | def func_generator(self, method_name, dispatch_fn, collect_fn, execute_f... function sort_placement_group_by_node_ip (line 69) | def sort_placement_group_by_node_ip(pgs: list[PlacementGroup]) -> list[P... function get_master_addr_port (line 90) | def get_master_addr_port(master_port_range: Optional[list[int]] = None) ... class RayResourcePool (line 112) | class RayResourcePool(ResourcePool): method __init__ (line 113) | def __init__( method get_placement_groups (line 130) | def get_placement_groups(self, strategy="STRICT_PACK", name=None, devi... class SubRayResourcePool (line 163) | class SubRayResourcePool(RayResourcePool): method __init__ (line 164) | def __init__( method world_size (line 177) | def world_size(self): class ResourcePoolManager (line 182) | class ResourcePoolManager: method create_resource_pool (line 191) | def create_resource_pool(self): method get_resource_pool (line 211) | def get_resource_pool(self, role) -> RayResourcePool: method get_n_gpus (line 215) | def get_n_gpus(self) -> int: method _check_resource_available (line 219) | def _check_resource_available(self): function extract_pg_from_exist (line 238) | def extract_pg_from_exist( function split_resource_pool (line 265) | def split_resource_pool( function merge_resource_pool (line 313) | def merge_resource_pool(rp1: RayResourcePool, rp2: RayResourcePool) -> R... class RayClassWithInitArgs (line 331) | class RayClassWithInitArgs(ClassWithInitArgs): method __init__ (line 339) | def __init__(self, cls, *args, **kwargs) -> None: method set_additional_resource (line 345) | def set_additional_resource(self, additional_resource): method update_options (line 353) | def update_options(self, options: dict): method __call__ (line 361) | def __call__( class RayWorkerGroup (line 411) | class RayWorkerGroup(WorkerGroup): method __init__ (line 419) | def __init__( method _is_worker_alive (line 492) | def _is_worker_alive(self, worker: ray.actor.ActorHandle): method _init_with_detached_workers (line 504) | def _init_with_detached_workers(self, worker_names, worker_handles): method _get_master_addr_port (line 513) | def _get_master_addr_port(self, pg, bundle_index=0, master_port_range=... method _init_with_resource_pool (line 531) | def _init_with_resource_pool( method _init_with_subresource_pool (line 576) | def _init_with_subresource_pool(self, resource_pool, ray_cls_with_init... method _create_worker (line 616) | def _create_worker(self, rank, pg_idx, pg, local_rank, resource_pool, ... method worker_names (line 679) | def worker_names(self): method from_detached (line 683) | def from_detached( method spawn (line 711) | def spawn(self, prefix_set): method spawn_fused (line 746) | def spawn_fused(self, prefix_set): method fuse (line 763) | def fuse(self, prefix_set): method _execute_remote_single_worker (line 775) | def _execute_remote_single_worker(self, worker, method_name: str, *arg... method execute_rank_zero_sync (line 794) | def execute_rank_zero_sync(self, method_name: str, *args, **kwargs): method execute_rank_zero_async (line 807) | def execute_rank_zero_async(self, method_name: str, *args, **kwargs): method execute_rank_zero (line 820) | def execute_rank_zero(self, method_name: str, *args, **kwargs): method execute_all (line 833) | def execute_all(self, method_name: str, *args, **kwargs): method execute_all_sync (line 846) | def execute_all_sync(self, method_name: str, *args, **kwargs): method execute_all_async (line 859) | def execute_all_async(self, method_name: str, *args, **kwargs): method master_address (line 890) | def master_address(self): method master_port (line 894) | def master_port(self): method workers (line 898) | def workers(self): method world_size (line 902) | def world_size(self): function _bind_workers_method_to_parent (line 913) | def _bind_workers_method_to_parent(cls, key, user_defined_cls): function _unwrap_ray_remote (line 961) | def _unwrap_ray_remote(cls): function _determine_fsdp_megatron_base_class (line 967) | def _determine_fsdp_megatron_base_class(mros: list): function create_colocated_worker_cls (line 981) | def create_colocated_worker_cls(class_dict: dict[str, RayClassWithInitAr... function create_colocated_worker_raw_cls (line 1028) | def create_colocated_worker_raw_cls(class_dict: dict[str, RayClassWithIn... function create_colocated_worker_cls_fused (line 1100) | def create_colocated_worker_cls_fused(class_dict: dict[str, RayClassWith... FILE: verl/third_party/torch/distributed/_state_dict_utils.py function _identity_func (line 111) | def _identity_func( function _all_gather_sharded_tensor (line 120) | def _all_gather_sharded_tensor( class CompanionMismatch (line 154) | class CompanionMismatch(Exception): function _iterate_state_dict (line 158) | def _iterate_state_dict( function _gather_state_dict (line 273) | def _gather_state_dict( function _offload_state_dict_to_cpu (line 357) | def _offload_state_dict_to_cpu( function _copy_state_dict (line 398) | def _copy_state_dict( function _create_cpu_state_dict (line 448) | def _create_cpu_state_dict( function _check_state_dict_similarity (line 529) | def _check_state_dict_similarity( class _TensorInfo (line 571) | class _TensorInfo(NamedTuple): function _broadcast_tensors (line 576) | def _broadcast_tensors( function _distribute_tensors (line 616) | def _distribute_tensors( function _broadcast_state_dict (line 657) | def _broadcast_state_dict( function _distribute_state_dict (line 716) | def _distribute_state_dict( function _traverse_state_dict (line 757) | def _traverse_state_dict( function _flatten_state_dict (line 781) | def _flatten_state_dict( function _set_element (line 807) | def _set_element(root_dict: STATE_DICT_TYPE, path: OBJ_PATH, value: Any)... function _unflatten_state_dict (line 835) | def _unflatten_state_dict(state_dict: STATE_DICT_TYPE, mapping: FLATTEN_... FILE: verl/third_party/torch/distributed/checkpoint/state_dict.py function _gc_context (line 171) | def _gc_context(): class StateDictOptions (line 182) | class StateDictOptions: class _StateDictInfo (line 230) | class _StateDictInfo(StateDictOptions): function _get_fqns (line 247) | def _get_fqns( class _EXTRA_STATE (line 316) | class _EXTRA_STATE: function _iterate_valid_model_state (line 320) | def _iterate_valid_model_state(model, dsd_fqn_modifiers="_fqn_modifiers"): function _verify_options (line 352) | def _verify_options( function _verify_state_dict (line 470) | def _verify_state_dict( function _state_dict_fn (line 508) | def _state_dict_fn(obj: nn.Module | torch.optim.Optimizer, api: str) -> ... function _maybe_full_or_cpu_state_dict (line 515) | def _maybe_full_or_cpu_state_dict(state_dict: dict[str, Any], info: _Sta... function _get_model_state_dict (line 526) | def _get_model_state_dict(model: nn.Module, info: _StateDictInfo) -> dic... function _load_model_state_dict (line 592) | def _load_model_state_dict( function _init_optim_state (line 657) | def _init_optim_state(optim: torch.optim.Optimizer) -> None: function _flatten_optim_state_dict (line 695) | def _flatten_optim_state_dict(state_dict: OptimizerStateType) -> dict[st... function _unflatten_optim_state_dict (line 757) | def _unflatten_optim_state_dict( function _get_optim_state_dict (line 819) | def _get_optim_state_dict( function _split_optim_state_dict (line 880) | def _split_optim_state_dict( function _load_optim_state_dict (line 968) | def _load_optim_state_dict( function get_model_state_dict (line 1052) | def get_model_state_dict( function get_optimizer_state_dict (line 1089) | def get_optimizer_state_dict( function get_state_dict (line 1130) | def get_state_dict( function _unflatten_model_state_dict (line 1217) | def _unflatten_model_state_dict( function set_model_state_dict (line 1248) | def set_model_state_dict( function set_optimizer_state_dict (line 1285) | def set_optimizer_state_dict( function set_state_dict (line 1324) | def set_state_dict( function _patch_model_state_dict (line 1383) | def _patch_model_state_dict( function _patch_optimizer_state_dict (line 1438) | def _patch_optimizer_state_dict( FILE: verl/third_party/vllm/__init__.py function get_version (line 23) | def get_version(pkg): FILE: verl/tools/base_tool.py class BaseTool (line 24) | class BaseTool: method __init__ (line 36) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 43) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 46) | async def create(self, instance_id: Optional[str] = None, **kwargs) ->... method execute (line 62) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 76) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 87) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/geo3k_tool.py class Geo3kTool (line 32) | class Geo3kTool(BaseTool): method __init__ (line 41) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 64) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 67) | async def create( method execute (line 80) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 92) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 100) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/gsm8k_tool.py class Gsm8kTool (line 31) | class Gsm8kTool(BaseTool): method __init__ (line 41) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 64) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 67) | async def create( method execute (line 82) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 100) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 109) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/image_zoom_in_tool.py class PoolMode (line 39) | class PoolMode(Enum): class TokenBucketWorker (line 47) | class TokenBucketWorker: method __init__ (line 50) | def __init__(self, rate_limit: int): method acquire (line 56) | def acquire(self): method release (line 62) | def release(self): method get_current_count (line 67) | def get_current_count(self): class VisualExecutionWorker (line 72) | class VisualExecutionWorker: method __init__ (line 75) | def __init__(self, enable_global_rate_limit=True, rate_limit=10): method _init_rate_limit (line 78) | def _init_rate_limit(self, rate_limit): method ping (line 82) | def ping(self): method execute (line 86) | def execute(self, fn: Callable[..., T], *fn_args, **fn_kwargs) -> T: function init_visual_execution_pool (line 101) | def init_visual_execution_pool( class ImageZoomInTool (line 115) | class ImageZoomInTool(BaseTool): method __init__ (line 131) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method _validate_bbox (line 181) | def _validate_bbox(self, left: float, top: float, right: float, bottom... method _maybe_resize_bbox (line 205) | def _maybe_resize_bbox(self, bbox_2d: list[float], image_width: int, i... method get_openai_tool_schema (line 299) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 302) | async def create(self, instance_id: Optional[str] = None, **kwargs) ->... method execute (line 345) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method release (line 390) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/mcp_base_tool.py class MCPBaseTool (line 33) | class MCPBaseTool(BaseTool): method __init__ (line 34) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 42) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 46) | async def create(self, instance_id: Optional[str] = None, **kwargs) ->... method _call_tool (line 64) | async def _call_tool(self, instance_id, parameters) -> tuple[str, dict]: method execute (line 86) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 113) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 116) | async def release(self, instance_id: str, **kwargs) -> None: method _parse_tool_result (line 120) | def _parse_tool_result(self, content: list) -> tuple[str, dict]: FILE: verl/tools/mcp_search_tool.py class MCPSearchTool (line 28) | class MCPSearchTool(MCPBaseTool): method __init__ (line 29) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method _parse_tool_result (line 32) | def _parse_tool_result(self, content: list) -> tuple[str, dict]: FILE: verl/tools/sandbox_fusion_tools.py class PoolMode (line 37) | class PoolMode(Enum): class TokenBucketWorker (line 43) | class TokenBucketWorker: method __init__ (line 44) | def __init__(self, rate_limit: int): method acquire (line 51) | def acquire(self): method release (line 56) | def release(self): method get_current_count (line 60) | def get_current_count(self): class ExecutionWorker (line 64) | class ExecutionWorker: method __init__ (line 65) | def __init__(self, enable_global_rate_limit=True, rate_limit=10): method _init_rate_limit (line 68) | def _init_rate_limit(self, rate_limit): method ping (line 73) | def ping(self): method execute (line 76) | def execute(self, fn: Callable[..., T], *fn_args, **fn_kwargs) -> T: function init_execution_pool (line 87) | def init_execution_pool( class SandboxFusionTool (line 101) | class SandboxFusionTool(BaseTool): method __init__ (line 111) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 152) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 155) | async def create( method execute (line 168) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method execute_code (line 181) | def execute_code(self, instance_id, code, timeout=30, language="python"): method calc_reward (line 193) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 196) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/schemas.py class OpenAIFunctionPropertySchema (line 21) | class OpenAIFunctionPropertySchema(BaseModel): class OpenAIFunctionParametersSchema (line 29) | class OpenAIFunctionParametersSchema(BaseModel): class OpenAIFunctionSchema (line 37) | class OpenAIFunctionSchema(BaseModel): class OpenAIFunctionToolSchema (line 48) | class OpenAIFunctionToolSchema(BaseModel): class OpenAIFunctionParsedSchema (line 55) | class OpenAIFunctionParsedSchema(BaseModel): class OpenAIFunctionCallSchema (line 62) | class OpenAIFunctionCallSchema(BaseModel): method from_openai_function_parsed_schema (line 69) | def from_openai_function_parsed_schema( class OpenAIFunctionToolCall (line 86) | class OpenAIFunctionToolCall(BaseModel): class ToolResponse (line 94) | class ToolResponse(BaseModel): method initialize_request (line 103) | def initialize_request(cls, values): method is_empty (line 119) | def is_empty(self) -> bool: method is_text_only (line 122) | def is_text_only(self) -> bool: FILE: verl/tools/search_tool.py class PoolMode (line 41) | class PoolMode(Enum): class TokenBucketWorker (line 49) | class TokenBucketWorker: method __init__ (line 52) | def __init__(self, rate_limit: int): method acquire (line 58) | def acquire(self): method release (line 64) | def release(self): method get_current_count (line 69) | def get_current_count(self): class SearchExecutionWorker (line 74) | class SearchExecutionWorker: method __init__ (line 77) | def __init__(self, enable_global_rate_limit=True, rate_limit=10): method _init_rate_limit (line 80) | def _init_rate_limit(self, rate_limit): method ping (line 84) | def ping(self): method execute (line 88) | def execute(self, fn: Callable[..., T], *fn_args, **fn_kwargs) -> T: function init_search_execution_pool (line 103) | def init_search_execution_pool( class SearchTool (line 117) | class SearchTool(BaseTool): method __init__ (line 132) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method get_openai_tool_schema (line 184) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method create (line 188) | async def create(self, instance_id: Optional[str] = None, **kwargs) ->... method execute_search (line 206) | def execute_search(self, instance_id: str, query_list: list, retrieval... method execute (line 230) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 274) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 277) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl/tools/utils/mcp_clients/McpClientManager.py class MCPClientManager (line 28) | class MCPClientManager: method initialize (line 35) | async def initialize(self, config_path, rate_limit: float = 10.0): method call_tool (line 58) | async def call_tool(self, tool_name, parameters, timeout): method fetch_tool_schemas (line 67) | async def fetch_tool_schemas(self, tool_selected_list: list[str]) -> l... method get_client_with_tool_name (line 82) | def get_client_with_tool_name(self, tool_name: str): method _load_config (line 85) | def _load_config(self, file: str) -> dict[str, Any]: FILE: verl/tools/utils/mcp_clients/utils.py class TokenBucket (line 24) | class TokenBucket: method __init__ (line 25) | def __init__(self, rate_limit: float): method acquire (line 31) | def acquire(self) -> bool: function mcp2openai (line 45) | def mcp2openai(mcp_tool: Tool) -> dict: FILE: verl/tools/utils/search_r1_like_utils.py function call_search_api (line 34) | def call_search_api( function _passages2string (line 130) | def _passages2string(retrieval_result): function perform_single_search_batch (line 141) | def perform_single_search_batch( FILE: verl/tools/utils/tool_registry.py class ToolType (line 31) | class ToolType(Enum): function initialize_mcp_tool (line 36) | async def initialize_mcp_tool(tool_cls, tool_config) -> list: function get_tool_class (line 68) | def get_tool_class(cls_name): function initialize_tools_from_config (line 82) | def initialize_tools_from_config(tools_config_file): FILE: verl/trainer/config/algorithm.py class KLControlConfig (line 24) | class KLControlConfig(BaseConfig): class FilterGroupsConfig (line 43) | class FilterGroupsConfig(BaseConfig): class RolloutCorrectionConfig (line 60) | class RolloutCorrectionConfig(BaseConfig): method decoupled_token_is (line 182) | def decoupled_token_is(cls, threshold: float = 2.0) -> "RolloutCorrect... method decoupled_seq_is (line 196) | def decoupled_seq_is(cls, threshold: float = 2.0) -> "RolloutCorrectio... method decoupled_seq_is_rs (line 210) | def decoupled_seq_is_rs( method decoupled_geo_rs (line 235) | def decoupled_geo_rs( method bypass_ppo_clip (line 258) | def bypass_ppo_clip(cls) -> "RolloutCorrectionConfig": method bypass_ppo_clip_geo_rs (line 277) | def bypass_ppo_clip_geo_rs( method bypass_ppo_clip_k3_rs (line 301) | def bypass_ppo_clip_k3_rs( method bypass_pg_is (line 326) | def bypass_pg_is(cls, threshold: float = 2.0) -> "RolloutCorrectionCon... method bypass_pg_geo_rs (line 347) | def bypass_pg_geo_rs( method decoupled_geo_rs_seq_tis (line 371) | def decoupled_geo_rs_seq_tis( method decoupled_geo_rs_token_tis (line 396) | def decoupled_geo_rs_token_tis( method bypass_pg_geo_rs_seq_tis (line 421) | def bypass_pg_geo_rs_seq_tis( method bypass_pg_geo_rs_token_tis (line 449) | def bypass_pg_geo_rs_token_tis( method decoupled_k3_rs (line 479) | def decoupled_k3_rs( method decoupled_k3_rs_seq_tis (line 505) | def decoupled_k3_rs_seq_tis( method decoupled_k3_rs_token_tis (line 530) | def decoupled_k3_rs_token_tis( method disabled (line 556) | def disabled(cls) -> "RolloutCorrectionConfig": class AlgoConfig (line 568) | class AlgoConfig(BaseConfig): FILE: verl/trainer/config/config.py class CheckpointConfig (line 24) | class CheckpointConfig(BaseConfig): class ProfileConfig (line 43) | class ProfileConfig(BaseConfig): class BaseModelConfig (line 62) | class BaseModelConfig(BaseConfig): class ModuleConfig (line 84) | class ModuleConfig(BaseConfig): FILE: verl/trainer/constants_ppo.py function get_ppo_ray_runtime_env (line 38) | def get_ppo_ray_runtime_env(): FILE: verl/trainer/main_eval.py function process_item (line 34) | def process_item(config, data_source, response_lst, reward_data): function main (line 42) | def main(config): FILE: verl/trainer/main_generation_server.py function start_server (line 40) | async def start_server(config): function submit_request (line 66) | async def submit_request(server_address, **chat_complete_request): function generate_per_replica (line 82) | async def generate_per_replica(server_address, model_path: str, n_sample... function generate (line 106) | async def generate( function main (line 123) | def main(config): FILE: verl/trainer/main_ppo.py function main (line 36) | def main(config): function run_ppo (line 49) | def run_ppo(config, task_runner_class=None) -> None: class TaskRunner (line 108) | class TaskRunner: method __init__ (line 119) | def __init__(self): method add_actor_rollout_worker (line 123) | def add_actor_rollout_worker(self, config): method add_critic_worker (line 180) | def add_critic_worker(self, config): method init_resource_pool_mgr (line 218) | def init_resource_pool_mgr(self, config): method add_reward_model_resource_pool (line 243) | def add_reward_model_resource_pool(self, config): method add_ref_policy_worker (line 255) | def add_ref_policy_worker(self, config, ref_policy_cls): method run (line 269) | def run(self, config): function create_rl_dataset (line 362) | def create_rl_dataset(data_paths, data_config, tokenizer, processor, is_... function create_rl_sampler (line 392) | def create_rl_sampler(data_config, dataset): FILE: verl/trainer/ppo/core_algos.py function register_policy_loss (line 53) | def register_policy_loss(name: str) -> Callable[[PolicyLossFn], PolicyLo... function get_policy_loss_fn (line 70) | def get_policy_loss_fn(name): class AdvantageEstimator (line 88) | class AdvantageEstimator(str, Enum): function register_adv_est (line 116) | def register_adv_est(name_or_enum: str | AdvantageEstimator) -> Any: function get_adv_estimator_fn (line 137) | def get_adv_estimator_fn(name_or_enum): class AdaptiveKLController (line 153) | class AdaptiveKLController: method __init__ (line 159) | def __init__(self, init_kl_coef, target_kl, horizon): method update (line 164) | def update(self, current_kl, n_steps): class FixedKLController (line 177) | class FixedKLController: method __init__ (line 180) | def __init__(self, kl_coef): method update (line 183) | def update(self, current_kl, n_steps): function get_kl_controller (line 193) | def get_kl_controller(kl_ctrl): function compute_gae_advantage_return (line 216) | def compute_gae_advantage_return( function compute_grpo_outcome_advantage (line 268) | def compute_grpo_outcome_advantage( function compute_grpo_vectorized_outcome_advantage (line 335) | def compute_grpo_vectorized_outcome_advantage( function compute_gdpo_outcome_advantage (line 362) | def compute_gdpo_outcome_advantage( function compute_grpo_passk_outcome_advantage (line 472) | def compute_grpo_passk_outcome_advantage( function compute_reinforce_plus_plus_baseline_outcome_advantage (line 536) | def compute_reinforce_plus_plus_baseline_outcome_advantage( function compute_rloo_outcome_advantage (line 588) | def compute_rloo_outcome_advantage( function compute_opo_outcome_advantage (line 640) | def compute_opo_outcome_advantage( function compute_reinforce_plus_plus_outcome_advantage (line 694) | def compute_reinforce_plus_plus_outcome_advantage( function compute_remax_outcome_advantage (line 733) | def compute_remax_outcome_advantage( function compute_gpg_outcome_advantage (line 769) | def compute_gpg_outcome_advantage( function compute_rloo_vectorized_outcome_advantage (line 832) | def compute_rloo_vectorized_outcome_advantage( function compute_optimal_token_baseline_advantage (line 870) | def compute_optimal_token_baseline_advantage( function compute_multi_turn_optimal_token_baseline_advantage (line 989) | def compute_multi_turn_optimal_token_baseline_advantage( function compute_rewards (line 1122) | def compute_rewards(token_level_scores, old_log_prob, ref_log_prob, kl_r... function agg_loss (line 1138) | def agg_loss( function compute_policy_loss (line 1203) | def compute_policy_loss( function compute_policy_loss_vanilla (line 1279) | def compute_policy_loss_vanilla( function compute_policy_loss_dppo_tv (line 1373) | def compute_policy_loss_dppo_tv( function compute_policy_loss_dppo_kl (line 1454) | def compute_policy_loss_dppo_kl( function compute_policy_loss_gspo (line 1539) | def compute_policy_loss_gspo( function compute_policy_loss_sapo (line 1615) | def compute_policy_loss_sapo( function compute_policy_loss_gpg (line 1700) | def compute_policy_loss_gpg( function compute_policy_loss_clip_cov (line 1736) | def compute_policy_loss_clip_cov( function compute_policy_loss_kl_cov (line 1841) | def compute_policy_loss_kl_cov( function compute_policy_loss_geo_mean (line 1921) | def compute_policy_loss_geo_mean( function compute_policy_loss_cispo (line 2007) | def compute_policy_loss_cispo( function compute_entropy_loss (line 2067) | def compute_entropy_loss(logits, response_mask, loss_agg_mode: str = "to... function compute_value_loss (line 2084) | def compute_value_loss( function kl_penalty (line 2126) | def kl_penalty(logprob: torch.FloatTensor, ref_logprob: torch.FloatTenso... function kl_penalty_forward (line 2152) | def kl_penalty_forward(logprob: torch.FloatTensor, ref_logprob: torch.Fl... function compute_pf_ppo_reweight_data (line 2190) | def compute_pf_ppo_reweight_data( function compute_policy_loss_reinforce (line 2269) | def compute_policy_loss_reinforce( function compute_policy_loss_bypass_mode (line 2350) | def compute_policy_loss_bypass_mode( FILE: verl/trainer/ppo/metric_utils.py function reduce_metrics (line 31) | def reduce_metrics(metrics: dict[str, list[Any]]) -> dict[str, Any]: function _compute_response_info (line 51) | def _compute_response_info(batch: DataProto) -> dict[str, Any]: function compute_data_metrics (line 81) | def compute_data_metrics(batch: DataProto, use_critic: bool = True) -> d... function compute_timing_metrics (line 228) | def compute_timing_metrics(batch: DataProto, timing_raw: dict[str, float... function compute_throughout_metrics (line 270) | def compute_throughout_metrics(batch: DataProto, timing_raw: dict[str, f... function compute_variance_proxy_metrics (line 306) | def compute_variance_proxy_metrics(batch: DataProto, gradient_norm: floa... function bootstrap_metric (line 420) | def bootstrap_metric( function calc_maj_val (line 475) | def calc_maj_val(data: list[dict[str, Any]], vote_key: str, val_key: str... function process_validation_metrics (line 511) | def process_validation_metrics( FILE: verl/trainer/ppo/prefix_grouper_utils.py function build_position_ids_for_prefix_grouper (line 23) | def build_position_ids_for_prefix_grouper(prefix_grouper: PrefixGrouper)... function build_pg_from_micro_batch (line 46) | def build_pg_from_micro_batch( function pg_forward (line 103) | def pg_forward( function forward_micro_batch_with_prefix_grouper (line 150) | def forward_micro_batch_with_prefix_grouper( FILE: verl/trainer/ppo/ray_trainer.py function apply_kl_penalty (line 69) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 111) | def compute_response_mask(data: DataProto): function compute_advantage (line 129) | def compute_advantage( class RayPPOTrainer (line 227) | class RayPPOTrainer: method __init__ (line 237) | def __init__( method _create_dataloader (line 314) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _dump_generations (line 396) | def _dump_generations(self, inputs, outputs, gts, scores, reward_extra... method _log_rollout_data (line 424) | def _log_rollout_data( method _maybe_log_val_generations (line 456) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _get_gen_batch (line 480) | def _get_gen_batch(self, batch: DataProto) -> DataProto: method _compute_reward_colocate (line 496) | def _compute_reward_colocate(self, batch: DataProto) -> tuple[torch.Te... method _validate (line 504) | def _validate(self, merged: bool = False): method _val_metrics_update (line 629) | def _val_metrics_update(self, data_sources, sample_uids, reward_extra_... method _merge_validation_results (line 656) | def _merge_validation_results(self, result_a, result_b): method init_workers (line 680) | def init_workers(self): method _save_checkpoint (line 856) | def _save_checkpoint(self): method _load_checkpoint (line 925) | def _load_checkpoint(self): method _start_profiling (line 982) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 991) | def _stop_profiling(self, do_profile: bool) -> None: method _get_dp_size (line 1000) | def _get_dp_size(self, worker_group, role: str) -> int: method _balance_batch (line 1020) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method _compute_values (line 1090) | def _compute_values(self, batch: DataProto) -> DataProto: method _compute_ref_log_prob (line 1107) | def _compute_ref_log_prob(self, batch: DataProto) -> DataProto: method _compute_old_log_prob (line 1134) | def _compute_old_log_prob(self, batch: DataProto): method _update_actor (line 1165) | def _update_actor(self, batch: DataProto) -> DataProto: method _update_critic (line 1202) | def _update_critic(self, batch: DataProto) -> DataProto: method fit (line 1232) | def fit(self): FILE: verl/trainer/ppo/reward.py function _call_with_kwargs (line 32) | def _call_with_kwargs(raw_fn, extra_kwargs, *args, **kwargs): function _call_with_kwargs_async (line 41) | async def _call_with_kwargs_async(raw_fn, extra_kwargs, *args, **kwargs): function get_custom_reward_fn (line 50) | def get_custom_reward_fn(config: DictConfig) -> Optional[RawRewardFn]: function load_reward_manager (line 89) | def load_reward_manager(config: DictConfig, tokenizer: Any, **reward_kwa... function extract_reward (line 152) | def extract_reward(batch: DataProto): FILE: verl/trainer/ppo/rollout_corr_helper.py function _parse_rollout_rs_thresholds (line 93) | def _parse_rollout_rs_thresholds( function compute_rollout_rejection_mask (line 156) | def compute_rollout_rejection_mask( function compute_rs_metrics (line 375) | def compute_rs_metrics( function compute_rollout_correction_weights (line 481) | def compute_rollout_correction_weights( function compute_is_metrics (line 601) | def compute_is_metrics( function compute_rollout_correction_and_rejection_mask (line 716) | def compute_rollout_correction_and_rejection_mask( function compute_offpolicy_metrics (line 834) | def compute_offpolicy_metrics( function compute_rollout_correction_and_add_to_batch (line 943) | def compute_rollout_correction_and_add_to_batch( function compute_rollout_corr_metrics_from_logprobs (line 1000) | def compute_rollout_corr_metrics_from_logprobs( function apply_bypass_mode (line 1039) | def apply_bypass_mode( FILE: verl/trainer/ppo/utils.py class Role (line 26) | class Role(Enum): method __str__ (line 40) | def __str__(self): method _get_role_string (line 43) | def _get_role_string(self): method from_string (line 56) | def from_string(cls, name: str): function need_reference_policy (line 72) | def need_reference_policy( function need_reward_model (line 79) | def need_reward_model( function need_critic (line 86) | def need_critic(config: DictConfig) -> bool: FILE: verl/trainer/sft_trainer.py class SFTTrainer (line 50) | class SFTTrainer: method __init__ (line 51) | def __init__( method _build_ckpt_handler (line 82) | def _build_ckpt_handler(self): method _get_lora_train_meta (line 100) | def _get_lora_train_meta(self): method _build_config (line 138) | def _build_config(self): method _validate_profiler_interval (line 151) | def _validate_profiler_interval(self): method _build_engine (line 159) | def _build_engine(self): method _init_engine (line 179) | def _init_engine(self): method _build_dataset (line 200) | def _build_dataset(self): method _build_dataloader (line 224) | def _build_dataloader(self): method _get_batch_seqlens (line 272) | def _get_batch_seqlens(self, data): method fit (line 302) | def fit(self): function run_sft (line 442) | def run_sft(config): function main (line 452) | def main(config): function create_sft_dataset (line 458) | def create_sft_dataset(data_paths, data_config, tokenizer, processor, ma... FILE: verl/trainer/sft_trainer_ray.py class SFTTrainer (line 48) | class SFTTrainer: method __init__ (line 49) | def __init__( method _build_ckpt_handler (line 69) | def _build_ckpt_handler(self): method _build_config (line 86) | def _build_config(self): method _validate_profiler_interval (line 99) | def _validate_profiler_interval(self): method _build_engine (line 107) | def _build_engine(self): method _build_dataset (line 147) | def _build_dataset(self): method _build_dataloader (line 171) | def _build_dataloader(self): method _get_batch_seqlens (line 237) | def _get_batch_seqlens(self, data): method fit (line 246) | def fit(self): function run_sft (line 363) | def run_sft(config): function main (line 370) | def main(config): function create_sft_dataset (line 376) | def create_sft_dataset(data_paths, data_config, tokenizer, processor, ma... FILE: verl/utils/activation_offload.py function _get_unique_tensor_key (line 35) | def _get_unique_tensor_key(tensor): class FSDPParameterFilter (line 40) | class FSDPParameterFilter: method __init__ (line 41) | def __init__(self): method __call__ (line 44) | def __call__(self, tensor): method update_model_parameters (line 47) | def update_model_parameters(self, model): class CpuOffloadHookWithOffloadHandler (line 54) | class CpuOffloadHookWithOffloadHandler: method __init__ (line 62) | def __init__( method __enter__ (line 73) | def __enter__(self): method __exit__ (line 77) | def __exit__(self, *args: Any): method on_save_for_backward (line 81) | def on_save_for_backward(self, tensor: torch.Tensor) -> Any: method on_get_saved_tensor (line 85) | def on_get_saved_tensor(self, saved_state: Any) -> torch.Tensor: class OffloadHandler (line 90) | class OffloadHandler: method __init__ (line 93) | def __init__(self) -> None: method tensor_push (line 96) | def tensor_push(self, tensor: torch.Tensor, **kwargs) -> Any: method tensor_pop (line 103) | def tensor_pop(self, tensor_tag: Any, **kwargs): class GroupCommitFunction (line 111) | class GroupCommitFunction(torch.autograd.Function): method forward (line 119) | def forward(ctx, tensor, cpu_offload_handler): method backward (line 127) | def backward(ctx, grad_output): class SynchronizedGroupOffloadHandler (line 137) | class SynchronizedGroupOffloadHandler(OffloadHandler): method __init__ (line 143) | def __init__(self, num_offload_group, tensor_need_offloading_checker=(... method groupid_reset (line 151) | def groupid_reset(self): method on_group_commit_forward (line 161) | def on_group_commit_forward(self): method on_group_commit_backward (line 167) | def on_group_commit_backward(self): method offload (line 173) | def offload(src_tensor, pin_memory=True): method reload (line 188) | def reload(state, non_blocking=None): method tensor_push (line 195) | def tensor_push(self, tensor: torch.Tensor, **kwargs): method tensor_pop (line 210) | def tensor_pop(self, tensor_tag, **kwargs): class AsyncDoubleBufferGroupOffloadHandler (line 221) | class AsyncDoubleBufferGroupOffloadHandler(SynchronizedGroupOffloadHandl... method __init__ (line 228) | def __init__( method tensor_push (line 263) | def tensor_push(self, tensor: torch.Tensor, **kwargs) -> Any: method tensor_pop (line 285) | def tensor_pop(self, tensor_tag, **kwargs): method bulk_offload_group (line 298) | def bulk_offload_group(self, group_to_offload): method synchronize_on_group_commit_forward (line 319) | def synchronize_on_group_commit_forward(self, current_group): method on_group_commit_forward (line 347) | def on_group_commit_forward(self): method bulk_reload_group (line 355) | def bulk_reload_group(self, group_to_reload): method on_group_commit_backward (line 373) | def on_group_commit_backward(self): function get_activation_offload_context (line 398) | def get_activation_offload_context( class ActivationHandler (line 416) | class ActivationHandler: method __init__ (line 417) | def __init__(self, offload_ctx, sync_func, tensor_filter, enable_ckpt): method pre_forward (line 428) | def pre_forward(self, module): method post_forward (line 433) | def post_forward(self, module): method _pack_kwargs (line 437) | def _pack_kwargs(self, *args, **kwargs): method _unpack_kwargs (line 446) | def _unpack_kwargs(self, flat_args, kwarg_keys): method _ckpt_forward (line 454) | def _ckpt_forward(self, forward_method, *args, **kwargs): method forward (line 469) | def forward(self, module, forward_method, *args, **kwargs): method wrap_module_forward_method (line 485) | def wrap_module_forward_method(self, module): function enable_activation_offloading (line 500) | def enable_activation_offloading(model, strategy, enable_ckpt=False): FILE: verl/utils/attention_utils.py function _get_attention_functions (line 20) | def _get_attention_functions() -> tuple[Callable, Callable, Callable, Ca... function index_first_axis (line 37) | def index_first_axis(*args, **kwargs): function pad_input (line 53) | def pad_input(*args, **kwargs): function rearrange (line 69) | def rearrange(*args, **kwargs): function unpad_input (line 84) | def unpad_input(*args, **kwargs): FILE: verl/utils/chat_template.py function initialize_system_prompt (line 13) | def initialize_system_prompt(tokenizer, **apply_chat_template_kwargs) ->... function extract_system_prompt_and_generation (line 35) | def extract_system_prompt_and_generation(tokenizer): function apply_chat_template (line 53) | def apply_chat_template( FILE: verl/utils/checkpoint/checkpoint_handler.py function extract_step (line 33) | def extract_step(path): class OrchestrationMode (line 44) | class OrchestrationMode(Enum): class CheckpointHandler (line 49) | class CheckpointHandler: method __init__ (line 56) | def __init__( method save_checkpoint (line 90) | def save_checkpoint(self, step): method load_checkpoint (line 143) | def load_checkpoint(self): method _load_dataloader_state (line 170) | def _load_dataloader_state(self, checkpoint_path: str): method _determine_resume_path (line 196) | def _determine_resume_path(self): method _find_latest_checkpoint (line 221) | def _find_latest_checkpoint(self): FILE: verl/utils/checkpoint/checkpoint_manager.py class BaseCheckpointManager (line 29) | class BaseCheckpointManager: method __init__ (line 43) | def __init__( method should_save_model (line 72) | def should_save_model(self) -> bool: method should_save_optimizer (line 79) | def should_save_optimizer(self) -> bool: method should_save_extra (line 86) | def should_save_extra(self) -> bool: method should_save_hf_model (line 93) | def should_save_hf_model(self) -> bool: method should_load_model (line 101) | def should_load_model(self) -> bool: method should_load_optimizer (line 108) | def should_load_optimizer(self) -> bool: method should_load_extra (line 115) | def should_load_extra(self) -> bool: method load_checkpoint (line 121) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 124) | def save_checkpoint( method checkpath (line 130) | def checkpath(local_path: str, hdfs_path: str): method remove_previous_save_local_path (line 134) | def remove_previous_save_local_path(self, path): method ensure_checkpoint_capacity (line 144) | def ensure_checkpoint_capacity(self, max_ckpt_to_keep: int): method register_checkpoint (line 159) | def register_checkpoint(self, new_path: str, max_ckpt_to_keep: int): method get_rng_state (line 175) | def get_rng_state(): method load_rng_state (line 188) | def load_rng_state(rng_state): function find_latest_ckpt_path (line 197) | def find_latest_ckpt_path(path, directory_format="global_step_{}"): function get_checkpoint_tracker_filename (line 230) | def get_checkpoint_tracker_filename(root_path: str): function should_save_ckpt_esi (line 237) | def should_save_ckpt_esi(max_steps_duration: float, save_ckpt_duration: ... FILE: verl/utils/checkpoint/fsdp_checkpoint_manager.py class FSDPConfig (line 45) | class FSDPConfig: class FSDPCheckpointManager (line 57) | class FSDPCheckpointManager(BaseCheckpointManager): method __init__ (line 77) | def __init__( method load_checkpoint (line 102) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 184) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl/utils/checkpoint/megatron_checkpoint_manager.py class MegatronCheckpointManager (line 57) | class MegatronCheckpointManager(BaseCheckpointManager): method __init__ (line 111) | def __init__( method get_rng_state (line 170) | def get_rng_state(self, use_dist_ckpt: bool = True, data_parallel_rand... method get_checkpoint_name (line 204) | def get_checkpoint_name( method generate_state_dict (line 250) | def generate_state_dict( method _build_sharded_state_dict_metadata (line 306) | def _build_sharded_state_dict_metadata(self) -> dict: method load_rng_states (line 344) | def load_rng_states(self, rng_states, data_parallel_random_init=False,... method load_checkpoint (line 362) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 491) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl/utils/config.py function omega_conf_to_dataclass (line 23) | def omega_conf_to_dataclass(config: DictConfig | dict, dataclass_type: O... function update_dict_with_config (line 68) | def update_dict_with_config(dictionary: dict, config: DictConfig): function validate_config (line 74) | def validate_config( FILE: verl/utils/dataset/dataset_utils.py class DatasetPadMode (line 22) | class DatasetPadMode(str, Enum): class SFTTensorCollator (line 30) | class SFTTensorCollator: method __init__ (line 37) | def __init__(self, pad_mode: DatasetPadMode = DatasetPadMode.LEFT_RIGHT): method __call__ (line 40) | def __call__(self, batch: list[dict[str, any]]) -> dict[str, any]: method collate_variable_batch (line 50) | def collate_variable_batch(self, batch: list[dict[str, any]]) -> dict[... FILE: verl/utils/dataset/multiturn_sft_dataset.py function once (line 45) | def once(func): function print_assembled_message (line 58) | def print_assembled_message(tokenizer, message_list, input_ids, loss_mas... class MultiTurnSFTDataset (line 73) | class MultiTurnSFTDataset(Dataset): method __init__ (line 85) | def __init__( method _download (line 131) | def _download(self): method _read_files_and_process (line 135) | def _read_files_and_process(self): method __len__ (line 182) | def __len__(self): method _process_single_message (line 185) | def _process_single_message( method _build_messages (line 241) | def _build_messages(self, example: dict): method __getitem__ (line 289) | def __getitem__(self, item): method sanity_check (line 418) | def sanity_check(self, input_ids: torch.Tensor, messages: list[dict], ... FILE: verl/utils/dataset/rl_dataset.py function collate_fn (line 40) | def collate_fn(data_list: list[dict]) -> dict: class RLHFDataset (line 71) | class RLHFDataset(Dataset): method __init__ (line 88) | def __init__( method _download (line 147) | def _download(self, use_origin_parquet=False): method _read_files_and_tokenize (line 154) | def _read_files_and_tokenize(self): method maybe_filter_out_long_prompts (line 182) | def maybe_filter_out_long_prompts(self, dataframe: datasets.Dataset = ... method resume_dataset_state (line 281) | def resume_dataset_state(self): method __getstate__ (line 290) | def __getstate__(self): method __len__ (line 300) | def __len__(self): method _build_messages (line 303) | def _build_messages(self, example: dict): method __getitem__ (line 359) | def __getitem__(self, item): method process_vision_info (line 383) | async def process_vision_info( method split (line 416) | def split(self, num_splits: int): function get_dataset_class (line 472) | def get_dataset_class(data_config: DictConfig): FILE: verl/utils/dataset/rm_dataset.py function download_files_distributed (line 26) | def download_files_distributed(download_fn): class RMDataset (line 40) | class RMDataset(Dataset): method __init__ (line 41) | def __init__( method _download (line 77) | def _download(self): method _read_files_and_tokenize (line 92) | def _read_files_and_tokenize(self): method __len__ (line 117) | def __len__(self): method _pad_to_length (line 120) | def _pad_to_length(self, input_ids, attention_mask): method __getitem__ (line 136) | def __getitem__(self, item): FILE: verl/utils/dataset/vision_utils.py function process_image (line 22) | def process_image(image: dict | Image.Image, image_patch_size: int = 14)... function process_video (line 67) | def process_video( function process_multi_modal_inputs_for_minicpmo (line 109) | def process_multi_modal_inputs_for_minicpmo(input_ids, attention_mask, p... FILE: verl/utils/debug/metrics.py function calculate_token_list_diff (line 23) | def calculate_token_list_diff(tensor1: torch.Tensor, tensor2: torch.Tens... function pearson_correlation_coefficient (line 48) | def pearson_correlation_coefficient(tensor1: torch.Tensor, tensor2: torc... function calculate_log_prob_diff (line 58) | def calculate_log_prob_diff(log_probs1: torch.Tensor, log_probs2: torch.... function calculate_debug_metrics (line 63) | def calculate_debug_metrics(data: DataProto) -> dict: FILE: verl/utils/debug/trajectory_tracker.py function save_to_hdfs (line 34) | def save_to_hdfs(data: io.BytesIO, name, hdfs_dir, verbose): class TrajectoryTracker (line 51) | class TrajectoryTracker: method __init__ (line 52) | def __init__(self, hdfs_dir, verbose) -> None: method dump (line 59) | def dump(self, data: io.BytesIO, name): method wait_for_hdfs (line 63) | def wait_for_hdfs(self): function dump_data (line 69) | def dump_data(data, name): function get_trajectory_tracker (line 79) | def get_trajectory_tracker(): function process (line 95) | def process(iter): FILE: verl/utils/device.py function is_torch_npu_available (line 22) | def is_torch_npu_available(check_device=True) -> bool: function get_resource_name (line 50) | def get_resource_name() -> str: function get_visible_devices_keyword (line 58) | def get_visible_devices_keyword() -> str: function get_device_name (line 71) | def get_device_name() -> str: function get_torch_device (line 89) | def get_torch_device(): function get_device_id (line 107) | def get_device_id() -> int: function get_nccl_backend (line 116) | def get_nccl_backend() -> str: function set_expandable_segments (line 132) | def set_expandable_segments(enable: bool) -> None: function auto_set_device (line 149) | def auto_set_device(config) -> None: function get_device_capability (line 170) | def get_device_capability(device_id: int = 0) -> tuple[int | None, int |... function get_npu_versions (line 187) | def get_npu_versions() -> tuple[str, str]: function check_ipc_version_support (line 241) | def check_ipc_version_support(software_version: str, cann_version: str) ... function is_support_ipc (line 298) | def is_support_ipc() -> bool: FILE: verl/utils/distributed.py function set_numa_affinity (line 28) | def set_numa_affinity(): function initialize_global_process_group (line 56) | def initialize_global_process_group(timeout_second=36000): function destroy_global_process_group (line 71) | def destroy_global_process_group(): function initialize_global_process_group_ray (line 76) | def initialize_global_process_group_ray(timeout_second=None, backend=None): function stateless_init_process_group (line 95) | def stateless_init_process_group(master_address, master_port, rank, worl... FILE: verl/utils/experimental/torch_functional.py function _fused_linear_for_ppo_fwd (line 20) | def _fused_linear_for_ppo_fwd( function _fused_linear_for_ppo_bwd (line 40) | def _fused_linear_for_ppo_bwd( class FusedLinearForPPOFunction (line 75) | class FusedLinearForPPOFunction(torch.autograd.Function): method forward (line 77) | def forward( method backward (line 132) | def backward(ctx, dlog_probs: Optional[torch.FloatTensor], dentropy: O... class FusedLinearForPPO (line 196) | class FusedLinearForPPO(torch.nn.Module): method __init__ (line 197) | def __init__(self, chunk_size: int = 512): method forward (line 202) | def forward( FILE: verl/utils/flops_counter.py function get_device_flops (line 43) | def get_device_flops(unit="T", device_name=None): function _estimate_qwen2_flops (line 88) | def _estimate_qwen2_flops(config, tokens_sum, batch_seqlens, delta_time): function _estimate_qwen3_vl_flops (line 123) | def _estimate_qwen3_vl_flops(config, tokens_sum, batch_seqlens, delta_ti... function _estimate_qwen3_vl_moe_flops (line 167) | def _estimate_qwen3_vl_moe_flops(config, tokens_sum, batch_seqlens, delt... function _estimate_qwen3_vit_flop (line 215) | def _estimate_qwen3_vit_flop(images_seqlens, config): function _estimate_deepseek_v3_flops (line 264) | def _estimate_deepseek_v3_flops(config, tokens_sum, batch_seqlens, delta... function _estimate_qwen2_moe_flops (line 318) | def _estimate_qwen2_moe_flops(config, tokens_sum, batch_seqlens, delta_t... function _estimate_gemma3_flops (line 355) | def _estimate_gemma3_flops(config, tokens_sum, batch_seqlens, delta_time): function _estimate_apertus_flops (line 423) | def _estimate_apertus_flops(config, tokens_sum, batch_seqlens, delta_time): function _estimate_gpt_oss_flops (line 463) | def _estimate_gpt_oss_flops(config, tokens_sum, batch_seqlens, delta_time): function _estimate_unknown_flops (line 534) | def _estimate_unknown_flops(config, tokens_sum, batch_seqlens, delta_time): class FlopsCounter (line 561) | class FlopsCounter: method __init__ (line 571) | def __init__(self, config: PretrainedConfig): method estimate_flops (line 582) | def estimate_flops(self, batch_seqlens, delta_time, **kargs): FILE: verl/utils/fp8_utils.py class FP8QuantizerHelper (line 27) | class FP8QuantizerHelper: method __init__ (line 28) | def __init__(self, quant_config): method should_quantize_param (line 31) | def should_quantize_param(self, param_name): method quant_weights_by_name (line 85) | def quant_weights_by_name(self, weights, dtype=torch.bfloat16): FILE: verl/utils/fs.py function is_non_local (line 34) | def is_non_local(path): function md5_encode (line 46) | def md5_encode(path: str) -> str: function get_local_temp_path (line 61) | def get_local_temp_path(hdfs_path: str, cache_dir: str) -> str: function verify_copy (line 82) | def verify_copy(src: str, dest: str) -> bool: function copy_to_shm (line 141) | def copy_to_shm(src: str): function _record_directory_structure (line 164) | def _record_directory_structure(folder_path): function _check_directory_structure (line 178) | def _check_directory_structure(folder_path, record_file): function copy_to_local (line 195) | def copy_to_local( function copy_local_path_from_hdfs (line 232) | def copy_local_path_from_hdfs( function local_mkdir_safe (line 277) | def local_mkdir_safe(path): FILE: verl/utils/fsdp_utils.py function init_fn (line 53) | def init_fn(x: torch.nn.Module): function get_init_weight_context_manager (line 60) | def get_init_weight_context_manager(use_meta_tensor=True, mesh: DeviceMe... function get_fsdp_wrap_policy (line 76) | def get_fsdp_wrap_policy(module, config=None, is_lora=False): function offload_fsdp_model_to_cpu (line 147) | def offload_fsdp_model_to_cpu(model: FSDP, empty_cache: bool = True): function offload_fsdp2_model_to_cpu (line 174) | def offload_fsdp2_model_to_cpu(model, empty_cache: bool = True): function load_fsdp_model_to_gpu (line 181) | def load_fsdp_model_to_gpu(model: FSDP): function load_fsdp2_model_to_gpu (line 201) | def load_fsdp2_model_to_gpu(model): function offload_fsdp_optimizer (line 207) | def offload_fsdp_optimizer(optimizer): function load_fsdp_optimizer (line 219) | def load_fsdp_optimizer(optimizer, device_id): function meta_device_init (line 231) | def meta_device_init(): function parallel_load_safetensors (line 262) | def parallel_load_safetensors(filepath): function parallel_init_module_fn (line 318) | def parallel_init_module_fn(module: torch.nn.Module, shard_states: dict[... function fsdp_version (line 402) | def fsdp_version(model): function get_fsdp_state_ctx (line 411) | def get_fsdp_state_ctx(model, state_type, state_cfg, optim_cfg): function get_fsdp_full_state_dict (line 418) | def get_fsdp_full_state_dict(model: torch.nn.Module, offload_to_cpu: boo... function fsdp2_load_full_state_dict (line 454) | def fsdp2_load_full_state_dict(model: torch.nn.Module, full_state: dict,... function maybe_patch_fsdp_module (line 492) | def maybe_patch_fsdp_module(model): function _select_fsdp2_wrap_targets (line 510) | def _select_fsdp2_wrap_targets(model, fsdp_transformer_layer_cls_to_wrap): function apply_fsdp2 (line 534) | def apply_fsdp2(model, fsdp_kwargs, config): function get_shard_placement_fn (line 562) | def get_shard_placement_fn(fsdp_size): function fsdp2_clip_grad_norm_ (line 575) | def fsdp2_clip_grad_norm_(parameters, max_norm, norm_type=2.0, error_if_... function layered_summon_lora_params (line 591) | def layered_summon_lora_params(fsdp_module) -> OrderedDict: function collect_lora_params (line 633) | def collect_lora_params(module: FSDP, layered_summon: bool, base_sync_do... function replace_lora_wrapper (line 691) | def replace_lora_wrapper(k, peft_config): function set_reshard_after_forward (line 719) | def set_reshard_after_forward(module: FSDPModule, reshard_after_forward:... function normalize_peft_param_name (line 753) | def normalize_peft_param_name(params: dict) -> dict: function _merge_or_unmerge_lora_ (line 776) | def _merge_or_unmerge_lora_(module, merge: bool): function _clean_merged_lora_ (line 796) | def _clean_merged_lora_(module): function fsdp_merge_unmerge (line 808) | def fsdp_merge_unmerge(module: nn.Module, do_merge: bool): function backup_base_model_weights (line 833) | def backup_base_model_weights(module): function restore_base_model_weights (line 864) | def restore_base_model_weights(module, backup): function merged_lora_context (line 881) | def merged_lora_context(actor, backup_adapters=False): function fsdp2_sharded_save_to_cpu (line 916) | def fsdp2_sharded_save_to_cpu( function fsdp2_sharded_load_from_cpu (line 958) | def fsdp2_sharded_load_from_cpu( FILE: verl/utils/groupwise.py function _resolve_device (line 54) | def _resolve_device(explicit: Optional[torch.device | str]) -> torch.dev... function _to_1d_numpy_object_array (line 77) | def _to_1d_numpy_object_array(x: Any) -> np.ndarray: function as_torch_index (line 91) | def as_torch_index(index: Any, device: torch.device | str | None = None)... function group_mean_std (line 164) | def group_mean_std( FILE: verl/utils/hdfs_io.py function exists (line 27) | def exists(path: str, **kwargs) -> bool: function _exists (line 43) | def _exists(file_path: str): function makedirs (line 50) | def makedirs(name, mode=0o777, exist_ok=False, **kwargs) -> None: function _mkdir (line 75) | def _mkdir(file_path: str) -> bool: function copy (line 84) | def copy(src: str, dst: str, **kwargs) -> bool: function _copy (line 113) | def _copy(from_path: str, to_path: str, timeout: int = None) -> bool: function _run_cmd (line 140) | def _run_cmd(cmd: str, timeout=None): function _hdfs_cmd (line 144) | def _hdfs_cmd(cmd: str) -> str: function _is_non_local (line 148) | def _is_non_local(path: str): FILE: verl/utils/import_utils.py function is_megatron_core_available (line 28) | def is_megatron_core_available(): function is_vllm_available (line 37) | def is_vllm_available(): function is_sglang_available (line 46) | def is_sglang_available(): function is_nvtx_available (line 55) | def is_nvtx_available(): function is_trl_available (line 64) | def is_trl_available(): function import_external_libs (line 72) | def import_external_libs(external_libs=None): function load_module (line 87) | def load_module(module_path: str, module_name: Optional[str] = None) -> ... function _get_qualified_name (line 142) | def _get_qualified_name(func): function deprecated (line 149) | def deprecated(replacement: str = ""): function load_extern_object (line 184) | def load_extern_object(module_path: str, object_name: str) -> object: function load_class_from_fqn (line 200) | def load_class_from_fqn(fqn: str, description: str = "class") -> type: function load_extern_type (line 234) | def load_extern_type(file_path: str, type_name: str) -> type: FILE: verl/utils/kernel/fp8_kernel.py function ceil_div (line 41) | def ceil_div(x: int, y: int) -> int: function is_triton_available (line 46) | def is_triton_available() -> bool: function _blockwise_cast_to_fp8_kernel (line 54) | def _blockwise_cast_to_fp8_kernel( function blockwise_cast_to_fp8_triton (line 110) | def blockwise_cast_to_fp8_triton( function scaled_fp8_blockwise_triton (line 173) | def scaled_fp8_blockwise_triton( function _scaled_fp8_blockwise_pytorch (line 227) | def _scaled_fp8_blockwise_pytorch( function scaled_fp8_blockwise (line 312) | def scaled_fp8_blockwise( FILE: verl/utils/kernel/kernels.py function null_decorator (line 61) | def null_decorator(*args, **kwargs): function alloc_fn (line 78) | def alloc_fn(size: int, alignment: int, stream: typing.Optional[int]): class EntropyReductionEnum (line 103) | class EntropyReductionEnum: function get_entropy_reduction_enum_number (line 113) | def get_entropy_reduction_enum_number(reduction: str) -> int: function get_entropy_reduction_enum (line 129) | def get_entropy_reduction_enum(ce_reduction: int) -> EntropyReductionEnum: class BackwardEnum (line 146) | class BackwardEnum: class Config (line 160) | class Config: function set_backward_method (line 175) | def set_backward_method(backward_method: BackwardEnum): function efficient_entropy_kernel_general_mainloop (line 188) | def efficient_entropy_kernel_general_mainloop( function efficient_entropy_triton_kernel_epilogue (line 351) | def efficient_entropy_triton_kernel_epilogue( function efficient_entropy_triton_kernel_epilogue_tp (line 443) | def efficient_entropy_triton_kernel_epilogue_tp( function efficient_entropy_triton_epilogue_tp_update (line 519) | def efficient_entropy_triton_epilogue_tp_update( function efficient_entropy_forward (line 566) | def efficient_entropy_forward( function efficient_entropy_backward_kernel_general_mainloop_MN (line 771) | def efficient_entropy_backward_kernel_general_mainloop_MN( function efficient_entropy_backward_kernel_d_hidden (line 980) | def efficient_entropy_backward_kernel_d_hidden( function efficient_entropy_backward_kernel_d_weight (line 1107) | def efficient_entropy_backward_kernel_d_weight( function efficient_entropy_backward_kernel_general_d_logits (line 1227) | def efficient_entropy_backward_kernel_general_d_logits( function efficient_entropy_backward_kernel_general_d_logits_split_N (line 1388) | def efficient_entropy_backward_kernel_general_d_logits_split_N( function efficient_entropy_backward (line 1515) | def efficient_entropy_backward( FILE: verl/utils/kernel/linear_cross_entropy.py class LinearCrossEntropy (line 38) | class LinearCrossEntropy(torch.autograd.Function): method forward (line 40) | def forward( method backward (line 90) | def backward(ctx, dlogprobs: torch.Tensor, dentropy: torch.Tensor) -> ... FILE: verl/utils/logger/aggregate_logger.py function concat_dict_to_str (line 26) | def concat_dict_to_str(dict: dict, step): class LocalLogger (line 35) | class LocalLogger: method __init__ (line 43) | def __init__(self, print_to_console=True): method flush (line 46) | def flush(self): method log (line 49) | def log(self, data, step): class DecoratorLoggerBase (line 54) | class DecoratorLoggerBase: method __init__ (line 66) | def __init__( method log_by_print (line 78) | def log_by_print(self, log_str): method log_by_logging (line 82) | def log_by_logging(self, log_str): function print_rank_0 (line 89) | def print_rank_0(message): function print_with_rank (line 98) | def print_with_rank(message: str, rank: int = 0, log_only_rank_0: bool =... function print_with_rank_and_timer (line 112) | def print_with_rank_and_timer(message: str, rank: int = 0, log_only_rank... function log_with_rank (line 128) | def log_with_rank(message: str, rank, logger: logging.Logger, level=logg... FILE: verl/utils/logging_utils.py function set_basic_config (line 21) | def set_basic_config(level): function log_to_file (line 28) | def log_to_file(string): FILE: verl/utils/megatron/dist_checkpointing.py function save_dist_checkpointing (line 29) | def save_dist_checkpointing( function load_dist_checkpointing (line 56) | def load_dist_checkpointing(sharded_state_dict, ckpt_dir): FILE: verl/utils/megatron/memory.py class MemoryBuffer (line 20) | class MemoryBuffer: method __init__ (line 21) | def __init__(self, numel, numel_padded, dtype): method zero (line 27) | def zero(self): method get (line 31) | def get(self, shape, start_index): FILE: verl/utils/megatron/optimizer.py function init_megatron_optim_config (line 24) | def init_megatron_optim_config( function get_megatron_optimizer (line 65) | def get_megatron_optimizer( function get_megatron_optimizer_param_scheduler (line 76) | def get_megatron_optimizer_param_scheduler( function get_megatron_last_lr (line 116) | def get_megatron_last_lr(optimizer): FILE: verl/utils/megatron/pipeline_parallel.py function compute_transformers_input_shapes (line 22) | def compute_transformers_input_shapes(batches, meta_info): function make_batch_generator (line 49) | def make_batch_generator(batches, vpp_size): FILE: verl/utils/megatron/router_replay_patch.py class RouterReplayAction (line 38) | class RouterReplayAction(Enum): class RouterReplay (line 44) | class RouterReplay: method set_replay_data (line 55) | def set_replay_data(all_layers_topk_indices: list): method get_recorded_data (line 71) | def get_recorded_data() -> list: method clear_global_indices (line 79) | def clear_global_indices(): method __init__ (line 84) | def __init__(self): method set_target_indices (line 92) | def set_target_indices(self, topk_indices: torch.Tensor): method get_recorded_indices (line 97) | def get_recorded_indices(self): method record_indices (line 101) | def record_indices(self, topk_indices: torch.Tensor): method clear_indices (line 105) | def clear_indices(self): method set_router_replay_action (line 111) | def set_router_replay_action(self, router_replay_action: RouterReplayA... method clear_router_replay_action (line 115) | def clear_router_replay_action(self): method set_global_router_replay_action (line 120) | def set_global_router_replay_action(router_replay_action: RouterReplay... method clear_global_router_replay_action (line 126) | def clear_global_router_replay_action(): function _patched_topk_routing_with_score_function (line 132) | def _patched_topk_routing_with_score_function( function _get_aux_loss_coeff (line 242) | def _get_aux_loss_coeff(_self, aux_loss_type: str) -> float: function _is_aux_loss_enabled (line 258) | def _is_aux_loss_enabled(_self) -> bool: function patched_routing (line 266) | def patched_routing(self, logits: torch.Tensor, *args, **kwargs): function apply_router_replay_patch (line 337) | def apply_router_replay_patch(): FILE: verl/utils/megatron/router_replay_utils.py function get_num_layers_to_build (line 51) | def get_num_layers_to_build( function is_moe_layer (line 176) | def is_moe_layer(tf_config, layer_idx): function get_moe_num_layers_to_build (line 187) | def get_moe_num_layers_to_build( function merge_router_topk_indices (line 219) | def merge_router_topk_indices(attention_mask, input_ids, mini_layer_topk... function set_router_replay_data (line 269) | def set_router_replay_data(layers_topk_idx, attention_mask, tf_config, v... function reorder_and_merge_vpp_layers (line 327) | def reorder_and_merge_vpp_layers( function get_current_rank_layer_info (line 378) | def get_current_rank_layer_info(tf_config, vp_rank=None): function pp_gather (line 408) | def pp_gather(local_layers_router_map, tf_config): class RouterReplayHelper (line 472) | class RouterReplayHelper: method get_micro_batch_router_list (line 476) | def get_micro_batch_router_list(tf_config, vp_rank=None): method is_r2_record_action (line 508) | def is_r2_record_action(tf_config, vp_rank=None) -> bool: method is_replay_forward_action (line 518) | def is_replay_forward_action(tf_config, vp_rank=None) -> bool: method is_replay_backward_action (line 530) | def is_replay_backward_action(tf_config, vp_rank=None) -> bool: FILE: verl/utils/megatron/sequence_parallel.py function mark_parameter_as_sequence_parallel (line 21) | def mark_parameter_as_sequence_parallel(parameter): function is_sequence_parallel_param (line 25) | def is_sequence_parallel_param(param): function pad_to_sequence_parallel (line 29) | def pad_to_sequence_parallel(unpad_tokens: torch.Tensor): FILE: verl/utils/megatron/tensor_parallel.py function update_kwargs_with_config (line 30) | def update_kwargs_with_config(dictionary: dict, config: "ModelParallelCo... function get_default_kwargs_for_model_parallel_config (line 35) | def get_default_kwargs_for_model_parallel_config(): function get_default_model_parallel_config (line 46) | def get_default_model_parallel_config(): function get_common_default_kwargs_for_parallel_linear (line 52) | def get_common_default_kwargs_for_parallel_linear(): function get_default_kwargs_for_column_parallel_linear (line 63) | def get_default_kwargs_for_column_parallel_linear(): function get_default_kwargs_for_row_parallel_linear (line 79) | def get_default_kwargs_for_row_parallel_linear(): function get_default_kwargs_for_parallel_embedding (line 84) | def get_default_kwargs_for_parallel_embedding(): function is_tensor_parallel_param (line 95) | def is_tensor_parallel_param(param): function get_tensor_parallel_partition_dim (line 99) | def get_tensor_parallel_partition_dim(param): function get_tensor_parallel_partition_stride (line 104) | def get_tensor_parallel_partition_stride(param): class _VocabParallelEntropy (line 109) | class _VocabParallelEntropy(torch.autograd.Function): method forward (line 111) | def forward(ctx, vocab_parallel_logits: torch.Tensor) -> torch.Tensor: method backward (line 130) | def backward(ctx, grad_output: torch.Tensor) -> torch.Tensor: function vocab_parallel_entropy (line 142) | def vocab_parallel_entropy(vocab_parallel_logits: torch.Tensor) -> torch... function vocab_parallel_log_probs_from_logits (line 154) | def vocab_parallel_log_probs_from_logits(logits, labels): function vocab_parallel_log_probs_from_logits_response_rmpad (line 161) | def vocab_parallel_log_probs_from_logits_response_rmpad(input_ids, atten... FILE: verl/utils/megatron_peft_utils.py function _get_rank_checkpoint_path (line 73) | def _get_rank_checkpoint_path(base_path: str) -> str: function get_adapter_state_dict (line 104) | def get_adapter_state_dict(model): function save_adapter_checkpoint (line 128) | def save_adapter_checkpoint( function load_adapter_checkpoint (line 176) | def load_adapter_checkpoint( function count_adapter_parameters (line 237) | def count_adapter_parameters(model): function print_adapter_info (line 266) | def print_adapter_info(model): function convert_megatron_to_hf_target_modules (line 278) | def convert_megatron_to_hf_target_modules(megatron_modules: list[str]) -... function build_peft_config_for_vllm (line 297) | def build_peft_config_for_vllm(lora_config: dict) -> dict: function add_base_layer_suffix (line 325) | def add_base_layer_suffix( FILE: verl/utils/megatron_utils.py function get_model_config (line 52) | def get_model_config(model): function get_model (line 56) | def get_model( class McoreModuleWrapperConfig (line 171) | class McoreModuleWrapperConfig: function make_megatron_module (line 180) | def make_megatron_module( function unwrap_model (line 322) | def unwrap_model(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES): function convert_config (line 337) | def convert_config(hf_config: PretrainedConfig, megatron_config) -> Tran... function mcore_model_parallel_config (line 393) | def mcore_model_parallel_config( function offload_megatron_model_to_cpu (line 420) | def offload_megatron_model_to_cpu(models): function load_megatron_model_to_gpu (line 461) | def load_megatron_model_to_gpu(models, load_grad=True, load_frozen_param... function offload_megatron_copy_params (line 509) | def offload_megatron_copy_params(optimizers): function load_megatron_copy_params (line 550) | def load_megatron_copy_params(optimizers): function offload_megatron_optimizer (line 591) | def offload_megatron_optimizer(optimizers): function load_megatron_optimizer (line 637) | def load_megatron_optimizer(optimizers): function get_dist_checkpoint_path (line 661) | def get_dist_checkpoint_path(checkpoint_path): function get_hf_model_checkpoint_path (line 667) | def get_hf_model_checkpoint_path(checkpoint_path): function get_transformer_config_checkpoint_path (line 673) | def get_transformer_config_checkpoint_path(checkpoint_path): function convert_megatron_model_to_transformers_model (line 678) | def convert_megatron_model_to_transformers_model( function broadcast_from_megatron_pp (line 818) | def broadcast_from_megatron_pp(tensor: torch.Tensor): function broadcast_str_from_megatron_pp (line 855) | def broadcast_str_from_megatron_pp(obj: Any): function default_tp_concat_fn (line 881) | def default_tp_concat_fn( function per_tensor_generator (line 963) | def per_tensor_generator( function get_transformer_layer_offset (line 1108) | def get_transformer_layer_offset(pipeline_rank, vp_stage, config: Transf... function register_megatron_training_hooks (line 1253) | def register_megatron_training_hooks(model: list[torch.nn.Module], optim... function mapping_string_to_attn_backend (line 1291) | def mapping_string_to_attn_backend(args: dict) -> dict: function get_megatron_mtp_loss (line 1299) | def get_megatron_mtp_loss(n_micro_batch): function get_megatron_module_device (line 1322) | def get_megatron_module_device(models: list[Any]) -> str: function check_mtp_config (line 1340) | def check_mtp_config(model_config: HFModelConfig, engine_config: McoreEn... function patch_engine_mtp (line 1371) | def patch_engine_mtp(module, model_config): function copy_megatron_model_to_cpu (line 1392) | def copy_megatron_model_to_cpu(models): function restore_megatron_model_from_cpu (line 1438) | def restore_megatron_model_from_cpu(models, cpu_state): FILE: verl/utils/memory_utils.py function aggressive_empty_cache (line 31) | def aggressive_empty_cache(force_sync: bool = True, max_retries: int = 3... function reset_memory_stats (line 77) | def reset_memory_stats() -> None: function get_memory_info (line 85) | def get_memory_info() -> dict: function log_memory_usage (line 103) | def log_memory_usage(stage: str = "current") -> None: function optimize_memory_for_inference (line 118) | def optimize_memory_for_inference() -> None: function optimize_memory_for_training (line 132) | def optimize_memory_for_training() -> None: function enable_memory_visualize (line 146) | def enable_memory_visualize( class MemorySnapshotSampler (line 240) | class MemorySnapshotSampler: method __init__ (line 252) | def __init__(self, out_dir: str = "./mem_snapshots", tag: str = "perio... method dump_memory_snapshot (line 256) | def dump_memory_snapshot(self, out_dir: str = "./mem_snapshots", tag: ... FILE: verl/utils/metric/utils.py function reduce_metrics (line 25) | def reduce_metrics(metrics: dict[str, Union["Metric", list[Any]]]) -> di... class AggregationType (line 61) | class AggregationType(Enum): class Metric (line 72) | class Metric: method __init__ (line 92) | def __init__(self, aggregation: str | AggregationType, value: Optional... method append (line 103) | def append(self, value: Union[Numeric, "Metric"]) -> None: method extend (line 115) | def extend(self, values: Union["Metric", list[Numeric]]) -> None: method aggregate (line 123) | def aggregate(self) -> float: method _aggregate (line 127) | def _aggregate(cls, values: list[Numeric], aggregation: AggregationTyp... method aggregate_dp (line 139) | def aggregate_dp(cls, metric_lists: list["Metric"]) -> float: method from_dict (line 159) | def from_dict(cls, data: dict[str, Numeric], aggregation: str | Aggreg... method init_list (line 162) | def init_list(self) -> "Metric": FILE: verl/utils/model.py class LambdaLayer (line 60) | class LambdaLayer(nn.Module): method __init__ (line 61) | def __init__(self, fn): method forward (line 65) | def forward(self, *args, **kwargs): function squeeze (line 69) | def squeeze(x): function update_model_config (line 73) | def update_model_config(module_config, override_config_kwargs): function get_huggingface_actor_config (line 86) | def get_huggingface_actor_config(model_name: str, override_config_kwargs... function get_generation_config (line 98) | def get_generation_config( function create_huggingface_actor (line 115) | def create_huggingface_actor(model_name: str, override_config_kwargs=Non... function create_huggingface_critic (line 139) | def create_huggingface_critic(model_name: str, override_config_kwargs=No... function get_model_size (line 161) | def get_model_size(model: nn.Module, scale="auto"): function print_model_size (line 188) | def print_model_size(model: nn.Module, name: str = None): function create_random_mask (line 195) | def create_random_mask( function compute_position_id_with_mask (line 238) | def compute_position_id_with_mask(mask): function convert_weight_keys (line 242) | def convert_weight_keys(state_dict: dict[str, torch.Tensor], model: PreT... function check_exclude_modules (line 263) | def check_exclude_modules(config, key: str) -> bool: function check_target_modules (line 286) | def check_target_modules(config, key: str) -> bool: function normalize_model_name (line 337) | def normalize_model_name(name, pp_rank, vpp_rank, transformer_config, la... function normalize_pp_vpp_params (line 361) | def normalize_pp_vpp_params(params, num_hidden_layers, layer_name="layer... function get_parallel_model_from_config (line 382) | def get_parallel_model_from_config( function _get_parallel_model_architecture_from_config (line 400) | def _get_parallel_model_architecture_from_config(config: PretrainedConfi... function _load_hf_model (line 413) | def _load_hf_model(config, model_config, is_value_model): function get_hf_model_path (line 467) | def get_hf_model_path(config): function load_megatron_model_weights (line 477) | def load_megatron_model_weights(config, model_config, parallel_model, pa... function load_megatron_gptmodel_weights (line 498) | def load_megatron_gptmodel_weights(config, model_config, parallel_model,... function pad_packed_inputs (line 515) | def pad_packed_inputs(unpad_tokens: torch.Tensor, cu_seqlens, max_seqlen... function load_mcore_dist_weights (line 548) | def load_mcore_dist_weights(parallel_model, dist_weight_path, is_value_m... function get_parallel_gptmodel_from_config (line 567) | def get_parallel_gptmodel_from_config( function patch_valuehead_model (line 603) | def patch_valuehead_model(model) -> None: function load_valuehead_model (line 633) | def load_valuehead_model(local_path, torch_dtype, model_config, trust_re... function get_hf_auto_model_class (line 679) | def get_hf_auto_model_class(hf_config): function extract_multi_modal_inputs (line 708) | def extract_multi_modal_inputs( function get_lora_rank_from_adapter (line 753) | def get_lora_rank_from_adapter(adapter_path: str | os.PathLike) -> int: class CausalLMOutputForPPO (line 789) | class CausalLMOutputForPPO(CausalLMOutputWithPast): FILE: verl/utils/net_utils.py function is_ipv4 (line 31) | def is_ipv4(ip_str: str) -> bool: function is_ipv6 (line 48) | def is_ipv6(ip_str: str) -> bool: function is_valid_ipv6_address (line 65) | def is_valid_ipv6_address(address: str) -> bool: function get_free_port (line 73) | def get_free_port(address: str, with_alive_sock: bool = False) -> tuple[... FILE: verl/utils/npu_flash_attn_utils.py class IndexFirstAxis (line 22) | class IndexFirstAxis(torch.autograd.Function): method forward (line 24) | def forward(ctx, input, indices): method backward (line 36) | def backward(ctx, grad_output): class IndexPutFirstAxis (line 56) | class IndexPutFirstAxis(torch.autograd.Function): method forward (line 58) | def forward(ctx, values, indices, first_axis_dim): method backward (line 69) | def backward(ctx, grad_output): function pad_input (line 81) | def pad_input(hidden_states, indices, batch, seqlen): function unpad_input (line 99) | def unpad_input(hidden_states, attention_mask, unused_mask=None): FILE: verl/utils/profiler/config.py class NsightToolConfig (line 27) | class NsightToolConfig(BaseConfig): method __post_init__ (line 34) | def __post_init__(self) -> None: class TorchProfilerToolConfig (line 39) | class TorchProfilerToolConfig(BaseConfig): method __post_init__ (line 47) | def __post_init__(self) -> None: class TorchMemoryToolConfig (line 58) | class TorchMemoryToolConfig(BaseConfig): method __post_init__ (line 70) | def __post_init__(self) -> None: class NPUToolConfig (line 83) | class NPUToolConfig(NsightToolConfig): method __post_init__ (line 97) | def __post_init__(self) -> None: class ProfilerConfig (line 112) | class ProfilerConfig(BaseConfig): method union (line 133) | def union(self, other: "ProfilerConfig") -> "ProfilerConfig": method intersect (line 145) | def intersect(self, other: "ProfilerConfig") -> "ProfilerConfig": method __post_init__ (line 159) | def __post_init__(self) -> None: function build_vllm_profiler_args (line 166) | def build_vllm_profiler_args(profiler_config: ProfilerConfig, tool_confi... function build_sglang_profiler_args (line 212) | def build_sglang_profiler_args(profiler_config: ProfilerConfig, tool_con... FILE: verl/utils/profiler/empty_annotations.py function mark_start_range (line 18) | def mark_start_range( function mark_end_range (line 27) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 31) | def mark_annotate( FILE: verl/utils/profiler/mstx_profile.py function mark_start_range (line 30) | def mark_start_range(message: Optional[str] = None) -> None: function mark_end_range (line 40) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 50) | def mark_annotate(message: Optional[str] = None) -> Callable: function marked_timer (line 66) | def marked_timer(name: str, timing_raw: dict[str, float], *args: Any, **... function get_npu_profiler (line 90) | def get_npu_profiler( class NPUProfiler (line 162) | class NPUProfiler(DistProfiler): method __init__ (line 169) | def __init__(self, rank: int, config: ProfilerConfig, tool_config: NPU... method start (line 188) | def start(self, **kwargs): method stop (line 201) | def stop(self): method annotate (line 207) | def annotate(self, message: Optional[str] = None, role: Optional[str] ... FILE: verl/utils/profiler/nvtx_profile.py function mark_start_range (line 27) | def mark_start_range( function mark_end_range (line 48) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 58) | def mark_annotate( function marked_timer (line 85) | def marked_timer( class NsightSystemsProfiler (line 114) | class NsightSystemsProfiler(DistProfiler): method __init__ (line 117) | def __init__(self, rank: int, config: Optional[ProfilerConfig], tool_c... method start (line 131) | def start(self, **kwargs): method stop (line 135) | def stop(self): method annotate (line 139) | def annotate( FILE: verl/utils/profiler/performance.py function _get_current_mem_info (line 29) | def _get_current_mem_info(unit: str = "GB", precision: int = 2) -> tuple... function log_gpu_memory_usage (line 63) | def log_gpu_memory_usage(head: str, logger: logging.Logger = None, level... class GPUMemoryLogger (line 85) | class GPUMemoryLogger(DecoratorLoggerBase): method __init__ (line 96) | def __init__(self, role: str, logger: logging.Logger = None, level=log... method __call__ (line 103) | def __call__(self, decorated_function: callable): method log (line 109) | def log(self, func, *args, **kwargs): function log_print (line 130) | def log_print(ctn: Any): function _timer (line 140) | def _timer(name: str, timing_raw: dict[str, float]): function simple_timer (line 155) | def simple_timer(name: str, timing_raw: dict[str, float]): function marked_timer (line 172) | def marked_timer( function reduce_timing (line 198) | def reduce_timing( function topk_reduce_ratio_min_max (line 226) | def topk_reduce_ratio_min_max(timing: float, k: int = 10) -> tuple[float... function gather_timing (line 243) | def gather_timing(timing_raw: dict[str, float]) -> dict[str, list[float]]: FILE: verl/utils/profiler/profile.py function mark_start_range (line 22) | def mark_start_range( function mark_end_range (line 39) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 48) | def mark_annotate( class DistProfiler (line 72) | class DistProfiler: method __init__ (line 82) | def __init__( method check_enable (line 132) | def check_enable(self): method check_this_rank (line 135) | def check_this_rank(self): method check_this_step (line 138) | def check_this_step(self): method is_discrete_mode (line 141) | def is_discrete_mode(self): method start (line 144) | def start(self, **kwargs): method stop (line 149) | def stop(self): method annotate (line 155) | def annotate( class _NoOpProfiler (line 192) | class _NoOpProfiler: method start (line 193) | def start(self, **kwargs): method stop (line 196) | def stop(self): class TorchMemoryProfiler (line 200) | class TorchMemoryProfiler: method __init__ (line 211) | def __init__( method start (line 242) | def start(self, **kwargs): method stop (line 252) | def stop(self): method _should_profile_this_rank (line 266) | def _should_profile_this_rank(self) -> bool: class DistProfilerExtension (line 275) | class DistProfilerExtension: method __init__ (line 287) | def __init__(self, profiler: DistProfiler): method start_profile (line 293) | def start_profile(self, **kwargs) -> None: method stop_profile (line 298) | def stop_profile(self) -> None: FILE: verl/utils/profiler/torch_profile.py function get_torch_profiler (line 26) | def get_torch_profiler( class Profiler (line 67) | class Profiler(DistProfiler): method __init__ (line 84) | def __init__( method check (line 107) | def check(self): method start (line 110) | def start(self, **kwargs): method step (line 124) | def step(self): method stop (line 128) | def stop(self): method annotate (line 135) | def annotate(self, message: Optional[str] = None, role: Optional[str] ... FILE: verl/utils/py_functional.py function _mp_target_wrapper (line 35) | def _mp_target_wrapper(target_func: Callable, mp_queue: multiprocessing.... function timeout_limit (line 56) | def timeout_limit(seconds: float, use_signals: bool = False): function union_two_dict (line 151) | def union_two_dict(dict1: dict, dict2: dict): function rename_dict (line 169) | def rename_dict(data: dict, prefix: str = "") -> dict: function append_to_dict (line 187) | def append_to_dict(data: dict, new_data: dict, prefix: str = ""): class NestedNamespace (line 210) | class NestedNamespace(SimpleNamespace): method __init__ (line 226) | def __init__(self, dictionary, **kwargs): class DynamicEnumMeta (line 235) | class DynamicEnumMeta(type): method __iter__ (line 236) | def __iter__(cls) -> Iterator[Any]: method __contains__ (line 239) | def __contains__(cls, item: Any) -> bool: method __getitem__ (line 245) | def __getitem__(cls, name: str) -> Any: method __reduce_ex__ (line 248) | def __reduce_ex__(cls, protocol): method names (line 252) | def names(cls): method values (line 255) | def values(cls): class DynamicEnum (line 259) | class DynamicEnum(metaclass=DynamicEnumMeta): method __init__ (line 263) | def __init__(self, name: str, value: int): method __repr__ (line 267) | def __repr__(self): method __reduce_ex__ (line 270) | def __reduce_ex__(self, protocol): method register (line 280) | def register(cls, name: str) -> "DynamicEnum": method remove (line 291) | def remove(cls, name: str): method from_name (line 298) | def from_name(cls, name: str) -> Optional["DynamicEnum"]: function temp_env_var (line 303) | def temp_env_var(key: str, value: str): function convert_to_regular_types (line 333) | def convert_to_regular_types(obj): function convert_nested_value_to_list_recursive (line 346) | def convert_nested_value_to_list_recursive(data_item): function list_of_dict_to_dict_of_list (line 359) | def list_of_dict_to_dict_of_list(list_of_dict: list[dict]): FILE: verl/utils/qat/core.py class QATConfig (line 31) | class QATConfig(BaseConfig): function load_quantization_config (line 42) | def load_quantization_config(qat_config: QATConfig) -> dict[str, Any]: function _should_quantize (line 62) | def _should_quantize(name: str, module: nn.Module, config: QATConfig) ->... function apply_qat (line 87) | def apply_qat( function _set_module (line 131) | def _set_module(model: nn.Module, name: str, new_module: nn.Module): function setup_fusion_siblings (line 146) | def setup_fusion_siblings(model: nn.Module): function enable_qat_fuse (line 177) | def enable_qat_fuse(model: nn.Module): function invalidate_all_scales (line 184) | def invalidate_all_scales(model: nn.Module): FILE: verl/utils/qat/linear.py function _fp4_fake_quant_kernel (line 43) | def _fp4_fake_quant_kernel( function fp4_fake_quant_weight (line 128) | def fp4_fake_quant_weight( class STEFP4QuantTriton (line 176) | class STEFP4QuantTriton(torch.autograd.Function): method forward (line 180) | def forward(ctx, x: torch.Tensor, global_amax: torch.Tensor, block_siz... method backward (line 184) | def backward(ctx, grad_output: torch.Tensor) -> tuple: class QATMode (line 188) | class QATMode(str, Enum): class QATLinear (line 195) | class QATLinear(nn.Linear): method __init__ (line 200) | def __init__( method from_linear (line 236) | def from_linear( method _is_amax_initialized (line 264) | def _is_amax_initialized(self) -> bool: method _update_input_global_scale (line 270) | def _update_input_global_scale(self, x: torch.Tensor): method _fake_quantize_weight (line 310) | def _fake_quantize_weight(self, weight: torch.Tensor) -> torch.Tensor: method _fake_quantize_activation (line 347) | def _fake_quantize_activation(self, x: torch.Tensor) -> torch.Tensor: method forward (line 366) | def forward(self, x: torch.Tensor) -> torch.Tensor: method extra_repr (line 380) | def extra_repr(self) -> str: FILE: verl/utils/qat/quantizer.py function compute_blockwise_scale (line 46) | def compute_blockwise_scale( function fuse_global_scales (line 84) | def fuse_global_scales( class QATQuantizer (line 121) | class QATQuantizer: method __init__ (line 124) | def __init__( method _should_quantize (line 149) | def _should_quantize(self, name: str, tensor: torch.Tensor) -> bool: method _extract_layer_idx (line 172) | def _extract_layer_idx(name: str) -> Optional[int]: method _process_layer_group (line 177) | def _process_layer_group( method quantize_with_fusion (line 262) | def quantize_with_fusion( FILE: verl/utils/qat/vllm_patch.py class ParamMetaDict (line 39) | class ParamMetaDict(dict): method __init__ (line 48) | def __init__(self, model: torch.nn.Module, device: Optional[torch.devi... method _build_mappings (line 75) | def _build_mappings(self): method _try_rebuild (line 113) | def _try_rebuild(self, key: str) -> Optional[Parameter]: method prepare_for_reload (line 153) | def prepare_for_reload(self) -> None: method __getitem__ (line 163) | def __getitem__(self, key: str) -> Parameter: method __contains__ (line 177) | def __contains__(self, key: str) -> bool: method get (line 193) | def get(self, key: str, default=None): function _create_param_from_meta (line 201) | def _create_param_from_meta( function save_param_meta (line 242) | def save_param_meta(layer: torch.nn.Module, param_name: str): function _check_first_call (line 271) | def _check_first_call(layer: torch.nn.Module) -> bool: function patched_w4a16_process_weights_after_loading (line 279) | def patched_w4a16_process_weights_after_loading(self, layer: torch.nn.Mo... function patched_w4a4_process_weights_after_loading (line 369) | def patched_w4a4_process_weights_after_loading(self, layer: torch.nn.Mod... function _marlin_repack_experts (line 454) | def _marlin_repack_experts(packed, perm, size_k, size_n, num_experts): function _marlin_process_scales_experts (line 474) | def _marlin_process_scales_experts(scale_hf, param_dtype, size_k, size_n... function _process_nvfp4_moe_marlin (line 495) | def _process_nvfp4_moe_marlin(self, layer: torch.nn.Module, is_first_cal... function _process_nvfp4_moe_flashinfer_cutlass (line 586) | def _process_nvfp4_moe_flashinfer_cutlass(self, layer: torch.nn.Module, ... function patched_nvfp4_moe_process_weights_after_loading (line 681) | def patched_nvfp4_moe_process_weights_after_loading(self, layer: torch.n... function apply_qat_patches (line 737) | def apply_qat_patches(): function prepare_qat_for_load_weights (line 756) | def prepare_qat_for_load_weights(model, device=None): function manual_process_weights_after_loading (line 797) | def manual_process_weights_after_loading(model): FILE: verl/utils/ray_utils.py function ray_noset_visible_devices (line 28) | def ray_noset_visible_devices(env_vars=os.environ): function parallel_put (line 51) | def parallel_put(data_list: list[Any], max_workers: Optional[int] = None): function get_event_loop (line 87) | def get_event_loop(): function auto_await (line 97) | def auto_await(func): FILE: verl/utils/rendezvous/ray_backend.py class NCCLIDStore (line 24) | class NCCLIDStore: method __init__ (line 25) | def __init__(self, nccl_id): method get (line 28) | def get(self): function get_nccl_id_store_by_name (line 32) | def get_nccl_id_store_by_name(name): function create_nccl_communicator_in_ray (line 45) | def create_nccl_communicator_in_ray( FILE: verl/utils/reward_score/__init__.py function default_compute_score (line 19) | def default_compute_score( function _default_compute_score (line 118) | def _default_compute_score( FILE: verl/utils/reward_score/geo3k.py function format_reward (line 19) | def format_reward(predict_str: str) -> float: function acc_reward (line 25) | def acc_reward(predict_str: str, ground_truth: str, use_boxed: bool = Tr... function compute_score (line 33) | def compute_score(predict_str: str, ground_truth: str, use_boxed: bool =... FILE: verl/utils/reward_score/gsm8k.py function extract_solution (line 20) | def extract_solution(solution_str, method="strict"): function compute_score (line 52) | def compute_score(solution_str, ground_truth, method="strict", format_sc... FILE: verl/utils/reward_score/math_batch.py function compute_score_batched (line 18) | def compute_score_batched(data_sources, solution_strs, ground_truths, ex... FILE: verl/utils/reward_score/math_dapo.py function last_boxed_only_string (line 20) | def last_boxed_only_string(string: str) -> Optional[str]: function remove_boxed (line 50) | def remove_boxed(s: str) -> str: function normalize_final_answer (line 124) | def normalize_final_answer(final_answer: str) -> str: function is_correct_minerva (line 165) | def is_correct_minerva( function is_correct_strict_box (line 193) | def is_correct_strict_box( function verify (line 220) | def verify( function compute_score (line 242) | def compute_score( FILE: verl/utils/reward_score/math_reward.py function compute_score (line 17) | def compute_score(solution_str, ground_truth) -> float: function is_equiv (line 32) | def is_equiv(str1, str2, verbose=False): function remove_boxed (line 49) | def remove_boxed(s): function last_boxed_only_string (line 63) | def last_boxed_only_string(string): function fix_fracs (line 90) | def fix_fracs(string): function fix_a_slash_b (line 122) | def fix_a_slash_b(string): function remove_right_units (line 137) | def remove_right_units(string): function fix_sqrt (line 147) | def fix_sqrt(string): function strip_string (line 162) | def strip_string(string): FILE: verl/utils/reward_score/math_verify.py function compute_score (line 23) | def compute_score(model_output: str, ground_truth: str, timeout_score: f... FILE: verl/utils/reward_score/prime_code/__init__.py function compute_score (line 21) | def compute_score(completion, test_cases, continuous=False): FILE: verl/utils/reward_score/prime_code/testing_util.py function truncatefn (line 39) | def truncatefn(s, length=300): class CODE_TYPE (line 47) | class CODE_TYPE(Enum): class Capturing (line 55) | class Capturing(list): method __enter__ (line 56) | def __enter__(self): method __exit__ (line 63) | def __exit__(self, *args): function only_int_check (line 69) | def only_int_check(val): function string_int_check (line 73) | def string_int_check(val): function combined_int_check (line 77) | def combined_int_check(val): function clean_traceback (line 81) | def clean_traceback(error_traceback): function run_test (line 88) | def run_test(in_outs, test=None, debug=False, timeout=15): function custom_compare_ (line 556) | def custom_compare_(output, ground_truth): function stripped_string_compare (line 571) | def stripped_string_compare(s1, s2): function call_method (line 577) | def call_method(method, inputs): function reliability_guard (line 603) | def reliability_guard(maximum_memory_bytes=None): FILE: verl/utils/reward_score/prime_code/utils.py function _temp_run (line 26) | def _temp_run(sample, generation, debug, result, metadata_list, timeout): function check_correctness (line 41) | def check_correctness(in_outs: Optional[dict], generation, timeout=10, d... FILE: verl/utils/reward_score/prime_math/__init__.py function _sympy_parse (line 44) | def _sympy_parse(expr: str): function _parse_latex (line 53) | def _parse_latex(expr: str) -> str: function _is_float (line 71) | def _is_float(num: str) -> bool: function _is_int (line 79) | def _is_int(x: float) -> bool: function _is_frac (line 86) | def _is_frac(expr: str) -> bool: function _str_is_int (line 90) | def _str_is_int(x: str) -> bool: function _str_to_int (line 99) | def _str_to_int(x: str) -> bool: function _inject_implicit_mixed_number (line 105) | def _inject_implicit_mixed_number(step: str): function _strip_properly_formatted_commas (line 115) | def _strip_properly_formatted_commas(expr: str): function _normalize (line 126) | def _normalize(expr: str) -> str: function count_unknown_letters_in_expr (line 193) | def count_unknown_letters_in_expr(expr: str): function should_allow_eval (line 200) | def should_allow_eval(expr: str): function are_equal_under_sympy (line 213) | def are_equal_under_sympy(ground_truth_normalized: str, given_normalized... function split_tuple (line 227) | def split_tuple(expr: str): function grade_answer (line 246) | def grade_answer(given_answer: str, ground_truth: str) -> bool: function remove_boxed (line 307) | def remove_boxed(s): function _last_boxed_only_string (line 317) | def _last_boxed_only_string(string): function match_answer (line 347) | def match_answer(response): function compute_score (line 389) | def compute_score(model_output: str, ground_truth: str) -> bool: FILE: verl/utils/reward_score/prime_math/grader.py function is_digit (line 109) | def is_digit(s): function normalize (line 121) | def normalize(answer, pi) -> str: function handle_base (line 141) | def handle_base(x) -> str: function handle_pi (line 150) | def handle_pi(string, pi): function math_equal (line 174) | def math_equal( function symbolic_equal (line 324) | def symbolic_equal(a, b, tolerance, timeout=10.0): function format_intervals (line 362) | def format_intervals(prediction): FILE: verl/utils/reward_score/prime_math/math_normalize.py function normalize_answer (line 44) | def normalize_answer(answer: Optional[str]) -> Optional[str]: function _fix_fracs (line 58) | def _fix_fracs(string): function _fix_a_slash_b (line 90) | def _fix_a_slash_b(string): function _remove_right_units (line 105) | def _remove_right_units(string): function _fix_sqrt (line 115) | def _fix_sqrt(string): function _strip_string (line 130) | def _strip_string(string): FILE: verl/utils/reward_score/rlla.py function match_score (line 21) | def match_score(list1, list2): function customize_format_reward_func (line 44) | def customize_format_reward_func( function compute_tool_call_reward (line 100) | def compute_tool_call_reward(gt_tools, pd_tools, max_possible_reward, mi... function customize_correctness_reward_tool (line 155) | def customize_correctness_reward_tool( function compute_score (line 198) | def compute_score(data_source, solution_str, ground_truth, extra_info, s... FILE: verl/utils/reward_score/sandbox_fusion/__init__.py function compute_score (line 28) | def compute_score( FILE: verl/utils/reward_score/sandbox_fusion/utils.py function call_sandbox_api (line 67) | def call_sandbox_api( function _process_single_case (line 174) | def _process_single_case( function check_correctness (line 449) | def check_correctness( FILE: verl/utils/reward_score/search_r1_like_qa_em.py function normalize_answer (line 23) | def normalize_answer(s): function em_check (line 40) | def em_check(prediction, golden_answers): function subem_check (line 53) | def subem_check(prediction, golden_answers): function extract_solution (line 66) | def extract_solution(solution_str): function count_answer_tags (line 89) | def count_answer_tags(text): function compute_score (line 96) | def compute_score(solution_str, ground_truth, method="strict", format_sc... function compute_score_subem (line 131) | def compute_score_subem(solution_str, ground_truth, method="strict", for... FILE: verl/utils/rollout_skip.py class RolloutSkip (line 19) | class RolloutSkip: method __init__ (line 35) | def __init__(self, config, rollout_wg): method curr_path_dump (line 64) | def curr_path_dump(self): method wrap_generate_sequences (line 67) | def wrap_generate_sequences(self): method try_load (line 80) | def try_load(self): method dump (line 105) | def dump(self, outputs: DataProto): function wrap_generate_sequences (line 119) | def wrap_generate_sequences(rolloutskip: RolloutSkip, rollout_wg): FILE: verl/utils/rollout_trace.py class RolloutTraceConfig (line 29) | class RolloutTraceConfig: method __new__ (line 56) | def __new__(cls, *args, **kwargs): method get_instance (line 63) | def get_instance(cls) -> "RolloutTraceConfig": method init (line 69) | def init( method get_backend (line 107) | def get_backend(cls) -> Optional[str]: method get_client (line 111) | def get_client(cls) -> Optional[object]: method enable_token2text (line 115) | def enable_token2text(cls) -> Optional[bool]: method reset (line 119) | def reset(cls): function rollout_trace_attr (line 124) | def rollout_trace_attr( function rollout_trace_op (line 182) | def rollout_trace_op(func): FILE: verl/utils/seqlen_balancing.py function calculate_workload (line 27) | def calculate_workload(seqlen_list: torch.Tensor) -> torch.Tensor: function karmarkar_karp (line 49) | def karmarkar_karp(seqlen_list: list[int], k_partitions: int, equal_size... function greedy_partition (line 175) | def greedy_partition(seqlen_list: list[int], k_partitions: int, equal_si... function get_seqlen_balanced_partitions (line 213) | def get_seqlen_balanced_partitions(seqlen_list: list[int], k_partitions:... function log_seqlen_unbalance (line 257) | def log_seqlen_unbalance(seqlen_list: list[int], partitions: list[list[i... function ceildiv (line 305) | def ceildiv(a: int, b: int) -> int: function roundup_divisible (line 327) | def roundup_divisible(a: int, b: int) -> int: function rearrange_micro_batches (line 348) | def rearrange_micro_batches( function get_reverse_idx (line 471) | def get_reverse_idx(idx_map): function prepare_dynamic_batch (line 489) | def prepare_dynamic_batch( function restore_dynamic_batch (line 528) | def restore_dynamic_batch(data: torch.Tensor, batch_idx_list: list[list[... function get_group_balanced_partitions (line 554) | def get_group_balanced_partitions( FILE: verl/utils/sglang/sglang_fp8_utils.py class SGLangFP8QuantizerHelper (line 19) | class SGLangFP8QuantizerHelper(FP8QuantizerHelper): method __init__ (line 20) | def __init__(self, quant_config): FILE: verl/utils/tensordict_utils.py function assign_non_tensor_data (line 23) | def assign_non_tensor_data(tensor_dict: TensorDict, key, val): function assign_non_tensor_stack (line 45) | def assign_non_tensor_stack(tensor_dict: TensorDict, key, val: list): function assign_non_tensor (line 73) | def assign_non_tensor(tensor_dict: TensorDict, **kwargs): function unwrap_non_tensor_data (line 107) | def unwrap_non_tensor_data(data): function get_non_tensor_data (line 132) | def get_non_tensor_data(data: TensorDict, key: str, default): function concat_nested_tensors (line 159) | def concat_nested_tensors(tensors: list[torch.Tensor]) -> torch.Tensor: function concat_tensordict_with_none_bsz (line 195) | def concat_tensordict_with_none_bsz(data: list[TensorDict]): function concat_tensordict (line 221) | def concat_tensordict(data: list[TensorDict]) -> TensorDict: function chunk_tensordict (line 276) | def chunk_tensordict(td: TensorDict, chunks: int) -> list[TensorDict]: function get_tensordict (line 348) | def get_tensordict(tensor_dict: dict[str, torch.Tensor | list], non_tens... function index_select_tensor_dict (line 427) | def index_select_tensor_dict(batch: TensorDict, indices: torch.Tensor | ... function union_tensor_dict (line 481) | def union_tensor_dict(tensor_dict1: TensorDict, tensor_dict2: TensorDict... function make_iterator (line 527) | def make_iterator(tensordict: TensorDict, mini_batch_size, epochs, seed=... function assert_tensordict_eq (line 583) | def assert_tensordict_eq(tensordict1: TensorDict, tensordict2: TensorDict): function get (line 630) | def get(tensordict: TensorDict, key: str, default=None) -> Any: function get_keys (line 666) | def get_keys(tensordict: TensorDict, keys: Iterable[str]) -> TensorDict: function pop (line 705) | def pop(tensordict: TensorDict, key: str, default=None) -> Any: function pop_keys (line 740) | def pop_keys(tensordict: TensorDict, keys: Iterable[str]) -> TensorDict: function pad_to_divisor (line 781) | def pad_to_divisor(data: TensorDict, size_divisor: int): function unpad (line 826) | def unpad(data: TensorDict, pad_size): function contiguous (line 851) | def contiguous(data: TensorDict) -> TensorDict: function maybe_fix_3d_position_ids (line 878) | def maybe_fix_3d_position_ids(data: TensorDict): FILE: verl/utils/tokenizer.py function normalize_token_ids (line 22) | def normalize_token_ids(tokenized_output) -> list[int]: function set_pad_token_id (line 59) | def set_pad_token_id(tokenizer): function hf_tokenizer (line 74) | def hf_tokenizer(name_or_path, correct_pad_token=True, correct_gemma2=Tr... function hf_processor (line 104) | def hf_processor(name_or_path, **kwargs): FILE: verl/utils/torch_dtypes.py class PrecisionType (line 25) | class PrecisionType: method supported_type (line 41) | def supported_type(precision: str | int) -> bool: method supported_types (line 45) | def supported_types() -> list[str]: method is_fp16 (line 49) | def is_fp16(precision): method is_fp32 (line 53) | def is_fp32(precision): method is_bf16 (line 57) | def is_bf16(precision): method to_dtype (line 61) | def to_dtype(precision): method to_str (line 72) | def to_str(precision): FILE: verl/utils/torch_functional.py function gather_from_labels (line 49) | def gather_from_labels(data: torch.Tensor, label: torch.Tensor) -> torch... function logprobs_from_logits (line 72) | def logprobs_from_logits(logits, labels, inplace_backward=True): function logprobs_from_logits_flash_attn (line 103) | def logprobs_from_logits_flash_attn( function logprobs_from_logits_torch_npu (line 129) | def logprobs_from_logits_torch_npu(logits: torch.Tensor, labels: torch.T... function logprobs_from_logits_naive (line 148) | def logprobs_from_logits_naive(logits: torch.Tensor, labels: torch.Tenso... function logprobs_from_logits_v2 (line 166) | def logprobs_from_logits_v2(logits: torch.FloatTensor, labels: torch.Ten... function clip_by_value (line 203) | def clip_by_value(x: torch.Tensor, tensor_min: torch.Tensor, tensor_max:... function entropy_from_logits (line 224) | def entropy_from_logits(logits: torch.Tensor) -> torch.Tensor: function entropy_from_logits_with_chunking (line 241) | def entropy_from_logits_with_chunking(logits: torch.Tensor, chunk_size: ... function masked_sum (line 266) | def masked_sum(values: torch.Tensor, mask: torch.Tensor, axis: int | tup... function masked_mean (line 287) | def masked_mean(values, mask, axis=None): function masked_var (line 304) | def masked_var(values, mask, unbiased=True): function masked_whiten (line 322) | def masked_whiten(values, mask, shift_mean=True): function get_response_mask (line 342) | def get_response_mask(response_id: torch.Tensor, eos_token: int | list[i... function compute_grad_norm (line 365) | def compute_grad_norm(model: nn.Module) -> float: function broadcast_dict_tensor (line 388) | def broadcast_dict_tensor(tensors: dict[str, torch.Tensor] | TensorDict,... function allgather_dict_tensors (line 407) | def allgather_dict_tensors( function allgather_dict_into_dict (line 450) | def allgather_dict_into_dict(data: dict, group=None) -> dict: function split_dict_tensor_into_batches (line 476) | def split_dict_tensor_into_batches(tensors: TensorDict, batch_size) -> l... function pad_2d_list_to_length (line 483) | def pad_2d_list_to_length(response, pad_token_id, max_length=None): function pad_sequence_to_length (line 494) | def pad_sequence_to_length(tensors, max_seq_len, pad_token_id, left_pad=... function postprocess_data (line 507) | def postprocess_data( function tokenize_and_postprocess_data (line 560) | def tokenize_and_postprocess_data( function remove_pad_token (line 583) | def remove_pad_token(input_ids: torch.Tensor, attention_mask: torch.Tens... function log_probs_from_logits_response (line 598) | def log_probs_from_logits_response(input_ids, logits, response_length): function log_probs_from_logits_response_rmpad (line 614) | def log_probs_from_logits_response_rmpad(input_ids, attention_mask, logi... function log_probs_from_logits_all_rmpad (line 641) | def log_probs_from_logits_all_rmpad(input_ids_rmpad, logits_rmpad, indic... function post_process_logits (line 672) | def post_process_logits(input_ids, logits, temperature, top_k, top_p): function calculate_sum_pi_squared_from_logits (line 683) | def calculate_sum_pi_squared_from_logits(logits: torch.Tensor): function get_cosine_schedule_with_warmup (line 705) | def get_cosine_schedule_with_warmup( function get_constant_schedule_with_warmup (line 761) | def get_constant_schedule_with_warmup( function prepare_decoder_attention_mask (line 786) | def prepare_decoder_attention_mask(attention_mask, input_shape, inputs_e... function _make_causal_mask (line 810) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, d... function _expand_mask (line 823) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function get_unpad_data (line 837) | def get_unpad_data(attention_mask): function get_wsd_schedule_with_warmup (line 849) | def get_wsd_schedule_with_warmup( function check_device_is_available (line 905) | def check_device_is_available(): function distributed_mean_max_min_std (line 917) | def distributed_mean_max_min_std(local_tensor, compute_max=True, compute... function distributed_masked_mean (line 960) | def distributed_masked_mean(local_tensor, local_mask): function expand_as_nested (line 982) | def expand_as_nested(tensor: torch.Tensor, nested_tensor: torch.Tensor) ... function use_original_torch_compile (line 1008) | def use_original_torch_compile(): FILE: verl/utils/tracking.py class Tracking (line 35) | class Tracking: method __init__ (line 58) | def __init__(self, project_name, experiment_name, default_backend: str... method log (line 181) | def log(self, data, step, backend=None): method __del__ (line 186) | def __del__(self): class ClearMLLogger (line 203) | class ClearMLLogger: method __init__ (line 204) | def __init__(self, project_name: str, experiment_name: str, config): method _get_logger (line 219) | def _get_logger(self): method log (line 222) | def log(self, data, step): method finish (line 251) | def finish(self): class FileLogger (line 255) | class FileLogger: method __init__ (line 256) | def __init__(self, project_name: str, experiment_name: str): method log (line 269) | def log(self, data, step): method finish (line 273) | def finish(self): class _TensorboardAdapter (line 277) | class _TensorboardAdapter: method __init__ (line 278) | def __init__(self, project_name, experiment_name): method log (line 288) | def log(self, data, step): method finish (line 292) | def finish(self): class _MlflowLoggingAdapter (line 296) | class _MlflowLoggingAdapter: method __init__ (line 297) | def __init__(self): method _sanitize_key (line 314) | def _sanitize_key(self, key): method log (line 330) | def log(self, data, step): function _compute_mlflow_params_from_objects (line 337) | def _compute_mlflow_params_from_objects(params) -> dict[str, Any]: function _transform_params_to_json_serializable (line 344) | def _transform_params_to_json_serializable(x, convert_list_to_dict: bool): function _flatten_dict (line 364) | def _flatten_dict(raw: dict[str, Any], *, sep: str) -> dict[str, Any]: class ValidationGenerationsLogger (line 373) | class ValidationGenerationsLogger: method log (line 377) | def log(self, loggers, samples, step): method log_generations_to_vemlp_wandb (line 393) | def log_generations_to_vemlp_wandb(self, samples, step): method log_generations_to_wandb (line 398) | def log_generations_to_wandb(self, samples, step): method _log_generations_to_wandb (line 403) | def _log_generations_to_wandb(self, samples, step, wandb): method log_generations_to_swanlab (line 432) | def log_generations_to_swanlab(self, samples, step): method log_generations_to_mlflow (line 447) | def log_generations_to_mlflow(self, samples, step): method log_generations_to_clearml (line 468) | def log_generations_to_clearml(self, samples, step): method log_generations_to_tensorboard (line 496) | def log_generations_to_tensorboard(self, samples, step): FILE: verl/utils/transformers_compat.py function flash_attn_supports_top_left_mask (line 32) | def flash_attn_supports_top_left_mask(): function is_transformers_version_in_range (line 40) | def is_transformers_version_in_range(min_version: Optional[str] = None, ... function get_auto_model_for_vision2seq (line 61) | def get_auto_model_for_vision2seq(): FILE: verl/utils/trtllm/trtllm_fp8_utils.py class TRTLLMFP8QuantizerHelper (line 19) | class TRTLLMFP8QuantizerHelper(FP8QuantizerHelper): method __init__ (line 20) | def __init__(self, quant_config): FILE: verl/utils/ulysses.py function set_ulysses_sequence_parallel_group (line 30) | def set_ulysses_sequence_parallel_group(group: dist.ProcessGroup): function get_ulysses_sequence_parallel_group (line 38) | def get_ulysses_sequence_parallel_group() -> Optional[dist.ProcessGroup]: function get_ulysses_sequence_parallel_world_size (line 46) | def get_ulysses_sequence_parallel_world_size(group: ProcessGroup = None)... function get_ulysses_sequence_parallel_rank (line 54) | def get_ulysses_sequence_parallel_rank(group: ProcessGroup = None) -> int: function gather_seq_scatter_heads (line 62) | def gather_seq_scatter_heads( function gather_heads_scatter_seq (line 86) | def gather_heads_scatter_seq(x: Tensor, head_dim: int, seq_dim: int, gro... function _pad_tensor (line 104) | def _pad_tensor(x: Tensor, dim: int, padding_size: int) -> Tensor: function _unpad_tensor (line 111) | def _unpad_tensor(x: Tensor, dim: int, padding_size: int) -> Tensor: function slice_input_tensor (line 117) | def slice_input_tensor(x: Tensor, dim: int, padding: bool = True, group:... function all_to_all_tensor (line 133) | def all_to_all_tensor( function all_gather_tensor (line 155) | def all_gather_tensor(local_tensor: Tensor, group: Optional[dist.Process... class SeqAllToAll (line 165) | class SeqAllToAll(torch.autograd.Function): method forward (line 167) | def forward( method backward (line 182) | def backward(ctx: Any, *grad_output: Tensor) -> tuple[None, Tensor, No... class Gather (line 194) | class Gather(torch.autograd.Function): method forward (line 196) | def forward( method backward (line 224) | def backward(ctx: Any, grad_output: Tensor) -> Any: function gather_outpus_and_unpad (line 237) | def gather_outpus_and_unpad(*args, **kwargs): function gather_outputs_and_unpad (line 243) | def gather_outputs_and_unpad( function ulysses_pad (line 278) | def ulysses_pad( function ulysses_pad_and_slice_inputs (line 298) | def ulysses_pad_and_slice_inputs( function validate_ulysses_config (line 333) | def validate_ulysses_config(num_heads, ulysses_sequence_size): FILE: verl/utils/vllm/npu_vllm_patch.py function vllm_ascend_v011_select_moe_comm_method_wrapper (line 24) | def vllm_ascend_v011_select_moe_comm_method_wrapper(fn): function vllm_ascend_v011_matmul_and_reduce_wrapper (line 53) | def vllm_ascend_v011_matmul_and_reduce_wrapper(fn): function check_vllm_ascend_before_server_launch (line 74) | def check_vllm_ascend_before_server_launch(): function vllm_ascend_v013_select_moe_comm_method_wrapper (line 124) | def vllm_ascend_v013_select_moe_comm_method_wrapper(fn): function vllm_ascend_v013_matmul_and_reduce_wrapper (line 142) | def vllm_ascend_v013_matmul_and_reduce_wrapper(fn): function patch_vllm013_rotary_emb (line 163) | def patch_vllm013_rotary_emb(): FILE: verl/utils/vllm/patch.py function patch_vllm_moe_model_weight_loader (line 70) | def patch_vllm_moe_model_weight_loader(model): FILE: verl/utils/vllm/utils.py class TensorLoRARequest (line 31) | class TensorLoRARequest(LoRARequest): class VLLMHijack (line 36) | class VLLMHijack: method hijack (line 38) | def hijack(): function is_version_ge (line 126) | def is_version_ge(pkg: str = "vllm", minver: str = "0.7.3"): FILE: verl/utils/vllm/vllm_fp8_utils.py class FP8State (line 37) | class FP8State: function is_fp8_model (line 48) | def is_fp8_model(vllm_config): function get_module_from_param_name (line 57) | def get_module_from_param_name(model, name: str): function is_fp8_weight (line 87) | def is_fp8_weight(name, model): function quant_weights (line 104) | def quant_weights(weights, model, quant_config, dtype=torch.bfloat16): function load_quanted_weights (line 152) | def load_quanted_weights(weights, model_runner): function process_weights_after_loading_for_vllm10 (line 174) | def process_weights_after_loading_for_vllm10(self, layer) -> None: function process_weights_after_loading_for_vllm11 (line 229) | def process_weights_after_loading_for_vllm11(self, layer) -> None: function process_weights_after_loading_for_vllm14 (line 291) | def process_weights_after_loading_for_vllm14(self, layer) -> None: function process_weights_after_loading_moe_for_vllm10 (line 353) | def process_weights_after_loading_moe_for_vllm10(self, layer) -> None: function process_weights_after_loading_moe_for_vllm11 (line 429) | def process_weights_after_loading_moe_for_vllm11(self, layer) -> None: function process_weights_after_loading_moe_for_vllm14 (line 487) | def process_weights_after_loading_moe_for_vllm14(self, layer) -> None: function apply_vllm_fp8_patches (line 550) | def apply_vllm_fp8_patches(): FILE: verl/workers/actor/base.py class BasePPOActor (line 27) | class BasePPOActor(ABC): method __init__ (line 28) | def __init__(self, config): method compute_log_prob (line 39) | def compute_log_prob(self, data: DataProto) -> torch.Tensor: method update_policy (line 54) | def update_policy(self, data: DataProto) -> dict: FILE: verl/workers/actor/dp_actor.py class DataParallelPPOActor (line 49) | class DataParallelPPOActor(BasePPOActor): method __init__ (line 58) | def __init__(self, config: ActorConfig, actor_module: nn.Module, actor... method _forward_micro_batch (line 113) | def _forward_micro_batch( method _optimizer_step (line 391) | def _optimizer_step(self): method compute_log_prob (line 425) | def compute_log_prob(self, data: DataProto, calculate_entropy: bool = ... method update_policy (line 509) | def update_policy(self, data: DataProto): FILE: verl/workers/actor/megatron_actor.py class MegatronPPOActor (line 67) | class MegatronPPOActor(BasePPOActor): method __init__ (line 68) | def __init__( method _validate_config (line 191) | def _validate_config(self, config) -> None: method compute_log_prob (line 202) | def compute_log_prob(self, data: DataProto, calculate_entropy=False) -... method make_minibatch_iterator (line 337) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 397) | def forward_backward_batch( method update_policy (line 765) | def update_policy(self, dataloader: Iterable[DataProto], enable_mtp: b... FILE: verl/workers/config/actor.py class RouterReplayConfig (line 42) | class RouterReplayConfig(BaseConfig): method __post_init__ (line 63) | def __post_init__(self): class PolicyLossConfig (line 71) | class PolicyLossConfig(BaseConfig): class ActorConfig (line 96) | class ActorConfig(BaseConfig): method __post_init__ (line 186) | def __post_init__(self): method validate (line 212) | def validate(self, n_gpus: int, train_batch_size: int, model_config: d... method _check_mutually_exclusive (line 235) | def _check_mutually_exclusive(mbs, mbs_per_gpu, name: str): class McoreActorConfig (line 251) | class McoreActorConfig(ActorConfig): method __post_init__ (line 269) | def __post_init__(self): class FSDPActorConfig (line 276) | class FSDPActorConfig(ActorConfig): method __post_init__ (line 304) | def __post_init__(self): method validate (line 313) | def validate(self, n_gpus: int, train_batch_size: int, model_config: d... class VeOmniActorConfig (line 325) | class VeOmniActorConfig(ActorConfig): method __post_init__ (line 341) | def __post_init__(self): class TorchTitanActorConfig (line 348) | class TorchTitanActorConfig(ActorConfig): method __post_init__ (line 365) | def __post_init__(self): FILE: verl/workers/config/critic.py class CriticConfig (line 33) | class CriticConfig(BaseConfig): method __post_init__ (line 90) | def __post_init__(self): method validate (line 114) | def validate(self, n_gpus: int, train_batch_size: int): method _check_mutually_exclusive (line 129) | def _check_mutually_exclusive(mbs, mbs_per_gpu, name: str): class McoreCriticConfig (line 157) | class McoreCriticConfig(CriticConfig): method validate (line 173) | def validate(self, n_gpus: int, train_batch_size: int): class FSDPCriticConfig (line 179) | class FSDPCriticConfig(CriticConfig): method __post_init__ (line 202) | def __post_init__(self): method validate (line 213) | def validate(self, n_gpus: int, train_batch_size: int): class TorchTitanCriticConfig (line 228) | class TorchTitanCriticConfig(CriticConfig): method __post_init__ (line 241) | def __post_init__(self): class FSDPCriticModelCfg (line 248) | class FSDPCriticModelCfg(BaseModelConfig): FILE: verl/workers/config/engine.py class EngineRouterReplayConfig (line 41) | class EngineRouterReplayConfig(BaseConfig): method __post_init__ (line 62) | def __post_init__(self): class EngineConfig (line 70) | class EngineConfig(BaseConfig): method __post_init__ (line 112) | def __post_init__(self): class McoreEngineConfig (line 122) | class McoreEngineConfig(EngineConfig): method __post_init__ (line 174) | def __post_init__(self) -> None: class QATEngineConfig (line 185) | class QATEngineConfig(BaseConfig): class FSDPEngineConfig (line 206) | class FSDPEngineConfig(EngineConfig): method __post_init__ (line 249) | def __post_init__(self): class VeOmniEngineConfig (line 255) | class VeOmniEngineConfig(EngineConfig): method __post_init__ (line 335) | def __post_init__(self): class TorchtitanEngineConfig (line 341) | class TorchtitanEngineConfig(EngineConfig): method __post_init__ (line 395) | def __post_init__(self): class AutomodelEngineConfig (line 401) | class AutomodelEngineConfig(EngineConfig): method __post_init__ (line 512) | def __post_init__(self): class TrainingWorkerConfig (line 522) | class TrainingWorkerConfig(BaseConfig): FILE: verl/workers/config/megatron_peft.py function get_peft_cls (line 17) | def get_peft_cls(model_config, bridge, provider, dtype=None): FILE: verl/workers/config/model.py class MtpConfig (line 31) | class MtpConfig(BaseConfig): class HFModelConfig (line 72) | class HFModelConfig(BaseConfig): method __post_init__ (line 145) | def __post_init__(self): method get_processor (line 231) | def get_processor(self): FILE: verl/workers/config/optimizer.py class OptimizerConfig (line 34) | class OptimizerConfig(BaseConfig): method __post_init__ (line 57) | def __post_init__(self): class VeOmniOptimizerConfig (line 65) | class VeOmniOptimizerConfig(OptimizerConfig): class FSDPOptimizerConfig (line 88) | class FSDPOptimizerConfig(OptimizerConfig): method __post_init__ (line 116) | def __post_init__(self): class McoreOptimizerConfig (line 128) | class McoreOptimizerConfig(OptimizerConfig): class TorchtitanOptimizerConfig (line 158) | class TorchtitanOptimizerConfig(OptimizerConfig): class AutomodelOptimizerConfig (line 175) | class AutomodelOptimizerConfig(OptimizerConfig): method __post_init__ (line 213) | def __post_init__(self): function build_optimizer (line 218) | def build_optimizer(parameters, config: FSDPOptimizerConfig): FILE: verl/workers/config/reward.py class RewardManagerConfig (line 32) | class RewardManagerConfig(BaseConfig): method __post_init__ (line 51) | def __post_init__(self): class SandboxFusionConfig (line 67) | class SandboxFusionConfig(BaseConfig): class RewardModelConfig (line 82) | class RewardModelConfig(BaseConfig): class RewardConfig (line 94) | class RewardConfig(BaseConfig): FILE: verl/workers/config/rollout.py class SamplingConfig (line 38) | class SamplingConfig(BaseConfig): class MultiTurnConfig (line 47) | class MultiTurnConfig(BaseConfig): class CustomAsyncServerConfig (line 65) | class CustomAsyncServerConfig(BaseConfig): class AgentLoopConfig (line 71) | class AgentLoopConfig(BaseConfig): class TraceConfig (line 82) | class TraceConfig(BaseConfig): method __post_init__ (line 89) | def __post_init__(self): class ServerConfig (line 95) | class ServerConfig(BaseConfig): class PrometheusConfig (line 108) | class PrometheusConfig(BaseConfig): class CheckpointEngineConfig (line 124) | class CheckpointEngineConfig(BaseConfig): class RolloutConfig (line 138) | class RolloutConfig(BaseConfig): method __post_init__ (line 248) | def __post_init__(self): FILE: verl/workers/critic/base.py class BasePPOCritic (line 27) | class BasePPOCritic(ABC): method __init__ (line 28) | def __init__(self, config): method compute_values (line 33) | def compute_values(self, data: DataProto) -> torch.Tensor: method update_critic (line 38) | def update_critic(self, data: DataProto): FILE: verl/workers/critic/dp_critic.py class DataParallelPPOCritic (line 42) | class DataParallelPPOCritic(BasePPOCritic): method __init__ (line 43) | def __init__(self, config, critic_module: nn.Module, critic_optimizer:... method _forward_micro_batch (line 53) | def _forward_micro_batch(self, micro_batch): method _optimizer_step (line 134) | def _optimizer_step(self): method compute_values (line 153) | def compute_values(self, data: DataProto) -> torch.Tensor: method update_critic (line 192) | def update_critic(self, data: DataProto): FILE: verl/workers/critic/megatron_critic.py class MegatronPPOCritic (line 46) | class MegatronPPOCritic(BasePPOCritic): method __init__ (line 47) | def __init__( method _validate_config (line 81) | def _validate_config(self, config) -> None: method compute_values (line 89) | def compute_values(self, data: DataProto) -> DataProto: method make_minibatch_iterator (line 149) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 159) | def forward_backward_batch( method update_critic (line 305) | def update_critic(self, dataloader: Iterable[DataProto]): FILE: verl/workers/engine/automodel/transformer_impl.py class AutomodelEngine (line 71) | class AutomodelEngine(BaseEngine): method __init__ (line 74) | def __init__( method is_param_offload_enabled (line 122) | def is_param_offload_enabled(self) -> bool: method is_optimizer_offload_enabled (line 126) | def is_optimizer_offload_enabled(self) -> bool: method initialize (line 129) | def initialize(self): method _build_optimizer (line 156) | def _build_optimizer(self, module): method _build_lr_scheduler (line 190) | def _build_lr_scheduler(self, optimizer): method forward_backward_batch (line 224) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method forward_step (line 264) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... method optimizer_zero_grad (line 267) | def optimizer_zero_grad(self): method optimizer_step (line 270) | def optimizer_step(self): method lr_scheduler_step (line 301) | def lr_scheduler_step(self): method get_data_parallel_rank (line 307) | def get_data_parallel_rank(self): method get_data_parallel_size (line 312) | def get_data_parallel_size(self): method get_data_parallel_group (line 317) | def get_data_parallel_group(self): method is_mp_src_rank_with_outputs (line 322) | def is_mp_src_rank_with_outputs(self): method train_mode (line 328) | def train_mode(self, **kwargs): method eval_mode (line 331) | def eval_mode(self, **kwargs): method to (line 334) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method _build_checkpointer (line 357) | def _build_checkpointer(self): method save_checkpoint (line 375) | def save_checkpoint( method load_checkpoint (line 400) | def load_checkpoint( method get_per_tensor_param (line 423) | def get_per_tensor_param(self, **kwargs): class AutomodelEvalModeCtx (line 440) | class AutomodelEvalModeCtx(BaseEngineCtx): method __init__ (line 441) | def __init__(self, engine: AutomodelEngine, **kwargs): method __enter__ (line 444) | def __enter__(self): method __exit__ (line 449) | def __exit__(self, exc_type, exc_value, traceback): class AutomodelTrainModeCtx (line 457) | class AutomodelTrainModeCtx(BaseEngineCtx): method __init__ (line 458) | def __init__(self, engine: AutomodelEngine, **kwargs): method __enter__ (line 461) | def __enter__(self): method __exit__ (line 466) | def __exit__(self, exc_type, exc_value, traceback): class AutomodelEngineWithLMHead (line 473) | class AutomodelEngineWithLMHead(AutomodelEngine): method prepare_model_inputs (line 476) | def prepare_model_inputs(self, micro_batch: TensorDict): method prepare_model_outputs (line 587) | def prepare_model_outputs(self, output, output_args, micro_batch: Tens... method forward_step (line 682) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... FILE: verl/workers/engine/automodel/utils.py function get_dp_rank (line 23) | def get_dp_rank(device_mesh, include_cp=False): function get_tp_rank (line 32) | def get_tp_rank(device_mesh): function get_pp_rank (line 39) | def get_pp_rank(device_mesh): function get_dp_group_size (line 46) | def get_dp_group_size(device_mesh, include_cp=False): function maybe_fully_shard_optimizer (line 57) | def maybe_fully_shard_optimizer(model, optimizer, distributed_config): function build_distributed_config_from_engine_config (line 67) | def build_distributed_config_from_engine_config(engine_config, world_size): function build_automodel_model (line 127) | def build_automodel_model(model_config, engine_config, distributed_confi... function offload_automodel_model_to_cpu (line 198) | def offload_automodel_model_to_cpu(model, empty_cache=True): function load_automodel_model_to_gpu (line 221) | def load_automodel_model_to_gpu(model): function offload_automodel_optimizer (line 228) | def offload_automodel_optimizer(optimizer): function load_automodel_optimizer (line 241) | def load_automodel_optimizer(optimizer, device_id): FILE: verl/workers/engine/base.py class BaseEngine (line 29) | class BaseEngine: method initialize (line 37) | def initialize(self): method is_param_offload_enabled (line 47) | def is_param_offload_enabled(self) -> bool: method is_optimizer_offload_enabled (line 53) | def is_optimizer_offload_enabled(self) -> bool: method train_mode (line 57) | def train_mode(self, **kwargs): method eval_mode (line 67) | def eval_mode(self, **kwargs): method optimizer_zero_grad (line 77) | def optimizer_zero_grad(self): method optimizer_step (line 83) | def optimizer_step(self): method lr_scheduler_step (line 89) | def lr_scheduler_step(self): method forward_backward_batch (line 98) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method train_batch (line 112) | def train_batch(self, data: TensorDict, loss_function: Callable) -> Any: method infer_batch (line 133) | def infer_batch(self, data: TensorDict, loss_function: Optional[Callab... method get_per_tensor_param (line 150) | def get_per_tensor_param(self) -> tuple[Generator[tuple[str, torch.Ten... method get_data_parallel_size (line 160) | def get_data_parallel_size(self): method get_data_parallel_rank (line 163) | def get_data_parallel_rank(self): method get_data_parallel_group (line 166) | def get_data_parallel_group(self): method to (line 169) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method save_checkpoint (line 182) | def save_checkpoint( method load_checkpoint (line 202) | def load_checkpoint( method is_mp_src_rank_with_outputs (line 216) | def is_mp_src_rank_with_outputs(self): method disable_adapter (line 222) | def disable_adapter(self) -> ContextManager: class BaseEngineCtx (line 229) | class BaseEngineCtx: method __init__ (line 230) | def __init__(self, engine: BaseEngine, mode, **kwargs): method _context_switch (line 242) | def _context_switch(self, device): method __enter__ (line 255) | def __enter__(self): method __exit__ (line 259) | def __exit__(self, exc_type, exc_val, exc_tb): class EngineRegistry (line 264) | class EngineRegistry: method register (line 276) | def register(cls, model_type: str, backend: list[str] | str, device: l... method get_engine_cls (line 311) | def get_engine_cls(cls, model_type: str, backend: str): method new (line 321) | def new(cls, model_type, backend, *args, **kwargs): FILE: verl/workers/engine/fsdp/transformer_impl.py class FSDPEngine (line 84) | class FSDPEngine(BaseEngine): method __init__ (line 91) | def __init__( method is_param_offload_enabled (line 154) | def is_param_offload_enabled(self) -> bool: method is_optimizer_offload_enabled (line 158) | def is_optimizer_offload_enabled(self) -> bool: method is_mp_src_rank_with_outputs (line 161) | def is_mp_src_rank_with_outputs(self): method initialize (line 168) | def initialize(self): method _init_device_mesh (line 196) | def _init_device_mesh(self): method _build_module (line 215) | def _build_module(self): method _build_lora_module (line 271) | def _build_lora_module(self, module): method _build_fsdp_module (line 304) | def _build_fsdp_module(self, module): method _build_optimizer (line 404) | def _build_optimizer(self, module): method _build_lr_scheduler (line 411) | def _build_lr_scheduler(self, optimizer): method _apply_qat (line 444) | def _apply_qat(self, module): method _restore_w4a4_input_scales (line 465) | def _restore_w4a4_input_scales(self, model, model_path): method _build_model_optimizer (line 496) | def _build_model_optimizer(self): method train_mode (line 533) | def train_mode(self, **kwargs): method eval_mode (line 541) | def eval_mode(self, **kwargs): method get_data_parallel_rank (line 549) | def get_data_parallel_rank(self): method get_data_parallel_size (line 555) | def get_data_parallel_size(self): method get_data_parallel_group (line 558) | def get_data_parallel_group(self): method get_model_parallel_group (line 564) | def get_model_parallel_group(self): method get_context_parallel_group (line 567) | def get_context_parallel_group(self): method forward_backward_batch (line 570) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method forward_step (line 602) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... method optimizer_zero_grad (line 605) | def optimizer_zero_grad(self): method optimizer_step (line 611) | def optimizer_step(self): method lr_scheduler_step (line 646) | def lr_scheduler_step(self): method to (line 654) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method save_checkpoint (line 682) | def save_checkpoint( method load_checkpoint (line 705) | def load_checkpoint( method get_per_tensor_param (line 727) | def get_per_tensor_param(self, layered_summon=False, base_sync_done=Fa... method disable_adapter (line 802) | def disable_adapter(self) -> ContextManager: class EngineEvalModeCtx (line 806) | class EngineEvalModeCtx(BaseEngineCtx): method __init__ (line 807) | def __init__(self, engine: FSDPEngine, **kwargs): method __enter__ (line 810) | def __enter__(self): method __exit__ (line 817) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 832) | class EngineTrainModeCtx(BaseEngineCtx): method __init__ (line 833) | def __init__(self, engine: FSDPEngine, **kwargs): method __enter__ (line 836) | def __enter__(self): method __exit__ (line 843) | def __exit__(self, exc_type, exc_value, traceback): class FSDPEngineWithLMHead (line 851) | class FSDPEngineWithLMHead(FSDPEngine): method prepare_model_inputs (line 852) | def prepare_model_inputs(self, micro_batch: TensorDict): method prepare_model_outputs (line 992) | def prepare_model_outputs(self, output, output_args, micro_batch: Tens... method forward_step (line 1102) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... class FSDPEngineWithValueHead (line 1137) | class FSDPEngineWithValueHead(FSDPEngineWithLMHead): method prepare_model_outputs (line 1142) | def prepare_model_outputs(self, output, output_args, micro_batch: Tens... FILE: verl/workers/engine/fsdp/utils.py function apply_npu_fsdp_patches (line 26) | def apply_npu_fsdp_patches(): function create_device_mesh (line 38) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 59) | def get_sharding_strategy(device_mesh): FILE: verl/workers/engine/megatron/transformer_impl.py class MegatronEngine (line 69) | class MegatronEngine(BaseEngine): method __init__ (line 70) | def __init__( method _init_device_mesh (line 107) | def _init_device_mesh(self): method _build_tf_config (line 123) | def _build_tf_config(self): method _build_megatron_module (line 204) | def _build_megatron_module(self): method _maybe_enable_fused_kernels (line 262) | def _maybe_enable_fused_kernels(self): method _build_optimizer (line 278) | def _build_optimizer(self): method _build_lr_scheduler (line 290) | def _build_lr_scheduler(self): method is_param_offload_enabled (line 299) | def is_param_offload_enabled(self) -> bool: method is_optimizer_offload_enabled (line 303) | def is_optimizer_offload_enabled(self) -> bool: method is_mp_src_rank_with_outputs (line 306) | def is_mp_src_rank_with_outputs(self): method initialize (line 313) | def initialize(self): method train_mode (line 380) | def train_mode(self, **kwargs): method eval_mode (line 390) | def eval_mode(self, **kwargs): method optimizer_zero_grad (line 400) | def optimizer_zero_grad(self): method optimizer_step (line 410) | def optimizer_step(self): method lr_scheduler_step (line 427) | def lr_scheduler_step(self): method to (line 439) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method get_data_parallel_rank (line 467) | def get_data_parallel_rank(self): method get_data_parallel_size (line 470) | def get_data_parallel_size(self): method get_data_parallel_group (line 473) | def get_data_parallel_group(self): method get_model_parallel_group (line 476) | def get_model_parallel_group(self): method get_context_parallel_group (line 479) | def get_context_parallel_group(self): method save_checkpoint (line 482) | def save_checkpoint( method load_checkpoint (line 509) | def load_checkpoint( method forward_backward_batch (line 530) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method get_per_tensor_param (line 639) | def get_per_tensor_param(self, base_sync_done=False, **kwargs): method disable_adapter (line 659) | def disable_adapter(self) -> ContextManager: method forward_step (line 662) | def forward_step(self, batch_iter, model, postprocess_micro_batch_func): method postprocess_micro_batch_func (line 665) | def postprocess_micro_batch_func(self, output, data: TensorDict, forwa... class EngineEvalModeCtx (line 669) | class EngineEvalModeCtx(BaseEngineCtx): method __init__ (line 670) | def __init__(self, engine: MegatronEngine, **kwargs): method __enter__ (line 673) | def __enter__(self): method __exit__ (line 680) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 685) | class EngineTrainModeCtx(BaseEngineCtx): method __init__ (line 686) | def __init__(self, engine: MegatronEngine, **kwargs): method __enter__ (line 689) | def __enter__(self): method __exit__ (line 696) | def __exit__(self, exc_type, exc_value, traceback): class MegatronEngineWithLMHead (line 703) | class MegatronEngineWithLMHead(MegatronEngine): method prepare_model_inputs (line 704) | def prepare_model_inputs(self, batch: TensorDict): method prepare_model_outputs (line 718) | def prepare_model_outputs(self, output: dict, data: TensorDict): method forward_step (line 729) | def forward_step(self, batch_iter: Iterator[TensorDict], model, postpr... method postprocess_micro_batch_func (line 852) | def postprocess_micro_batch_func(self, output, data: TensorDict, forwa... class MegatronEngineWithValueHead (line 880) | class MegatronEngineWithValueHead(MegatronEngineWithLMHead): method forward_step (line 882) | def forward_step(self, batch_iter, model, postprocess_micro_batch_func): method prepare_model_outputs (line 905) | def prepare_model_outputs(self, output: dict | torch.Tensor, data: Ten... FILE: verl/workers/engine/megatron/utils.py function set_random_seed (line 19) | def set_random_seed(seed): FILE: verl/workers/engine/mindspeed/transformer_impl.py class MindspeedEngineWithLMHead (line 34) | class MindspeedEngineWithLMHead(MegatronEngineWithLMHead): method __init__ (line 35) | def __init__( FILE: verl/workers/engine/torchtitan/transformer_impl.py class TorchTitanEngine (line 72) | class TorchTitanEngine(BaseEngine): method __init__ (line 80) | def __init__( method is_param_offload_enabled (line 205) | def is_param_offload_enabled(self) -> bool: method is_optimizer_offload_enabled (line 209) | def is_optimizer_offload_enabled(self) -> bool: method is_mp_src_rank_with_outputs (line 212) | def is_mp_src_rank_with_outputs(self): method initialize (line 231) | def initialize(self): method _init_device_mesh (line 259) | def _init_device_mesh(self): method train_mode (line 274) | def train_mode(self, **kwargs): method eval_mode (line 278) | def eval_mode(self, **kwargs): method get_data_parallel_rank (line 282) | def get_data_parallel_rank(self): method get_data_parallel_size (line 286) | def get_data_parallel_size(self): method get_data_parallel_group (line 289) | def get_data_parallel_group(self): method get_model_parallel_group (line 301) | def get_model_parallel_group(self): method get_context_parallel_group (line 304) | def get_context_parallel_group(self): method _get_data_parallel_mesh (line 307) | def _get_data_parallel_mesh(self): method forward_backward_batch (line 316) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method model_forward_step (line 347) | def model_forward_step( method forward_step (line 376) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... method optimizer_zero_grad (line 379) | def optimizer_zero_grad(self): method optimizer_step (line 383) | def optimizer_step(self): method lr_scheduler_step (line 401) | def lr_scheduler_step(self): method to (line 407) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method save_checkpoint (line 432) | def save_checkpoint( method load_checkpoint (line 459) | def load_checkpoint( method get_per_tensor_param (line 488) | def get_per_tensor_param(self, **kwargs): class EngineEvalModeCtx (line 540) | class EngineEvalModeCtx(BaseEngineCtx): method __init__ (line 541) | def __init__(self, engine: TorchTitanEngine, **kwargs): method __enter__ (line 544) | def __enter__(self): method __exit__ (line 550) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 561) | class EngineTrainModeCtx(BaseEngineCtx): method __init__ (line 562) | def __init__(self, engine: TorchTitanEngine, **kwargs): method __enter__ (line 565) | def __enter__(self): method __exit__ (line 571) | def __exit__(self, exc_type, exc_value, traceback): class TorchTitanEngineWithLMHead (line 578) | class TorchTitanEngineWithLMHead(TorchTitanEngine): method prepare_model_inputs (line 581) | def prepare_model_inputs(self, micro_batch: TensorDict): method prepare_model_outputs (line 653) | def prepare_model_outputs(self, logits, output_args, micro_batch: Tens... method forward_step (line 714) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... FILE: verl/workers/engine/torchtitan/utils.py class NoOpDataLoader (line 39) | class NoOpDataLoader(BaseDataLoader): class Config (line 48) | class Config(BaseDataLoader.Config): method __init__ (line 51) | def __init__(self, **kwargs): method __iter__ (line 54) | def __iter__(self) -> Iterator[tuple[dict[str, torch.Tensor], torch.Te... method state_dict (line 57) | def state_dict(self): method load_state_dict (line 60) | def load_state_dict(self, state_dict): function derive_torchtitan_name_and_flavor (line 80) | def derive_torchtitan_name_and_flavor(hf_config) -> tuple[str, str]: function enable_fsdp_gradient_division (line 145) | def enable_fsdp_gradient_division(model: nn.Module, dp_size: int) -> None: function get_attention_masks (line 164) | def get_attention_masks( function _get_document_mask_mod (line 184) | def _get_document_mask_mod(positions: torch.Tensor) -> _mask_mod_signature: function _get_flex_attention_masks (line 196) | def _get_flex_attention_masks( function _create_varlen_metadata_for_document (line 206) | def _create_varlen_metadata_for_document(input_batch: torch.Tensor, posi... function _parse_expert_name (line 270) | def _parse_expert_name(name: str) -> tuple[int, int, str] | None: function _make_expert_name_template (line 278) | def _make_expert_name_template(name: str) -> str: function iter_per_tensor_params_ep (line 283) | def iter_per_tensor_params_ep( FILE: verl/workers/engine/utils.py function enable_full_determinism (line 29) | def enable_full_determinism(seed: int): function prepare_micro_batches (line 59) | def prepare_micro_batches( function postprocess_batch_func (line 100) | def postprocess_batch_func(output_lst, indices, data: TensorDict): FILE: verl/workers/engine/veomni/transformer_impl.py class VeOmniEngine (line 59) | class VeOmniEngine(FSDPEngine): method __init__ (line 60) | def __init__( method initialize (line 138) | def initialize(self): method _build_optimizer (line 165) | def _build_optimizer(self, module): method _build_lr_scheduler (line 180) | def _build_lr_scheduler(self, optimizer): method _build_model_optimizer (line 195) | def _build_model_optimizer(self): method optimizer_step (line 241) | def optimizer_step(self): method forward_backward_batch (line 261) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method get_data_parallel_rank (line 300) | def get_data_parallel_rank(self): method get_data_parallel_size (line 303) | def get_data_parallel_size(self): method get_data_parallel_group (line 306) | def get_data_parallel_group(self): method get_model_parallel_group (line 312) | def get_model_parallel_group(self): method get_context_parallel_group (line 315) | def get_context_parallel_group(self): method is_mp_src_rank_with_outputs (line 318) | def is_mp_src_rank_with_outputs(self): method train_mode (line 328) | def train_mode(self, **kwargs): method eval_mode (line 336) | def eval_mode(self, **kwargs): method to (line 344) | def to(self, device: str, model: bool = True, optimizer: bool = True, ... method save_checkpoint (line 372) | def save_checkpoint( method load_checkpoint (line 395) | def load_checkpoint( method get_per_tensor_param (line 415) | def get_per_tensor_param(self, **kwargs): class EngineEvalModeCtx (line 456) | class EngineEvalModeCtx(BaseEngineCtx): method __init__ (line 457) | def __init__(self, engine: VeOmniEngine, **kwargs): method __enter__ (line 460) | def __enter__(self): method __exit__ (line 467) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 482) | class EngineTrainModeCtx(BaseEngineCtx): method __init__ (line 483) | def __init__(self, engine: VeOmniEngine, **kwargs): method __enter__ (line 486) | def __enter__(self): method __exit__ (line 495) | def __exit__(self, exc_type, exc_value, traceback): class OmniSequenceShardCollator (line 503) | class OmniSequenceShardCollator: method __post_init__ (line 532) | def __post_init__(self): method sp_slice (line 536) | def sp_slice(self, feature: torch.Tensor, dim: int = -1) -> dict[str, ... method sp_padding (line 541) | def sp_padding( method __call__ (line 560) | def __call__(self, batch: Sequence[dict[str, "torch.Tensor"]]) -> dict... class VeOmniEngineWithLMHead (line 579) | class VeOmniEngineWithLMHead(VeOmniEngine, FSDPEngineWithLMHead): method prepare_model_inputs (line 580) | def prepare_model_inputs(self, micro_batch: TensorDict): FILE: verl/workers/engine/veomni/utils.py function offload_veomni_model_to_cpu (line 36) | def offload_veomni_model_to_cpu(model, empty_cache: bool = True): function load_veomni_model_to_gpu (line 58) | def load_veomni_model_to_gpu(model): function offload_veomni_optimizer (line 64) | def offload_veomni_optimizer(optimizer): function load_veomni_optimizer (line 84) | def load_veomni_optimizer(optimizer, device_id): function _map_moe_params_qwen3_moe (line 103) | def _map_moe_params_qwen3_moe(name, tensor): FILE: verl/workers/engine_workers.py function _with_routing_replay_flag (line 50) | def _with_routing_replay_flag(enabled: bool): class TrainingWorker (line 65) | class TrainingWorker(Worker, DistProfilerExtension): method __init__ (line 72) | def __init__(self, config: TrainingWorkerConfig): method to (line 135) | def to(self, device, model=True, optimizer=True, grad=True): method set_loss_fn (line 145) | def set_loss_fn(self, loss_fn): method reset (line 149) | def reset(self): method _postprocess_output (line 156) | def _postprocess_output(self, output, *, global_token_num, delta_time,... method train_mini_batch (line 215) | def train_mini_batch(self, data: TensorDict) -> TensorDict: method train_batch (line 299) | def train_batch(self, data: TensorDict) -> TensorDict: method infer_batch (line 354) | def infer_batch(self, data: TensorDict) -> TensorDict: method save_checkpoint (line 400) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 404) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class ActorRolloutRefWorker (line 408) | class ActorRolloutRefWorker(Worker, DistProfilerExtension): method __init__ (line 415) | def __init__(self, config: DictConfig, role: str, **kwargs): method set_loss_fn (line 453) | def set_loss_fn(self, loss_fn): method to (line 457) | def to(self, device, model=True, optimizer=True, grad=True): method init_model (line 462) | def init_model(self): method compute_ref_log_prob (line 588) | def compute_ref_log_prob(self, data: TensorDict) -> TensorDict: method compute_log_prob (line 595) | def compute_log_prob(self, data: TensorDict) -> TensorDict: method update_actor (line 603) | def update_actor(self, data: TensorDict) -> TensorDict: method load_checkpoint (line 608) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... method save_checkpoint (line 613) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method update_weights (line 618) | async def update_weights(self, global_steps: int = None): method execute_checkpoint_engine (line 682) | def execute_checkpoint_engine(self, method: str, *args, **kwargs): FILE: verl/workers/fsdp_workers.py function create_device_mesh (line 101) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 111) | def get_sharding_strategy(device_mesh, zero3_enable=True): function get_vl_model_vision_tower (line 130) | def get_vl_model_vision_tower(vl_model_instance): class ActorRolloutRefWorker (line 143) | class ActorRolloutRefWorker(Worker, DistProfilerExtension): method __init__ (line 149) | def __init__(self, config: DictConfig, role: str, **kwargs): method _init_qat_config (line 283) | def _init_qat_config(self): method _restore_w4a4_input_scales (line 297) | def _restore_w4a4_input_scales(self, model, model_path): method _build_model_optimizer (line 329) | def _build_model_optimizer( method _build_rollout (line 686) | def _build_rollout(self, trust_remote_code=False): method rollout_mode (line 750) | async def rollout_mode(self): method init_model (line 858) | def init_model(self): method update_actor (line 999) | def update_actor(self, data: DataProto): method generate_sequences (line 1045) | def generate_sequences(self, prompts: DataProto): method compute_log_prob (line 1095) | def compute_log_prob(self, data: DataProto): method compute_ref_log_prob (line 1147) | def compute_ref_log_prob(self, data: DataProto): method save_checkpoint (line 1180) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 1229) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... method start_profile (line 1257) | def start_profile(self, **kwargs) -> None: method stop_profile (line 1262) | def stop_profile(self) -> None: method dump_memory_snapshot (line 1267) | def dump_memory_snapshot(self, tag: str = "manual", sub_dir: str = Non... class CriticWorker (line 1282) | class CriticWorker(Worker, DistProfilerExtension): method __init__ (line 1283) | def __init__(self, config: FSDPCriticConfig): method _build_critic_model_optimizer (line 1364) | def _build_critic_model_optimizer(self, config: FSDPCriticConfig): method init_model (line 1614) | def init_model(self): method compute_values (line 1647) | def compute_values(self, data: DataProto): method update_critic (line 1667) | def update_critic(self, data: DataProto): method save_checkpoint (line 1699) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 1714) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class AsyncActorRolloutRefWorker (line 1733) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method update_weights (line 1735) | async def update_weights(self, global_steps: int = None): FILE: verl/workers/megatron_workers.py function set_random_seed (line 87) | def set_random_seed(seed, only_rollout=False): class MegatronWorker (line 106) | class MegatronWorker(Worker): method _init_hf_config_and_tf_config (line 107) | def _init_hf_config_and_tf_config( class ActorRolloutRefWorker (line 248) | class ActorRolloutRefWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 254) | def __init__(self, config: DictConfig, role: str, **kwargs): method _build_model_optimizer (line 377) | def _build_model_optimizer( method _build_rollout (line 508) | def _build_rollout(self, trust_remote_code=False): method init_model (line 554) | def init_model(self): method rollout_mode (line 680) | async def rollout_mode(self): method update_actor (line 748) | def update_actor(self, data: DataProto): method generate_sequences (line 794) | def generate_sequences(self, prompts: DataProto): method compute_ref_log_prob (line 844) | def compute_ref_log_prob(self, data: DataProto): method compute_log_prob (line 870) | def compute_log_prob(self, data: DataProto): method load_checkpoint (line 915) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method load_pretrained_model (line 936) | def load_pretrained_model(self, checkpoint_path, del_local_after_load=... method save_checkpoint (line 940) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... method async_calls_finalize_fn_exec (line 955) | def async_calls_finalize_fn_exec(self, blocking=False): method start_profile (line 961) | def start_profile(self, **kwargs) -> None: method stop_profile (line 966) | def stop_profile(self) -> None: method dump_memory_snapshot (line 971) | def dump_memory_snapshot(self, tag: str = "manual", sub_dir: str = Non... class AsyncActorRolloutRefWorker (line 986) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method update_weights (line 988) | async def update_weights(self, global_steps: int = None): class CriticWorker (line 993) | class CriticWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 994) | def __init__(self, config: McoreCriticConfig): method _build_critic_model_optimizer (line 1061) | def _build_critic_model_optimizer( method init_model (line 1149) | def init_model(self): method compute_values (line 1220) | def compute_values(self, data: DataProto): method update_critic (line 1237) | def update_critic(self, data: DataProto): method load_checkpoint (line 1267) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method save_checkpoint (line 1279) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... FILE: verl/workers/reward_manager/abstract.py class AbstractRewardManager (line 27) | class AbstractRewardManager(ABC): method __init__ (line 29) | def __init__( method __call__ (line 40) | def __call__( method _extract_reward_from_rm_scores (line 47) | def _extract_reward_from_rm_scores( FILE: verl/workers/reward_manager/batch.py class BatchRewardManager (line 26) | class BatchRewardManager(AbstractRewardManager): method __init__ (line 38) | def __init__( method verify (line 47) | def verify(self, data): method __call__ (line 80) | def __call__(self, data: DataProto, return_dict: bool = False) -> torc... FILE: verl/workers/reward_manager/dapo.py class DAPORewardManager (line 26) | class DAPORewardManager(AbstractRewardManager): method __init__ (line 29) | def __init__( method __call__ (line 58) | def __call__(self, data: DataProto, return_dict: bool = False): FILE: verl/workers/reward_manager/naive.py class NaiveRewardManager (line 27) | class NaiveRewardManager(AbstractRewardManager): method __init__ (line 30) | def __init__(self, tokenizer, num_examine, compute_score=None, reward_... method __call__ (line 46) | def __call__(self, data: DataProto, return_dict: bool = False) -> torc... FILE: verl/workers/reward_manager/prime.py function single_compute_score (line 31) | async def single_compute_score(evaluation_func, completion, reference, t... function parallel_compute_score_async (line 45) | async def parallel_compute_score_async( function run_reward_scoring (line 91) | def run_reward_scoring(evaluation_func, completions, references, tasks, ... class PrimeRewardManager (line 103) | class PrimeRewardManager(AbstractRewardManager): method __init__ (line 108) | def __init__( method verify (line 120) | def verify(self, data): method __call__ (line 152) | def __call__(self, data: DataProto, return_dict: bool = False) -> torc... FILE: verl/workers/reward_manager/registry.py function register (line 24) | def register(name: str) -> Callable[[type[AbstractRewardManager]], type[... function get_reward_manager_cls (line 43) | def get_reward_manager_cls(name: str) -> type[AbstractRewardManager]: FILE: verl/workers/rollout/base.py class BaseRollout (line 29) | class BaseRollout(ABC): method __init__ (line 32) | def __init__( method resume (line 45) | async def resume(self, tags: list[str]): method update_weights (line 54) | async def update_weights( method release (line 67) | async def release(self): method generate_sequences (line 71) | def generate_sequences(self, prompts: DataProto) -> DataProto: function get_rollout_class (line 90) | def get_rollout_class(rollout_name: str, mode: str = "async") -> type[Ba... FILE: verl/workers/rollout/hf_rollout.py class HFRollout (line 39) | class HFRollout(BaseRollout): method __init__ (line 40) | def __init__(self, module: nn.Module, config): method generate_sequences (line 45) | def generate_sequences(self, prompts: DataProto) -> DataProto: method _generate_minibatch (line 54) | def _generate_minibatch(self, prompts: DataProto) -> DataProto: FILE: verl/workers/rollout/naive/naive_rollout.py class NaiveRollout (line 36) | class NaiveRollout(BaseRollout): method __init__ (line 37) | def __init__(self, module: nn.Module, config): method generate_sequences (line 51) | def generate_sequences(self, prompts: DataProto) -> DataProto: FILE: verl/workers/rollout/replica.py class TokenOutput (line 39) | class TokenOutput(BaseModel): class RolloutMode (line 54) | class RolloutMode(Enum): class RolloutReplica (line 70) | class RolloutReplica(ABC): method __init__ (line 93) | def __init__( method init_hybrid (line 127) | async def init_hybrid(self, worker_group: RayWorkerGroup): method init_hybrid_colocated (line 139) | async def init_hybrid_colocated(self, worker_group: RayWorkerGroup, re... method init_colocated (line 156) | async def init_colocated(self, resource_pool: RayResourcePool): method init_standalone (line 180) | async def init_standalone(self): method get_ray_class_with_init_args (line 211) | def get_ray_class_with_init_args(self) -> RayClassWithInitArgs: method launch_servers (line 225) | async def launch_servers(self): method server_address (line 230) | def server_address(self) -> str: method server_handle (line 235) | def server_handle(self) -> ActorHandle: method max_concurrency (line 240) | def max_concurrency(self) -> int: method rollout_worker_use_gpu (line 245) | def rollout_worker_use_gpu(self) -> bool: method wake_up (line 248) | async def wake_up(self): method sleep (line 252) | async def sleep(self): method abort_all_requests (line 256) | async def abort_all_requests(self): method resume_generation (line 260) | async def resume_generation(self): method clear_kv_cache (line 264) | async def clear_kv_cache(self): method start_profile (line 268) | async def start_profile(self, **kwargs): method stop_profile (line 272) | async def stop_profile(self): class RolloutReplicaRegistry (line 277) | class RolloutReplicaRegistry: method register (line 283) | def register(cls, name: str, loader: Callable[[], type[RolloutReplica]... method get (line 288) | def get(cls, name: str) -> type[RolloutReplica]: function _load_vllm (line 296) | def _load_vllm(): function _load_sglang (line 302) | def _load_sglang(): function _load_trtllm (line 346) | def _load_trtllm(): function get_rollout_replica_class (line 359) | def get_rollout_replica_class(rollout: str) -> type[RolloutReplica]: FILE: verl/workers/rollout/schemas.py class FinishReasonTypeEnum (line 37) | class FinishReasonTypeEnum(str, Enum): method from_str (line 45) | def from_str(cls, value: str) -> "FinishReasonTypeEnum": class Message (line 56) | class Message(BaseModel): class AsyncRolloutRequestStateEnum (line 62) | class AsyncRolloutRequestStateEnum(str, Enum): class TokenizationSanityCheckModeEnum (line 73) | class TokenizationSanityCheckModeEnum(str, Enum): class AsyncRolloutRequest (line 81) | class AsyncRolloutRequest(BaseModel): method initialize_request (line 125) | def initialize_request(cls, values): method _handle_apply_chat_template (line 225) | def _handle_apply_chat_template( method _get_position_ids (line 261) | def _get_position_ids( method _update_input_ids (line 299) | def _update_input_ids( method _update_multi_modal_inputs (line 336) | def _update_multi_modal_inputs(self, new_multi_modal_inputs: dict[str,... method get_generation_prompt_ids (line 348) | def get_generation_prompt_ids( method add_user_message (line 379) | def add_user_message( method add_assistant_message (line 395) | def add_assistant_message( method add_tool_response_messages (line 414) | def add_tool_response_messages( method update_metrics (line 476) | def update_metrics(self, metrics: Any, tool_id: str) -> None: method _get_prompt_diffs (line 484) | def _get_prompt_diffs( method _remove_generation_prompt_ids_if_present (line 541) | def _remove_generation_prompt_ids_if_present(self) -> None: method finalize (line 551) | def finalize( method truncate_output_ids (line 658) | def truncate_output_ids( FILE: verl/workers/rollout/sglang_rollout/async_sglang_server.py class SGLangHttpServer (line 59) | class SGLangHttpServer: method __init__ (line 74) | def __init__( method get_master_address (line 143) | def get_master_address(self): method get_server_address (line 147) | def get_server_address(self): method launch_server (line 152) | async def launch_server(self, master_address: str = None, master_port:... method wake_up (line 296) | async def wake_up(self): method sleep (line 314) | async def sleep(self): method clear_kv_cache (line 329) | async def clear_kv_cache(self): method generate (line 333) | async def generate( method set_global_steps (line 425) | async def set_global_steps(self, global_steps: int): method abort_all_requests (line 429) | async def abort_all_requests(self): method resume_generation (line 432) | async def resume_generation(self): method start_profile (line 435) | async def start_profile(self, **kwargs): method stop_profile (line 446) | async def stop_profile(self): class SGLangReplica (line 455) | class SGLangReplica(RolloutReplica): method __init__ (line 456) | def __init__( method launch_servers (line 467) | async def launch_servers(self): FILE: verl/workers/rollout/sglang_rollout/http_server_engine.py function _read_response (line 77) | def _read_response(response: requests.Response): function _read_async_response (line 89) | async def _read_async_response(resp: aiohttp.ClientResponse) -> dict[str... function launch_server_process (line 106) | def launch_server_process( class HttpServerAdapter (line 194) | class HttpServerAdapter(EngineBase): method __init__ (line 216) | def __init__( method _register_with_router (line 270) | def _register_with_router(self) -> None: method _make_request (line 290) | def _make_request( method update_weights_from_tensor (line 350) | def update_weights_from_tensor(self, req: UpdateWeightsFromTensorReqIn... method shutdown (line 392) | def shutdown(self) -> None: method generate (line 424) | def generate( method reward_score (line 483) | def reward_score( method flush_cache (line 502) | def flush_cache(self) -> dict[str, Any]: method release_memory_occupation (line 535) | def release_memory_occupation(self, tags: Optional[list[str]] = None) ... method resume_memory_occupation (line 547) | def resume_memory_occupation(self, tags: Optional[list[str]] = None) -... method abort_request (line 559) | def abort_request(self, rid: str = "", abort_all: bool = False) -> dic... class AsyncHttpServerAdapter (line 572) | class AsyncHttpServerAdapter(HttpServerAdapter): method __init__ (line 587) | def __init__( method _get_session (line 631) | async def _get_session(self) -> aiohttp.ClientSession: method _make_async_request (line 658) | async def _make_async_request( method release_memory_occupation (line 720) | async def release_memory_occupation(self, tags: Optional[list[str]] = ... method resume_memory_occupation (line 732) | async def resume_memory_occupation(self, tags: Optional[list[str]] = N... method update_weights_from_tensor (line 747) | async def update_weights_from_tensor( method flush_cache (line 779) | async def flush_cache(self) -> dict[str, Any]: method generate (line 812) | async def generate( method async_generate (line 849) | async def async_generate( method reward_score (line 908) | async def reward_score( method async_reward_score (line 930) | async def async_reward_score( method abort_request (line 944) | async def abort_request(self, rid: str = "", abort_all: bool = False) ... FILE: verl/workers/rollout/sglang_rollout/sglang_rollout.py function _set_envs_and_config (line 47) | def _set_envs_and_config(server_args: ServerArgs): class ServerAdapter (line 88) | class ServerAdapter(BaseRollout): method __init__ (line 96) | def __init__( method _init_server_adapter (line 132) | async def _init_server_adapter(self): method resume (line 167) | async def resume(self, tags: list[str]): method release (line 177) | async def release(self): method update_weights (line 183) | async def update_weights( FILE: verl/workers/rollout/sglang_rollout/utils.py function broadcast_pyobj (line 27) | def broadcast_pyobj( function get_named_tensor_buckets (line 72) | async def get_named_tensor_buckets( FILE: verl/workers/rollout/tokenizer.py class HybridEngineBaseTokenizer (line 26) | class HybridEngineBaseTokenizer(ABC): method vocab_size (line 31) | def vocab_size(self): method pad_token_id (line 39) | def pad_token_id(self): method eos_token_id (line 47) | def eos_token_id(self): method all_special_ids (line 56) | def all_special_ids(self) -> list[int]: method all_special_tokens (line 64) | def all_special_tokens(self) -> list[str]: method encode (line 73) | def encode(self, text): method decode (line 89) | def decode( method convert_ids_to_tokens (line 119) | def convert_ids_to_tokens(self, ids: int | list[int], skip_special_tok... method get_added_vocab (line 136) | def get_added_vocab(self) -> dict[str, int]: method convert_tokens_to_string (line 148) | def convert_tokens_to_string(self, tokens: list[str]) -> str: method is_fast (line 162) | def is_fast(self): FILE: verl/workers/rollout/trtllm_rollout/trtllm_async_server.py class TRTLLMHttpServer (line 39) | class TRTLLMHttpServer: method __init__ (line 54) | def __init__( method get_server_address (line 112) | def get_server_address(self): method launch_server (line 117) | async def launch_server(self): method generate (line 230) | async def generate( method set_global_steps (line 277) | async def set_global_steps(self, global_steps: int): method abort_all_requests (line 281) | async def abort_all_requests(self): method resume_generation (line 284) | async def resume_generation(self): method wake_up (line 287) | async def wake_up(self): method sleep (line 296) | async def sleep(self): method report_device_ids (line 307) | async def report_device_ids(self) -> list[str]: class TRTLLMReplica (line 315) | class TRTLLMReplica(RolloutReplica): method __init__ (line 316) | def __init__( method rollout_worker_use_gpu (line 327) | def rollout_worker_use_gpu(self) -> bool: method get_pgs_and_bundle_indices (line 330) | def get_pgs_and_bundle_indices(self) -> tuple[list[PlacementGroup], li... method launch_servers (line 385) | async def launch_servers(self): FILE: verl/workers/rollout/trtllm_rollout/trtllm_rollout.py function nvml_context (line 52) | def nvml_context(): function get_device_uuid (line 74) | def get_device_uuid(id: str | int) -> str: function _read_async_response (line 101) | async def _read_async_response(resp: aiohttp.ClientResponse) -> dict[str... class AsyncTRTLLMHttpAdapter (line 118) | class AsyncTRTLLMHttpAdapter: method __init__ (line 119) | def __init__( method _get_session (line 136) | async def _get_session(self) -> aiohttp.ClientSession: method _make_async_request (line 163) | async def _make_async_request( method resume_memory_occupation (line 222) | async def resume_memory_occupation(self, tags: list[str]): method release_memory_occupation (line 237) | async def release_memory_occupation(self, tags: list[str]): method update_weights (line 249) | async def update_weights(self, weights: dict[str, str]): class ServerAdapter (line 261) | class ServerAdapter(BaseRollout): method get_full_tags (line 274) | def get_full_tags() -> list[str]: method __init__ (line 277) | def __init__( method get_supports_partial_loading (line 328) | async def get_supports_partial_loading(self) -> bool: method _init_server_adapter (line 343) | async def _init_server_adapter(self): method resume (line 363) | async def resume(self, tags: list[str]): method release (line 383) | async def release(self): method update_weights_from_ipc_handles (line 390) | async def update_weights_from_ipc_handles(self, device_handles): method update_weights (line 413) | async def update_weights( method _get_attribute (line 486) | def _get_attribute(self, name: str): FILE: verl/workers/rollout/trtllm_rollout/trtllm_worker_extension.py class WorkerExtension (line 26) | class WorkerExtension(TrtllmWorkerExtension): method __init__ (line 27) | def __init__(self): method supports_partial_loading (line 31) | def supports_partial_loading(self) -> bool: method update_weights (line 42) | def update_weights(self, ipc_handles: Optional[dict] = None): FILE: verl/workers/rollout/utils.py function get_max_position_embeddings (line 24) | def get_max_position_embeddings(hf_config) -> int: class _UvicornServerAutoPort (line 36) | class _UvicornServerAutoPort(uvicorn.Server): method __init__ (line 39) | def __init__(self, config: uvicorn.Config) -> None: method startup (line 44) | async def startup(self, sockets=None) -> None: method get_port (line 55) | async def get_port(self) -> int | None: function run_uvicorn (line 60) | async def run_uvicorn(app: FastAPI, server_args, server_address) -> tupl... function ensure_async_iterator (line 76) | async def ensure_async_iterator(iterable): function qwen2_5_vl_dedup_image_tokens (line 86) | def qwen2_5_vl_dedup_image_tokens(prompt_ids: list[int], processor): FILE: verl/workers/rollout/vllm_rollout/__init__.py function get_version (line 20) | def get_version(pkg): FILE: verl/workers/rollout/vllm_rollout/bucketed_weight_transfer.py class TensorMetadata (line 36) | class TensorMetadata(TypedDict): function rebuild_ipc (line 44) | def rebuild_ipc(handle: tuple[Callable, tuple], device_id: int | None = ... function create_shared_memory (line 55) | def create_shared_memory(size: int, name: str): function rebuild_shared_memory (line 65) | def rebuild_shared_memory(name: str, size: int, dtype=torch.uint8): class BucketedWeightSender (line 73) | class BucketedWeightSender: method __init__ (line 86) | def __init__( method async_send_weights (line 102) | async def async_send_weights(self, weights): method _init_socket (line 156) | def _init_socket(self): method _init_buffer (line 161) | def _init_buffer(self): method _cleanup (line 183) | def _cleanup(self): class BucketedWeightReceiver (line 200) | class BucketedWeightReceiver: method __init__ (line 213) | def __init__( method receive_weights (line 228) | def receive_weights(self, on_bucket_received: callable): method _init_socket (line 264) | def _init_socket(self): method _init_buffer (line 269) | def _init_buffer(self): method _cleanup (line 285) | def _cleanup(self): FILE: verl/workers/rollout/vllm_rollout/utils.py function set_death_signal (line 42) | def set_death_signal(): function get_device_uuid (line 52) | def get_device_uuid(device_id: int) -> str: function get_vllm_max_lora_rank (line 67) | def get_vllm_max_lora_rank(lora_rank: int): function monkey_patch_compute_logits (line 90) | def monkey_patch_compute_logits(model, vocab_size: int): class vLLMColocateWorkerExtension (line 105) | class vLLMColocateWorkerExtension: method __new__ (line 119) | def __new__(cls, **kwargs): method monkey_patch_model (line 149) | def monkey_patch_model(self, vocab_size: int): method update_weights_from_ipc (line 155) | def update_weights_from_ipc(self, peft_config: dict = None, base_sync_... method _update_weights (line 208) | def _update_weights(self, weights: list[tuple[str, torch.Tensor]], pef... method _get_zmq_handle (line 232) | def _get_zmq_handle(self) -> str: class SuppressSignalInThread (line 239) | class SuppressSignalInThread: method __enter__ (line 240) | def __enter__(self): method __exit__ (line 252) | def __exit__(self, exc_type, exc_val, exc_tb): function build_cli_args_from_config (line 256) | def build_cli_args_from_config(config: dict[str, Any]) -> list[str]: FILE: verl/workers/rollout/vllm_rollout/vllm_async_server.py class vLLMHttpServer (line 79) | class vLLMHttpServer: method __init__ (line 86) | def __init__( method get_master_address (line 173) | def get_master_address(self): method get_server_address (line 180) | def get_server_address(self): method lora_as_adapter (line 186) | def lora_as_adapter(self) -> bool: method collective_rpc (line 191) | async def collective_rpc( method launch_server (line 205) | async def launch_server(self, master_address: str = None, master_port:... method run_server (line 443) | async def run_server(self, args: argparse.Namespace): method run_headless (line 485) | async def run_headless(self, args: argparse.Namespace): method generate (line 508) | async def generate( method wake_up (line 617) | async def wake_up(self): method sleep (line 631) | async def sleep(self): method start_profile (line 651) | async def start_profile(self, **kwargs): method stop_profile (line 659) | async def stop_profile(self): method clear_kv_cache (line 667) | async def clear_kv_cache(self): method set_global_steps (line 671) | async def set_global_steps(self, global_steps: int): method wait_for_requests_to_drain (line 675) | async def wait_for_requests_to_drain(self): method abort_all_requests (line 678) | async def abort_all_requests(self, reset_prefix_cache: bool = True) ->... method resume_generation (line 741) | async def resume_generation(self): method abort_request (line 752) | async def abort_request(self, request_id: str, reset_prefix_cache: boo... class vLLMReplica (line 793) | class vLLMReplica(RolloutReplica): method __init__ (line 794) | def __init__( method launch_servers (line 805) | async def launch_servers(self): method sleep (line 898) | async def sleep(self): method abort_all_requests (line 904) | async def abort_all_requests(self) -> dict[str, Any]: method resume_generation (line 923) | async def resume_generation(self): method abort_request (line 927) | async def abort_request(self, request_id: str) -> dict[str, Any]: FILE: verl/workers/rollout/vllm_rollout/vllm_rollout.py function _check_vllm_version_for_sleep_level (line 51) | def _check_vllm_version_for_sleep_level(): class ServerAdapter (line 61) | class ServerAdapter(BaseRollout): method __init__ (line 67) | def __init__( method _execute_method (line 109) | async def _execute_method( method resume (line 139) | async def resume(self, tags: list[str]): method release (line 148) | async def release(self): method update_weights (line 154) | async def update_weights( method generate_sequences (line 186) | def generate_sequences(self, prompts: DataProto) -> DataProto: FILE: verl/workers/sharding_manager/base.py class BaseShardingManager (line 21) | class BaseShardingManager: method __init__ (line 22) | def __init__(self): method __enter__ (line 25) | def __enter__(self): method __exit__ (line 28) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 31) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 34) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl/workers/sharding_manager/fsdp_ulysses.py class FSDPUlyssesShardingManager (line 27) | class FSDPUlyssesShardingManager(BaseShardingManager): method __init__ (line 32) | def __init__(self, device_mesh: DeviceMesh): method __enter__ (line 37) | def __enter__(self): method __exit__ (line 45) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 52) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 64) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl/workers/utils/losses.py function sft_loss (line 29) | def sft_loss(config: ActorConfig, model_output, data: TensorDict, dp_gro... function _slice_response_from_unpad_output (line 58) | def _slice_response_from_unpad_output(tensor: torch.Tensor, data: Tensor... function ppo_loss (line 97) | def ppo_loss(config: ActorConfig, model_output, data: TensorDict, dp_gro... function value_loss (line 179) | def value_loss(config: CriticConfig, model_output, data: TensorDict, dp_... FILE: verl/workers/utils/padding.py function left_right_2_no_padding (line 23) | def left_right_2_no_padding(data: TensorDict) -> TensorDict: function no_padding_2_padding (line 86) | def no_padding_2_padding(tensor: torch.Tensor, data: TensorDict) -> torc...