SYMBOL INDEX (7561 symbols across 912 files) FILE: benchmarks/api/__init__.py function load_config (line 23) | def load_config(config_path: str = None) -> Dict[str, Any]: function get_client (line 49) | def get_client(model: str, **config) -> BaseLLMClient: function get_client_from_config (line 80) | def get_client_from_config( function batch_generate (line 114) | def batch_generate( FILE: benchmarks/api/base.py class BaseLLMClient (line 12) | class BaseLLMClient(ABC): method __init__ (line 20) | def __init__(self, **config): method _setup (line 33) | def _setup(self): method _call_api (line 38) | def _call_api( method _is_retryable_error (line 62) | def _is_retryable_error(self, error_msg: str) -> bool: method _generate_with_retry (line 79) | def _generate_with_retry( method generate (line 130) | def generate( method batch_generate (line 155) | def batch_generate( method __repr__ (line 238) | def __repr__(self) -> str: FILE: benchmarks/api/claude.py class ClaudeClient (line 10) | class ClaudeClient(BaseLLMClient): method _setup (line 22) | def _setup(self): method _call_api (line 39) | def _call_api( FILE: benchmarks/api/deepseek.py class DeepSeekClient (line 10) | class DeepSeekClient(BaseLLMClient): method _setup (line 24) | def _setup(self): method _call_api (line 44) | def _call_api( FILE: benchmarks/api/example.py function example1_use_config (line 9) | def example1_use_config(): function example2_direct_params (line 28) | def example2_direct_params(): function example3_batch_generate (line 61) | def example3_batch_generate(): function example4_custom_params (line 97) | def example4_custom_params(): function example5_error_handling (line 127) | def example5_error_handling(): function example6_switch_models (line 154) | def example6_switch_models(): function example7_user_portrait (line 177) | def example7_user_portrait(): function example8_direct_import (line 215) | def example8_direct_import(): function main (line 242) | def main(): FILE: benchmarks/api/gemini.py class GeminiClient (line 12) | class GeminiClient(BaseLLMClient): method _setup (line 26) | def _setup(self): method _call_api (line 44) | def _call_api( FILE: benchmarks/benchmark/base_generator.py class Generator (line 13) | class Generator(ABC): method __init__ (line 21) | def __init__( method __str__ (line 33) | def __str__(self) -> str: method generate (line 45) | def generate( method get_hardware_info (line 145) | def get_hardware_info(self) -> Dict[str, Any]: method _generate_two_stage_with_thinking (line 184) | def _generate_two_stage_with_thinking( method _generate_two_stage_classification_with_thinking (line 352) | def _generate_two_stage_classification_with_thinking( class HfTransformersMixin (line 483) | class HfTransformersMixin: method _build_sampling_params (line 491) | def _build_sampling_params(self, **kwargs) -> tuple: class VllmMixin (line 544) | class VllmMixin: method _build_sampling_params (line 552) | def _build_sampling_params(self, **kwargs): method _should_enable_optimizations (line 602) | def _should_enable_optimizations(self) -> bool: class RayMixin (line 628) | class RayMixin: method _initialize_ray_cluster (line 637) | def _initialize_ray_cluster(self): method _determine_gpu_ids_from_cluster (line 688) | def _determine_gpu_ids_from_cluster(self) -> List[Dict[str, Any]]: method _group_gpus_for_workers (line 751) | def _group_gpus_for_workers( method _display_cluster_info (line 826) | def _display_cluster_info(self, gpu_list: List[Dict[str, Any]], num_wo... method cleanup (line 881) | def cleanup(self): FILE: benchmarks/benchmark/benchmark.py class DataLoaderWrapper (line 20) | class DataLoaderWrapper: method __init__ (line 22) | def __init__(self, model_path: str, benchmark_version: str, data_dir: ... method _create_tokenizer (line 31) | def _create_tokenizer(self, model_path: str): method load_data (line 44) | def load_data(self, task_name: str, split: str = "test", sample_size: ... class Benchmark (line 59) | class Benchmark: method __init__ (line 79) | def __init__( method print_benchmark_table (line 100) | def print_benchmark_table(): method check_generator (line 148) | def check_generator(generator): method run (line 157) | def run( method _evaluate_single_task (line 249) | def _evaluate_single_task( method _create_debug_file (line 329) | def _create_debug_file(generation_file: str, gen_data: Dict[str, Any],... method _calculate_model_total_time (line 352) | def _calculate_model_total_time(model_results: Dict[str, Any]) -> float: method _save_results_as_json (line 363) | def _save_results_as_json(eval_results: Dict[str, Any], output_path: s... method _load_existing_results (line 372) | def _load_existing_results(output_path: str, task_types: List[str] = N... method evaluate_dev (line 391) | def evaluate_dev( FILE: benchmarks/benchmark/checkpoint_utils.py function match_checkpoint_keys_to_model (line 15) | def match_checkpoint_keys_to_model( function check_embedding_weight_sharing (line 69) | def check_embedding_weight_sharing( function handle_weight_tying (line 121) | def handle_weight_tying( function load_weights_from_pt (line 174) | def load_weights_from_pt( function build_model_from_pt (line 264) | def build_model_from_pt( function build_model_from_hf (line 316) | def build_model_from_hf( function export_pt_to_safetensor (line 355) | def export_pt_to_safetensor( FILE: benchmarks/benchmark/generation_runner.py class GenerationRunner (line 23) | class GenerationRunner: method __init__ (line 35) | def __init__( method __call__ (line 49) | def __call__( method save_generations (line 180) | def save_generations( FILE: benchmarks/benchmark/gpu_utils.py function _normalize_gpu_name (line 49) | def _normalize_gpu_name(gpu_name: str) -> str: function get_gpu_tflops (line 101) | def get_gpu_tflops(gpu_name: str) -> Optional[float]: function get_gpu_info (line 115) | def get_gpu_info() -> Dict[str, Any]: FILE: benchmarks/benchmark/tasks/tasks.py function get_available_benchmark_versions (line 16) | def get_available_benchmark_versions() -> List[str]: function get_available_task_types (line 21) | def get_available_task_types(benchmark_version: str = LATEST_BENCHMARK_V... function get_available_domains (line 27) | def get_available_domains(benchmark_version: str = LATEST_BENCHMARK_VERS... function get_available_languages (line 36) | def get_available_languages(benchmark_version: str = LATEST_BENCHMARK_VE... function check_benchmark_version (line 46) | def check_benchmark_version(benchmark_version: Optional[str]) -> str: function check_task_types (line 72) | def check_task_types( function check_splits (line 105) | def check_splits( FILE: benchmarks/benchmark/tasks/v1_0/base_evaluator.py class BaseEval (line 14) | class BaseEval(ABC): method __init__ (line 17) | def __init__( method evaluate (line 58) | def evaluate(self) -> Tuple[Dict[str, Any], Dict[str, Dict[str, Any]]]: method _all_samples_have_keys (line 90) | def _all_samples_have_keys(self, required_keys: List[str]) -> bool: method required_metrics (line 99) | def required_metrics(self) -> Optional[List[str]]: method _has_all_required_metrics (line 103) | def _has_all_required_metrics(self) -> bool: method _compute_metrics_from_scratch (line 109) | def _compute_metrics_from_scratch(self) -> Tuple[Dict[str, Any], Dict[... method _save_debug_json (line 114) | def _save_debug_json( FILE: benchmarks/benchmark/tasks/v1_0/base_loader.py class BaseLoader (line 16) | class BaseLoader(ABC): method __init__ (line 19) | def __init__( method load_data (line 41) | def load_data(self, split: str = "test", sample_size: Optional[Any] = ... method _is_empty_value (line 111) | def _is_empty_value(value) -> bool: method _convert_messages_format (line 134) | def _convert_messages_format(messages: list) -> list: method _load_custom_chat_template (line 160) | def _load_custom_chat_template(self): method _get_data_file_path (line 180) | def _get_data_file_path(self, split: str) -> str: method _get_sample_data_file_path (line 199) | def _get_sample_data_file_path(self, split: str, sample_size: int) -> ... method _load_dataframe (line 217) | def _load_dataframe(self, split: str) -> pd.DataFrame: method _sample_data (line 233) | def _sample_data(self, df: pd.DataFrame, sample_size: int) -> pd.DataF... method _save_sample_data (line 241) | def _save_sample_data( method _load_sample_dataframe (line 257) | def _load_sample_dataframe(self, split: str, sample_size: int) -> Opti... method _process_dataframe (line 269) | def _process_dataframe(self, df: pd.DataFrame) -> Dict[str, Dict[str, ... method _make_metadata_serializable (line 348) | def _make_metadata_serializable( FILE: benchmarks/benchmark/tasks/v1_0/item_understand/evaluator.py class ItemUnderstandEvaluator (line 14) | class ItemUnderstandEvaluator(BaseEval): method required_metrics (line 18) | def required_metrics(self) -> List[str]: method _compute_metrics_from_scratch (line 23) | def _compute_metrics_from_scratch(self) -> Tuple[Dict[str, Any], Dict[... method _evaluate_wip (line 90) | def _evaluate_wip( method _save_debug_info (line 168) | def _save_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/item_understand/utils.py function extract_json_from_response (line 163) | def extract_json_from_response(response: str) -> Optional[Dict]: function extract_wips_single (line 178) | def extract_wips_single( function extract_wips_batch (line 209) | def extract_wips_batch( function match_wips_single (line 259) | def match_wips_single( function match_wips_batch (line 292) | def match_wips_batch( function get_wip_score_int (line 359) | def get_wip_score_int(wip: Optional[Dict]) -> int: function calculate_unweighted_metrics (line 366) | def calculate_unweighted_metrics(match_results: Dict[str, Dict], core_th... function calculate_importance_weighted_metrics (line 432) | def calculate_importance_weighted_metrics( function calculate_double_weighted_metrics (line 504) | def calculate_double_weighted_metrics( function save_wip_detailed_results (line 608) | def save_wip_detailed_results( function get_gt_cache_path (line 662) | def get_gt_cache_path(cache_dir: str, model_name: str) -> str: function load_wip_results_cache (line 667) | def load_wip_results_cache(cache_path: str) -> Optional[Dict[str, Any]]: function load_gt_wips_cache (line 706) | def load_gt_wips_cache(cache_path: str) -> Optional[Dict[str, List[Dict]]]: function save_gt_wips_cache (line 736) | def save_gt_wips_cache(gt_wips: Dict[str, List[Dict]], cache_path: str): function _load_or_extract_gt_wips (line 758) | def _load_or_extract_gt_wips( function extract_after_think (line 805) | def extract_after_think(text: str) -> str: function _load_or_extract_model_wips (line 811) | def _load_or_extract_model_wips( function _load_or_match_wips (line 849) | def _load_or_match_wips( function _compute_bertscore_incremental (line 892) | def _compute_bertscore_incremental( function evaluate_wip (line 958) | def evaluate_wip( FILE: benchmarks/benchmark/tasks/v1_0/label_pred/evaluator.py class LabelPredEvaluator (line 20) | class LabelPredEvaluator(BaseEval): method required_metrics (line 32) | def required_metrics(self) -> List[str]: method _compute_metrics_from_scratch (line 36) | def _compute_metrics_from_scratch(self) -> Tuple[Dict[str, Any], Dict[... method _save_debug_info (line 188) | def _save_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/label_pred/utils.py function extract_label_from_answer (line 14) | def extract_label_from_answer(answer: str) -> int: function extract_probability_from_logprobs (line 38) | def extract_probability_from_logprobs( function calculate_auc (line 158) | def calculate_auc( function get_debug_info (line 200) | def get_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/mfu_evaluator.py function compute_mfu (line 18) | def compute_mfu( function compute_mfu_from_generation_data (line 69) | def compute_mfu_from_generation_data(gen_data: Dict[str, Any]) -> Option... FILE: benchmarks/benchmark/tasks/v1_0/rec_reason/evaluator.py class RecoReasonEvaluator (line 15) | class RecoReasonEvaluator(BaseEval): method required_metrics (line 19) | def required_metrics(self) -> List[str]: method _compute_metrics_from_scratch (line 23) | def _compute_metrics_from_scratch(self) -> Tuple[Dict[str, Any], Dict[... method _evaluate_reasoning (line 91) | def _evaluate_reasoning( method _save_debug_info (line 157) | def _save_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/rec_reason/utils.py function extract_refined_reasoning (line 65) | def extract_refined_reasoning(text: str) -> str: function extract_after_think (line 96) | def extract_after_think(text: str) -> str: function extract_json_from_response (line 103) | def extract_json_from_response(response: str) -> Optional[Dict]: function evaluate_single (line 139) | def evaluate_single( function evaluate_batch (line 174) | def evaluate_batch( function calculate_metrics (line 229) | def calculate_metrics(eval_results: Dict[str, Dict]) -> Dict[str, Any]: function get_per_sample_metrics (line 264) | def get_per_sample_metrics(eval_results: Dict[str, Dict]) -> Dict[str, D... function get_cache_path (line 290) | def get_cache_path(save_dir: str, model_name: str) -> str: function load_eval_cache (line 295) | def load_eval_cache(cache_path: str) -> Optional[Dict[str, Dict]]: function save_eval_results (line 326) | def save_eval_results( function evaluate_reasoning (line 363) | def evaluate_reasoning( FILE: benchmarks/benchmark/tasks/v1_0/recommendation/evaluator.py class RecommendationEvaluator (line 17) | class RecommendationEvaluator(BaseEval): method required_metrics (line 33) | def required_metrics(self) -> List[str]: method _select_generations_by_strategy (line 50) | def _select_generations_by_strategy( method _evaluate_single_mode (line 105) | def _evaluate_single_mode( method _calculate_metrics_from_counts (line 286) | def _calculate_metrics_from_counts( method _compute_metrics_from_scratch (line 316) | def _compute_metrics_from_scratch(self) -> Tuple[Dict[str, Any], Dict[... method _save_debug_info (line 429) | def _save_debug_info(self, debug_info: Dict[str, Any], metrics: Dict[s... FILE: benchmarks/benchmark/tasks/v1_0/recommendation/utils.py function extract_ids_from_answer (line 10) | def extract_ids_from_answer(answer: str) -> list[str]: function extract_first_id_from_answer (line 29) | def extract_first_id_from_answer(answer: str) -> str: function extract_id_from_generation (line 51) | def extract_id_from_generation(generation: str) -> str: function compute_pass_at_k (line 94) | def compute_pass_at_k( function compute_position1_pass_at_k (line 128) | def compute_position1_pass_at_k( function compute_recall_at_k (line 163) | def compute_recall_at_k( function get_unique_generations (line 210) | def get_unique_generations( function get_debug_info (line 297) | def get_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/recommendation/utils_by_pid.py function load_pid_mapping (line 21) | def load_pid_mapping(mapping_path: str) -> Dict[int, List[Dict[str, int]]]: function encode_sid (line 47) | def encode_sid(c1: int, c2: int, c3: int) -> int: function extract_sid_codes_from_text (line 60) | def extract_sid_codes_from_text(text: str) -> Optional[Tuple[int, int, i... function _get_id_from_info (line 81) | def _get_id_from_info(info: Dict[str, int]) -> int: function apply_sid_to_pid_strategy (line 94) | def apply_sid_to_pid_strategy(pid_info_list: List[Dict[str, int]], strat... function extract_ids_from_answer (line 132) | def extract_ids_from_answer(answer: list[int]) -> list[int]: function extract_first_id_from_answer (line 149) | def extract_first_id_from_answer(answer: List[int]) -> int: function extract_id_from_generation (line 161) | def extract_id_from_generation( function compute_pass_at_k (line 205) | def compute_pass_at_k( function compute_position1_pass_at_k (line 239) | def compute_position1_pass_at_k( function compute_recall_at_k (line 274) | def compute_recall_at_k( function get_unique_generations (line 319) | def get_unique_generations( function get_debug_info (line 399) | def get_debug_info( FILE: benchmarks/benchmark/tasks/v1_0/registry.py class TaskRegistration (line 38) | class TaskRegistration: function get_loader (line 105) | def get_loader(task_name: str, data_dir: str, tokenizer: Optional[Any] =... function get_evaluator (line 142) | def get_evaluator(task_name: str): function get_task_config (line 167) | def get_task_config(task_name: str) -> Dict[str, Any]: function get_all_tasks (line 190) | def get_all_tasks() -> list: function get_tasks_by_category (line 200) | def get_tasks_by_category(category: str) -> list: FILE: benchmarks/scripts/eval_dev_results.py function get_args (line 6) | def get_args(): function main (line 33) | def main(): FILE: benchmarks/scripts/ray-vllm/evaluate.py function main (line 17) | def main(): FILE: benchmarks/scripts/ray-vllm/utils/arguments.py class ModelConfig (line 6) | class ModelConfig: class InfrastructureConfig (line 34) | class InfrastructureConfig: class InferenceConfig (line 66) | class InferenceConfig: class GenerationConfig (line 85) | class GenerationConfig: class PromptConfig (line 121) | class PromptConfig: class BenchmarkConfig (line 131) | class BenchmarkConfig: FILE: benchmarks/scripts/ray-vllm/utils/generator.py class VllmWorker (line 14) | class VllmWorker: method __init__ (line 24) | def __init__( method get_model_parameters (line 85) | def get_model_parameters(self) -> Optional[float]: method generate_batch (line 106) | def generate_batch( method extract_token_logprobs_batch (line 270) | def extract_token_logprobs_batch( class RayVllmGenerator (line 392) | class RayVllmGenerator(RayMixin, VllmMixin, Generator): method __init__ (line 397) | def __init__( method _count_model_parameters (line 611) | def _count_model_parameters(self) -> Optional[float]: method _generate_standard (line 646) | def _generate_standard( method extract_token_logprobs (line 766) | def extract_token_logprobs( FILE: data/onerec_data/pretrain/item_understand.py function pid_to_sid (line 32) | def pid_to_sid(pid, pid2sid: dict) -> str: function build_segments (line 40) | def build_segments(sid: str, caption: str) -> str: function process_row (line 48) | def process_row(row, pid2sid: dict) -> dict: function main (line 73) | def main(): FILE: data/onerec_data/pretrain/user_profile.py function process_row (line 17) | def process_row(row) -> dict: function main (line 37) | def main(): FILE: data/onerec_data/pretrain/video_rec.py function pids_to_sids (line 23) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_segments (line 36) | def build_segments(hist_sids: str, target_sids: str) -> str: function process_row (line 43) | def process_row(row, pid2sid: dict) -> dict: function main (line 70) | def main(): FILE: data/onerec_data/sft/ad_rec.py function pids_to_sids (line 59) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_messages (line 72) | def build_messages(user_content: str, task_prompt: str, answer: str) -> ... function process_row (line 84) | def process_row(row, pid2sid: dict) -> dict: function main (line 139) | def main(): FILE: data/onerec_data/sft/interactive_rec.py function pids_to_sids (line 52) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_messages (line 65) | def build_messages(user_profile: str, keyword: str, answer: str) -> str: function process_row (line 78) | def process_row(row, pid2sid: dict) -> list: function main (line 125) | def main(): FILE: data/onerec_data/sft/item_understand.py function pid_to_sid (line 58) | def pid_to_sid(pid, pid2sid: dict) -> str: function build_messages (line 66) | def build_messages(sid: str, caption: str) -> str: function process_row (line 79) | def process_row(row, pid2sid: dict) -> dict: function main (line 104) | def main(): FILE: data/onerec_data/sft/label_cond_rec.py function pids_to_sids (line 54) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_messages (line 67) | def build_messages(user_content: str, task_prompt: str, answer: str) -> ... function process_row (line 79) | def process_row(row, pid2sid: dict) -> dict: function main (line 163) | def main(): FILE: data/onerec_data/sft/label_pred.py function pids_to_sids (line 59) | def pids_to_sids(pids, pid2sid: dict) -> str: function pid_to_sid (line 72) | def pid_to_sid(pid, pid2sid: dict) -> str: function build_messages (line 80) | def build_messages(user_content: str, question: str, answer: str) -> str: function process_row (line 92) | def process_row(row, pid2sid: dict) -> list: function main (line 182) | def main(): FILE: data/onerec_data/sft/product_rec.py function pids_to_sids (line 60) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_messages (line 73) | def build_messages(user_content: str, task_prompt: str, answer: str) -> ... function process_row (line 85) | def process_row(row, video_pid2sid: dict, product_pid2sid: dict) -> dict: function main (line 140) | def main(): FILE: data/onerec_data/sft/rec_reason.py function build_messages (line 33) | def build_messages(user_prompt: str, answer: str) -> str: function is_valid_str (line 42) | def is_valid_str(val) -> bool: function process_row (line 53) | def process_row(row) -> dict: function main (line 91) | def main(): FILE: data/onerec_data/sft/video_rec.py function pids_to_sids (line 41) | def pids_to_sids(pids, pid2sid: dict) -> str: function build_messages (line 54) | def build_messages(query: str, answer: str) -> str: function process_row (line 67) | def process_row(row, pid2sid: dict) -> dict: function main (line 94) | def main(): FILE: data/scripts/parquet_unicode_fix.py function decode_unicode_json (line 27) | def decode_unicode_json(json_str: Optional[Union[str, bytes]]) -> Option... function find_parquet_files (line 67) | def find_parquet_files(directory: str, recursive: bool = True) -> List[s... function get_output_path (line 93) | def get_output_path(input_path: str, output_base: str, input_base: Optio... function process_parquet_file (line 128) | def process_parquet_file( function process_directory (line 185) | def process_directory(input_dir: str, output_dir: str, engine: str = 'py... function main (line 241) | def main(): FILE: data/scripts/sample_data.py function find_parquet_files (line 27) | def find_parquet_files(directory: str, recursive: bool = True) -> List[s... function collect_parquet_files (line 50) | def collect_parquet_files(input_paths: List[str], recursive: bool = True... function load_all_parquet_files (line 83) | def load_all_parquet_files(file_paths: List[str], engine: str = 'pyarrow... function sample_dataframe (line 121) | def sample_dataframe(df: pd.DataFrame, num_samples: int, seed: int = Non... function main (line 160) | def main(): FILE: data/scripts/split_data.py function find_parquet_files (line 26) | def find_parquet_files(directory: str, recursive: bool = True) -> List[s... function load_all_parquet_files (line 49) | def load_all_parquet_files(file_paths: List[str], engine: str = 'pyarrow... function split_dataframe (line 87) | def split_dataframe(df: pd.DataFrame, max_rows: int, output_dir: str, pr... function main (line 147) | def main(): FILE: data/scripts/train_test_split.py function load_all_parquet_files (line 26) | def load_all_parquet_files(file_paths: List[str], engine: str = 'pyarrow... function split_train_test (line 64) | def split_train_test( function shuffle_dataframe (line 113) | def shuffle_dataframe(df: pd.DataFrame, seed: int = None) -> pd.DataFrame: function main (line 133) | def main(): FILE: pretrain/onerec_llm/data/dataloaders.py function get_chat_completion_parquet_dataloader (line 5) | def get_chat_completion_parquet_dataloader(sources: str, function get_dataloader (line 43) | def get_dataloader(name: str, **kwargs): FILE: pretrain/onerec_llm/data/local_shuffle_buffer.py class LocalShuffleBuffer (line 19) | class LocalShuffleBuffer: method __init__ (line 35) | def __init__(self, buffer_size: int = 2048, random_fetch: float = 0.01... method _calc_sample_hash (line 57) | def _calc_sample_hash(self, obj: dict, buffer_epoch: int = None) -> int: method add (line 85) | def add(self, obj: dict, fn: str = None, epoch: int = None) -> bool: method get (line 136) | def get(self) -> dict: method __len__ (line 154) | def __len__(self) -> int: FILE: pretrain/onerec_llm/data/qwen3_dataset.py function set_kwargs (line 36) | def set_kwargs(self, kwargs, **_kwargs): class Qwen3ChatCompletionDataset (line 42) | class Qwen3ChatCompletionDataset(IterableDataset): method __init__ (line 43) | def __init__(self, **kwargs): method _build_source_dataset (line 92) | def _build_source_dataset(self, sources): method _convert_messages (line 141) | def _convert_messages(self, messages): method _get_assistant_mask (line 203) | def _get_assistant_mask(self, batch_input_ids: torch.Tensor, method _get_rope_index_qwen3 (line 257) | def _get_rope_index_qwen3( method _process_completion (line 265) | def _process_completion(self, sample: Dict[str, Any]) -> Dict[str, tor... method _process_chat (line 321) | def _process_chat(self, sample: Dict[str, Any]) -> Dict[str, torch.Ten... method _process (line 379) | def _process(self, sample, source_name=None): method _cut_sample (line 398) | def _cut_sample(self, inputs, packable_length): method _append_sample_packing (line 406) | def _append_sample_packing(self, method _packing (line 436) | def _packing(self, buffer: List[Dict[str, torch.Tensor]]): method __iter__ (line 490) | def __iter__(self): class Qwen3NaiveParquetDataset (line 559) | class Qwen3NaiveParquetDataset(IterableDataset): method __init__ (line 562) | def __init__(self, data_files, num_workers, **kwargs): method _parser (line 574) | def _parser(self, raw_row_data, file_url): method __iter__local_shuffle (line 618) | def __iter__local_shuffle(self): method __iter__ (line 670) | def __iter__(self,): method state_dict (line 675) | def state_dict(self): method load_state_dict (line 684) | def load_state_dict(self, state_dict): class Qwen3ChatCompletionParquetDataset (line 698) | class Qwen3ChatCompletionParquetDataset(Qwen3ChatCompletionDataset): method __init__ (line 699) | def __init__(self, sources, num_workers, shuffle_seed=1024, num_epochs... method _build_source_dataset (line 709) | def _build_source_dataset(self, sources): method state_dict (line 739) | def state_dict(self): method load_state_dict (line 744) | def load_state_dict(self, state_dict): FILE: pretrain/onerec_llm/losses/ce.py class CrossEntropyLoss (line 10) | class CrossEntropyLoss(nn.Module): method __init__ (line 16) | def __init__(self, method forward (line 27) | def forward(self, logits: torch.Tensor, labels: torch.Tensor): class ChunkedLossComputer (line 72) | class ChunkedLossComputer: method __init__ (line 82) | def __init__(self, lm_head: nn.Module, loss_fn: nn.Module, minibatch_s... method forward_and_backward (line 102) | def forward_and_backward(self, input: torch.Tensor, labels: torch.Tens... FILE: pretrain/onerec_llm/models/qwen3/configuration_qwen3.py class Qwen3Config (line 25) | class Qwen3Config(PretrainedConfig): method __init__ (line 152) | def __init__( FILE: pretrain/onerec_llm/models/qwen3/modeling_qwen3.py class Qwen3RMSNorm (line 55) | class Qwen3RMSNorm(nn.Module): method __init__ (line 56) | def __init__(self, hidden_size, eps=1e-6): method forward (line 64) | def forward(self, hidden_states): method extra_repr (line 71) | def extra_repr(self): class Qwen3MLP (line 75) | class Qwen3MLP(nn.Module): method __init__ (line 76) | def __init__(self, config): method forward (line 86) | def forward(self, x): function rotate_half (line 91) | def rotate_half(x): function apply_rotary_pos_emb (line 98) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... function repeat_kv (line 125) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function eager_attention_forward (line 137) | def eager_attention_forward( class Qwen3Attention (line 163) | class Qwen3Attention(nn.Module): method __init__ (line 166) | def __init__(self, config: Qwen3Config, layer_idx: int): method forward (line 198) | def forward( class Qwen3DecoderLayer (line 253) | class Qwen3DecoderLayer(nn.Module): method __init__ (line 254) | def __init__(self, config: Qwen3Config, layer_idx: int): method forward (line 269) | def forward( class Qwen3RotaryEmbedding (line 312) | class Qwen3RotaryEmbedding(nn.Module): method __init__ (line 313) | def __init__(self, config: Qwen3Config, device=None): method forward (line 332) | def forward(self, x, position_ids): class Qwen3PreTrainedModel (line 367) | class Qwen3PreTrainedModel(PreTrainedModel): method _init_weights (line 381) | def _init_weights(self, module): class Qwen3Model (line 464) | class Qwen3Model(Qwen3PreTrainedModel): method __init__ (line 472) | def __init__(self, config: Qwen3Config): method get_input_embeddings (line 488) | def get_input_embeddings(self): method set_input_embeddings (line 491) | def set_input_embeddings(self, value): method forward (line 496) | def forward( method _update_causal_mask (line 613) | def _update_causal_mask( method _prepare_4d_causal_attention_mask_with_cache_position (line 697) | def _prepare_4d_causal_attention_mask_with_cache_position( class KwargsForCausalLM (line 766) | class KwargsForCausalLM(FlashAttentionKwargs, LossKwargs): ... class Qwen3ForCausalLM (line 769) | class Qwen3ForCausalLM(Qwen3PreTrainedModel, GenerationMixin): method __init__ (line 776) | def __init__(self, config): method get_input_embeddings (line 785) | def get_input_embeddings(self): method set_input_embeddings (line 788) | def set_input_embeddings(self, value): method get_output_embeddings (line 791) | def get_output_embeddings(self): method set_output_embeddings (line 794) | def set_output_embeddings(self, new_embeddings): method set_decoder (line 797) | def set_decoder(self, decoder): method get_decoder (line 800) | def get_decoder(self): method forward (line 807) | def forward( class Qwen3ForSequenceClassification (line 909) | class Qwen3ForSequenceClassification(Qwen3PreTrainedModel): method __init__ (line 910) | def __init__(self, config): method get_input_embeddings (line 919) | def get_input_embeddings(self): method set_input_embeddings (line 922) | def set_input_embeddings(self, value): method forward (line 927) | def forward( class Qwen3ForTokenClassification (line 1002) | class Qwen3ForTokenClassification(Qwen3PreTrainedModel): method __init__ (line 1003) | def __init__(self, config): method get_input_embeddings (line 1019) | def get_input_embeddings(self): method set_input_embeddings (line 1022) | def set_input_embeddings(self, value): method forward (line 1032) | def forward( class Qwen3ForQuestionAnswering (line 1084) | class Qwen3ForQuestionAnswering(Qwen3PreTrainedModel): method __init__ (line 1087) | def __init__(self, config): method get_input_embeddings (line 1095) | def get_input_embeddings(self): method set_input_embeddings (line 1098) | def set_input_embeddings(self, value): method forward (line 1103) | def forward( FILE: pretrain/onerec_llm/models/qwen3/modular_qwen3.py class Qwen3RMSNorm (line 51) | class Qwen3RMSNorm(LlamaRMSNorm): class Qwen3MLP (line 55) | class Qwen3MLP(GemmaMLP): class Qwen3Attention (line 59) | class Qwen3Attention(LlamaAttention): method __init__ (line 60) | def __init__(self, config: Qwen3Config, layer_idx: int): method forward (line 72) | def forward( class Qwen3DecoderLayer (line 123) | class Qwen3DecoderLayer(LlamaDecoderLayer): method __init__ (line 124) | def __init__(self, config: Qwen3Config, layer_idx: int): class Qwen3Model (line 137) | class Qwen3Model(MistralModel): # mistral model creates sliding window class KwargsForCausalLM (line 141) | class KwargsForCausalLM(FlashAttentionKwargs, LossKwargs): ... class Qwen3ForCausalLM (line 144) | class Qwen3ForCausalLM(LlamaForCausalLM): method forward (line 145) | def forward( class Qwen3ForSequenceClassification (line 183) | class Qwen3ForSequenceClassification(LlamaForSequenceClassification): class Qwen3ForTokenClassification (line 187) | class Qwen3ForTokenClassification(LlamaForTokenClassification): class Qwen3ForQuestionAnswering (line 191) | class Qwen3ForQuestionAnswering(LlamaForQuestionAnswering): FILE: pretrain/onerec_llm/training/activations.py function set_activation_checkpointing (line 8) | def set_activation_checkpointing( FILE: pretrain/onerec_llm/training/checkpoint.py function load_safetensors (line 32) | def load_safetensors(path: Union[Path, str]) -> Dict[str, torch.Tensor]: function safe_torch_load (line 48) | def safe_torch_load( function load_hf_checkpoint (line 83) | def load_hf_checkpoint( function load_checkpoint_to_state_dict (line 141) | def load_checkpoint_to_state_dict(checkpoint_path: Union[str, os.PathLik... class CheckpointerInterface (line 232) | class CheckpointerInterface(Protocol): method load_checkpoint (line 235) | def load_checkpoint(self, **kwargs) -> Dict[str, Any]: method save_checkpoint (line 239) | def save_checkpoint(self, state_dict: Dict[str, Any], **kwargs) -> None: class DistributedCheckpointer (line 243) | class DistributedCheckpointer(CheckpointerInterface): method __init__ (line 253) | def __init__( method get_latest_checkpoint (line 262) | def get_latest_checkpoint(self, checkpoint_dir: str) -> Optional[str]: method load_checkpoint (line 291) | def load_checkpoint( method save_checkpoint (line 337) | def save_checkpoint( class AppState (line 432) | class AppState(Stateful): method __init__ (line 442) | def __init__(self, model, optimizer=None, call_back=None): method set_call_back (line 446) | def set_call_back(self, cb): method state_dict (line 450) | def state_dict(self): method load_state_dict (line 461) | def load_state_dict(self, state_dict): FILE: pretrain/onerec_llm/training/common.py function set_default_dtype (line 10) | def set_default_dtype(dtype: torch.dtype) -> Generator[None, None, None]: FILE: pretrain/onerec_llm/training/distributed.py function shard_model (line 15) | def shard_model( function load_from_full_model_state_dict (line 65) | def load_from_full_model_state_dict( FILE: pretrain/onerec_llm/training/gradients.py function clip_grad_by_value (line 15) | def clip_grad_by_value( function clip_grad_norm (line 29) | def clip_grad_norm( function compute_fsdp_zero2_grad_norm (line 43) | def compute_fsdp_zero2_grad_norm( class EmbeddingGradientMasker (line 76) | class EmbeddingGradientMasker: method __init__ (line 91) | def __init__(self, model, config, start_optimize_embedding_index): method _find_embedding_parameters (line 102) | def _find_embedding_parameters(self): method _save_initial_weights (line 108) | def _save_initial_weights(self): method save_frozen_params (line 143) | def save_frozen_params(self): method apply_gradient_mask (line 147) | def apply_gradient_mask(self, optimizer=None): method restore_frozen_params (line 151) | def restore_frozen_params(self): FILE: pretrain/onerec_llm/training/lr_schedulers.py function _get_cosine_schedule_with_warmup_lr_lambda (line 11) | def _get_cosine_schedule_with_warmup_lr_lambda( function get_cosine_scheduler (line 47) | def get_cosine_scheduler( function get_scheduler (line 91) | def get_scheduler( FILE: pretrain/onerec_llm/utils/common.py function print_rank_n (line 20) | def print_rank_n(*msg, rank=0): function print_rank_0 (line 28) | def print_rank_0(*msg): function get_optimizer_grouped_parameters (line 31) | def get_optimizer_grouped_parameters(model, function to_device (line 71) | def to_device(batch, device, non_blocking=True): function to_cuda (line 77) | def to_cuda(batch, non_blocking=True): function set_random_seed (line 81) | def set_random_seed(seed): function dist_reduce_dict (line 90) | def dist_reduce_dict(local_dict, group=None): class Timer (line 117) | class Timer: method __init__ (line 118) | def __init__(self, desc: str = ""): method __enter__ (line 121) | def __enter__(self): method __exit__ (line 126) | def __exit__(self, exc_type, exc_value, traceback): FILE: pretrain/onerec_llm/utils/data_utils.py function calculate_text_hash (line 17) | def calculate_text_hash(text): function shell_hdfs_ls (line 31) | def shell_hdfs_ls(source_dir): class FakeParquetFileFromFastParquetFile (line 55) | class FakeParquetFileFromFastParquetFile: method __init__ (line 58) | def __init__(self, fast_parquet_file): method read_row_group (line 68) | def read_row_group(self, i): function load_parquet_file (line 73) | def load_parquet_file( function _load_parquet_from_hdfs (line 125) | def _load_parquet_from_hdfs( function _load_parquet_from_path (line 193) | def _load_parquet_from_path(file_path: str, parquet_backend: str) -> pq.... function _clean_cache_if_needed (line 201) | def _clean_cache_if_needed(cache_dir: str, max_cache_files: int): function _download_from_hdfs (line 227) | def _download_from_hdfs(hdfs_path: str, local_path: str, hadoop_cmd: str): FILE: pretrain/onerec_llm/utils/distributed.py function get_world_size_and_rank (line 15) | def get_world_size_and_rank() -> Tuple[int, int]: function get_rank (line 34) | def get_rank() -> int: function get_world_size (line 44) | def get_world_size() -> int: function is_distributed (line 54) | def is_distributed() -> bool: FILE: pretrain/onerec_llm/utils/ds_utils.py function convert_dataclass_to_dict (line 12) | def convert_dataclass_to_dict(obj: Any) -> Any: function tensor_statistics (line 19) | def tensor_statistics(tensor: torch.Tensor, n: int = -1, **kwargs) -> Tu... function print_input_info (line 105) | def print_input_info( function format_dict_or_list (line 230) | def format_dict_or_list(obj: Any, indent_level: int = 0, indent_size: in... FILE: pretrain/onerec_llm/utils/mfu_stats.py function _sum_if_list (line 20) | def _sum_if_list(x: Union[int, List[int]]) -> int: function _get_gpu_model (line 26) | def _get_gpu_model() -> str: function _is_h800 (line 99) | def _is_h800() -> bool: function _get_gpu_flops (line 106) | def _get_gpu_flops() -> float: function _calculate_decoder_layer_flops (line 115) | def _calculate_decoder_layer_flops( function _calculate_decoder_layers_flops (line 208) | def _calculate_decoder_layers_flops( function _calculate_llm_flops (line 269) | def _calculate_llm_flops(llm_params: easydict.EasyDict) -> Dict: function _extract_model_params (line 306) | def _extract_model_params(config_path: str) -> easydict.EasyDict: function _calc_mfu (line 342) | def _calc_mfu( class MFUStats (line 394) | class MFUStats: method __init__ (line 403) | def __init__(self, args): method set (line 409) | def set(self, num_tokens: int, num_samples: int) -> None: method mfu (line 419) | def mfu(self, secs: float, global_step: int) -> Dict[str, float]: FILE: pretrain/onerec_llm/utils/time_tracker.py class TimeTracker (line 8) | class TimeTracker: method __init__ (line 28) | def __init__( method tick (line 44) | def tick(self, name: str) -> None: method stat (line 82) | def stat(self) -> Dict[str, float]: FILE: pretrain/onerec_llm/utils/worker_utils.py function get_worker_info (line 8) | def get_worker_info(): function pytorch_worker_info (line 36) | def pytorch_worker_info(group=None): FILE: pretrain/recipes/train_qwen3.py class TrainingMetrics (line 83) | class TrainingMetrics: method __init__ (line 91) | def __init__(self): method reset_period_accumulators (line 100) | def reset_period_accumulators(self): method update (line 115) | def update(self, num_tokens, num_samples, num_valid_tokens): class TensorBoardLogger (line 128) | class TensorBoardLogger: method __init__ (line 131) | def __init__(self, tb_writer: Optional[SummaryWriter]): method _write_async (line 144) | def _write_async(self, tb_writer, metrics_queue): method log (line 202) | def log(self, global_step, log_dict, ticker_stats, ds_loss, ds_tokens,... function get_argument_parser (line 210) | def get_argument_parser() -> argparse.ArgumentParser: class StateDictConverter (line 297) | class StateDictConverter: method convert (line 300) | def convert(self, state_dict: Dict[str, torch.Tensor]) -> Dict[str, to... method revert (line 304) | def revert(self, state_dict: Dict[str, torch.Tensor]) -> Dict[str, tor... function _init_profiler (line 309) | def _init_profiler(output_dir: str, enable: bool = False) -> Optional[to... function save_model_checkpoint (line 343) | def save_model_checkpoint( function initialize_distributed (line 421) | def initialize_distributed() -> Tuple[int, int, int]: function initialize_model (line 441) | def initialize_model( function load_model_checkpoint (line 552) | def load_model_checkpoint( function load_optimizer_checkpoint (line 579) | def load_optimizer_checkpoint( function load_dataloader_checkpoint (line 603) | def load_dataloader_checkpoint(args) -> Optional[Dict]: function load_checkpoint (line 629) | def load_checkpoint( function compute_forward_backward (line 683) | def compute_forward_backward( function compute_metrics (line 760) | def compute_metrics( function log_training_step (line 861) | def log_training_step( function train (line 1014) | def train(): FILE: pretrain/tests/test_qwen3_dataset_file_distribution.py class TestFileDistribution (line 16) | class TestFileDistribution(unittest.TestCase): method setUp (line 19) | def setUp(self): method _get_file_distribution (line 27) | def _get_file_distribution(self, rank, world_size, worker, num_workers): method test_file_distribution_no_overlap (line 48) | def test_file_distribution_no_overlap(self): method test_file_distribution_completeness (line 77) | def test_file_distribution_completeness(self): method test_file_distribution_different_configs (line 96) | def test_file_distribution_different_configs(self): method test_file_distribution_balance (line 135) | def test_file_distribution_balance(self): method test_file_distribution_with_epochs (line 163) | def test_file_distribution_with_epochs(self): class TestFileDistributionLogic (line 197) | class TestFileDistributionLogic(unittest.TestCase): method setUp (line 200) | def setUp(self): method test_distribution_algorithm (line 206) | def test_distribution_algorithm(self): function run_distribution_test_manual (line 238) | def run_distribution_test_manual(): FILE: pretrain/tools/model_converter/convert_checkpoint_to_hf.py function _get_torch_dtype (line 53) | def _get_torch_dtype(dtype_str: str) -> torch.dtype: function _extract_state_dict_from_checkpoint (line 75) | def _extract_state_dict_from_checkpoint(checkpoint: Dict, model_only: bo... function _convert_state_dict_to_shards (line 104) | def _convert_state_dict_to_shards( function pth_to_hf_format (line 199) | def pth_to_hf_format( function dcp_to_hf_format (line 249) | def dcp_to_hf_format( function copy_hf_config_files (line 309) | def copy_hf_config_files( function get_argument_parser (line 364) | def get_argument_parser() -> argparse.ArgumentParser: function main (line 427) | def main() -> None: FILE: pretrain/tools/model_converter/expand_qwen3_vocab.py function _align_vocab_size (line 28) | def _align_vocab_size(vocab_size: int, alignment: int = 256) -> int: function _fix_chat_template (line 41) | def _fix_chat_template(reco_model_dir: str, hf_model_dir: str) -> None: function _test_expanded_vocab (line 76) | def _test_expanded_vocab(model, tokenizer, new_tokens: List[str]) -> None: function expand_qwen3_vocab_for_pretraining (line 111) | def expand_qwen3_vocab_for_pretraining( function generate_itemic_tokens (line 199) | def generate_itemic_tokens(itemic_layer_n: int, vocab_size_per_layer: in... function load_tokens_from_file (line 251) | def load_tokens_from_file(tokens_file: str) -> List[str]: function main (line 280) | def main(): FILE: pretrain/tools/model_test/test_hf_model.py function load_model (line 27) | def load_model( function print_model_info (line 61) | def print_model_info(model) -> None: function generate_text (line 81) | def generate_text( function generate_chat (line 135) | def generate_chat( function load_test_cases_from_file (line 210) | def load_test_cases_from_file(file_path: Union[str, Path]) -> tuple: function get_default_test_cases (line 246) | def get_default_test_cases() -> tuple: function main (line 279) | def main(): FILE: tokenizer/infer_res_kmeans.py function load_embeddings (line 8) | def load_embeddings(emb_path): function main (line 16) | def main(): FILE: tokenizer/res_kmeans.py class ResKmeans (line 4) | class ResKmeans(nn.Module): method __init__ (line 6) | def __init__(self, n_layers, codebook_size, dim, extra_kmeans_config=N... method calc_loss (line 17) | def calc_loss(self, x, out, epsilon=1e-4): method train_kmeans (line 22) | def train_kmeans(self, inputs, verbose=True): method encode (line 40) | def encode(self, x, n_layers=None): method decode (line 56) | def decode(self, code): FILE: tokenizer/train_res_kmeans.py function read_train_data (line 11) | def read_train_data(path, emb_dim): function main (line 40) | def main(): FILE: verl_distillation/docs/_static/js/resizable-sidebar.js function setupNavigationFix (line 136) | function setupNavigationFix() { FILE: verl_distillation/examples/data_preprocess/aime2024_multiturn_w_tool.py function make_map_fn (line 49) | def make_map_fn(split): FILE: verl_distillation/examples/data_preprocess/dapo_multiturn_w_tool.py function make_map_fn (line 49) | def make_map_fn(split): FILE: verl_distillation/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: verl_distillation/examples/data_preprocess/geo3k.py function make_map_fn (line 58) | def make_map_fn(split): FILE: verl_distillation/examples/data_preprocess/geo3k_multiturn_w_tool.py function make_map_fn (line 60) | def make_map_fn(split): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/examples/data_preprocess/hellaswag.py function preprocess (line 28) | def preprocess(text): function make_map_fn (line 62) | def make_map_fn(split): FILE: verl_distillation/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: verl_distillation/examples/data_preprocess/multiturn.py function main (line 24) | def main(): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/examples/split_placement/main_ppo_split.py function _select_rm_score_fn (line 29) | def _select_rm_score_fn(data_source): class RewardManager (line 38) | class RewardManager: method __init__ (line 39) | def __init__(self, tokenizer, num_examine) -> None: method __call__ (line 43) | def __call__(self, data: DataProto, return_dict: bool = False): function main (line 95) | def main(config): function main_task (line 110) | def main_task(config): FILE: verl_distillation/examples/split_placement/split_monkey_patch.py function fit (line 38) | def fit(self): FILE: verl_distillation/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: verl_distillation/recipe/char_count/create_dataset.py function generate_random_char (line 30) | def generate_random_char(): function create_prompt_response (line 34) | def create_prompt_response(min_length=3, max_length=5): FILE: verl_distillation/recipe/char_count/reward_function.py function char_count_reward_function (line 22) | def char_count_reward_function(data_source, solution_str, ground_truth, ... FILE: verl_distillation/recipe/collabllm/collabllm_agent_loop.py class CollabLLMAgentLoop (line 32) | class CollabLLMAgentLoop(ToolAgentLoop): method run (line 34) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... method run_agent_data_loop (line 117) | async def run_agent_data_loop(self, agent_data: AgentData, sampling_pa... FILE: verl_distillation/recipe/collabllm/collabllm_interation.py class CollabLLMInteraction (line 82) | class CollabLLMInteraction(BaseInteraction): method __init__ (line 91) | def __init__(self, config: dict): method start_interaction (line 107) | async def start_interaction( method generate_response (line 122) | async def generate_response( method finalize_interaction (line 190) | async def finalize_interaction(self, instance_id: str, **kwargs) -> None: method _parse_messages (line 193) | def _parse_messages(self, messages, strip_sys_prompt=True): function extract_json (line 207) | def extract_json(s): FILE: verl_distillation/recipe/collabllm/metrics/accuracy.py function compute_score (line 53) | async def compute_score(data_source, messages, ground_truth, extra_info,... FILE: verl_distillation/recipe/collabllm/metrics/bleu_score.py function compute_score (line 67) | async def compute_score(data_source, messages, ground_truth, extra_info,... FILE: verl_distillation/recipe/collabllm/metrics/interactivity.py function compute_score (line 61) | async def compute_score(data_source, messages, ground_truth, extra_info,... FILE: verl_distillation/recipe/collabllm/metrics/pass_rate.py function compute_score (line 73) | async def compute_score(data_source, messages, ground_truth, extra_info,... FILE: verl_distillation/recipe/collabllm/metrics/token_amount.py function compute_score (line 17) | def compute_score(data_source, messages, ground_truth, extra_info, **kwa... FILE: verl_distillation/recipe/collabllm/process_dataset.py function collapse_example (line 83) | def collapse_example(example: dict[str, Any]) -> dict[str, Any]: function save_parquet (line 125) | def save_parquet(ds_split: Dataset, filename: str, out_dir: str) -> None: function maybe_copy_to_hdfs (line 132) | def maybe_copy_to_hdfs(local_dir: str, hdfs_dir: Optional[str]) -> None: function main (line 146) | def main(): FILE: verl_distillation/recipe/collabllm/reward_function.py function conversation_level_reward_func (line 34) | async def conversation_level_reward_func( class CollabLLMRewardManager (line 108) | class CollabLLMRewardManager(AbstractRewardManager): method __init__ (line 113) | def __init__( method __call__ (line 134) | def __call__(self, data: DataProto, return_dict: bool = False) -> torc... method _compute_rewards_async (line 149) | async def _compute_rewards_async(self, data: DataProto, return_dict: b... FILE: verl_distillation/recipe/collabllm/utils.py function parse_messages (line 23) | def parse_messages(messages, strip_sys_prompt=True): function strip_system_prompt (line 42) | def strip_system_prompt(messages): function extract_json (line 53) | def extract_json(s): function remove_think_block (line 222) | def remove_think_block(msg: dict): function is_valid_messages (line 231) | def is_valid_messages(msg: dict) -> bool: FILE: verl_distillation/recipe/dapo/dapo_ray_trainer.py class RayDAPOTrainer (line 45) | class RayDAPOTrainer(RayPPOTrainer): method compute_kl_related_metrics (line 50) | def compute_kl_related_metrics(self, batch: DataProto, metrics: dict, ... method fit (line 76) | def fit(self): FILE: verl_distillation/recipe/dapo/main_dapo.py function main (line 32) | def main(config): function run_ppo (line 36) | def run_ppo(config) -> None: class TaskRunner (line 69) | class TaskRunner: method run (line 70) | def run(self, config): FILE: verl_distillation/recipe/deepeyes/deepeyes.py class CustomRLHFDataset (line 52) | class CustomRLHFDataset(RLHFDataset): method __getitem__ (line 53) | def __getitem__(self, item): function compute_score (line 182) | def compute_score(data_source: str, solution_str: str, ground_truth: str... FILE: verl_distillation/recipe/entropy/entropy_ray_trainer.py class RayEntropyTrainer (line 42) | class RayEntropyTrainer(RayPPOTrainer): method compute_kl_related_metrics (line 47) | def compute_kl_related_metrics(self, batch: DataProto, timing_raw: dict): method fit (line 66) | def fit(self): FILE: verl_distillation/recipe/entropy/main_entropy.py function main (line 27) | def main(config): function run_ppo (line 31) | def run_ppo(config) -> None: function merge_dict (line 52) | def merge_dict(a: dict, b: dict) -> dict: class TaskRunner (line 68) | class TaskRunner: method run (line 69) | def run(self, config): function create_rl_dataset (line 193) | def create_rl_dataset(data_paths, data_config, tokenizer, processor, max... function create_rl_sampler (line 232) | def create_rl_sampler(data_config, dataset): FILE: verl_distillation/recipe/entropy/reward.py function load_reward_manager (line 26) | def load_reward_manager(config, tokenizer, num_examine, **reward_kwargs): function compute_reward_async (line 80) | def compute_reward_async(data: DataProto, config, tokenizer): FILE: verl_distillation/recipe/entropy/reward_score/__init__.py function _default_compute_score (line 21) | def _default_compute_score( FILE: verl_distillation/recipe/entropy/reward_score/entropy_math/__init__.py function timeout_ours (line 40) | def timeout_ours(timeout_seconds: int = 8): function mathd_normalize_answer (line 67) | def mathd_normalize_answer(answer: Optional[str]) -> Optional[str]: function _strip_string (line 220) | def _strip_string(string): function normalize_final_answer (line 440) | def normalize_final_answer(final_answer: str) -> str: function repeatness (line 477) | def repeatness(s: str): class timeout (line 520) | class timeout: method __init__ (line 521) | def __init__(self, seconds=1, error_message="Timeout"): method handle_timeout (line 525) | def handle_timeout(self, signum, frame): method __enter__ (line 528) | def __enter__(self): method __exit__ (line 532) | def __exit__(self, type, value, traceback): function latex_eval (line 536) | def latex_eval(latex): function numeric_equal (line 542) | def numeric_equal(prediction: float, reference: float): function symbolic_equal (line 553) | def symbolic_equal(a, b): function _is_latex_equal (line 609) | def _is_latex_equal(str1, str2): function is_latex_equal (line 629) | def is_latex_equal(given_answer: str, ground_truth: str) -> bool: function is_value_equal (line 682) | def is_value_equal(given_answer: str, ground_truth: str) -> bool: function _sympy_parse (line 701) | def _sympy_parse(expr: str): function _parse_latex (line 710) | def _parse_latex(expr: str) -> str: function _is_float (line 728) | def _is_float(num: str) -> bool: function _is_int (line 736) | def _is_int(x: float) -> bool: function _is_frac (line 743) | def _is_frac(expr: str) -> bool: function _str_is_int (line 747) | def _str_is_int(x: str) -> bool: function _str_to_int (line 756) | def _str_to_int(x: str) -> bool: function _inject_implicit_mixed_number (line 762) | def _inject_implicit_mixed_number(step: str): function _strip_properly_formatted_commas (line 772) | def _strip_properly_formatted_commas(expr: str): function _normalize (line 783) | def _normalize(expr: str) -> str: function count_unknown_letters_in_expr (line 856) | def count_unknown_letters_in_expr(expr: str): function should_allow_eval (line 863) | def should_allow_eval(expr: str): function are_equal_under_sympy (line 880) | def are_equal_under_sympy(ground_truth_normalized: str, given_normalized... function split_tuple (line 894) | def split_tuple(expr: str): function last_boxed_only_string (line 913) | def last_boxed_only_string(string): function remove_boxed (line 940) | def remove_boxed(s): function extract_boxed_answer (line 950) | def extract_boxed_answer(solution: str) -> str: function grade_answer_sympy (line 957) | def grade_answer_sympy(given_answer: str, ground_truth: str) -> bool: function grade_answer_mathd (line 997) | def grade_answer_mathd(given_answer: str, ground_truth: str) -> bool: function extract_answer (line 1007) | def extract_answer(passage: str) -> str: function grade (line 1013) | def grade(model_answer: str, gt_answer: str, fast: bool = True): function compute_score (line 1027) | def compute_score(model_response, gt_answer, fast=False): FILE: verl_distillation/recipe/entropy/reward_score/entropy_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_distillation/recipe/entropy/reward_score/entropy_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_distillation/recipe/fapo/prepare_fapo_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: verl_distillation/recipe/fapo/reward_fn_genrm.py function parse_ans (line 20) | def parse_ans( function compute_score_fapo_genrm (line 35) | def compute_score_fapo_genrm( FILE: verl_distillation/recipe/fapo/reward_fn_reasoning.py function verify (line 29) | def verify( function compute_score_baseline (line 45) | async def compute_score_baseline( function generate_aiohttp (line 77) | async def generate_aiohttp(router_address: str, prompt_ids: list[int], s... function compute_score_fapo (line 97) | async def compute_score_fapo( FILE: verl_distillation/recipe/fapo/reward_fn_reasoning_remote.py function verify (line 22) | def verify( function compute_score_baseline (line 37) | def compute_score_baseline( function chat_completions_aiohttp (line 75) | async def chat_completions_aiohttp(address, **chat_complete_request): function judge_fp_process (line 95) | def judge_fp_process(response, return_err_step=False): function compute_score_fapo (line 109) | async def compute_score_fapo(data_source, solution_str, ground_truth, ex... FILE: verl_distillation/recipe/fully_async_policy/agent_loop/agent_loop.py class FullyAsyncLLMServerManager (line 43) | class FullyAsyncLLMServerManager(AsyncLLMServerManager): method generate_for_partial (line 44) | async def generate_for_partial(self, request_id, prompt_ids, sampling_... class FullyAsyncAgentLoopOutput (line 56) | class FullyAsyncAgentLoopOutput(AgentLoopOutput): class FullyAsyncAgentLoopWorker (line 70) | class FullyAsyncAgentLoopWorker(AgentLoopWorkerBase): method __init__ (line 71) | def __init__( method generate_sequences_no_post (line 77) | async def generate_sequences_no_post( method _partial_run_agent_loop (line 127) | async def _partial_run_agent_loop( class FullyAsyncAgentLoopManager (line 157) | class FullyAsyncAgentLoopManager(AgentLoopManager): method __init__ (line 158) | def __init__(self, config: DictConfig, worker_group: RayWorkerGroup = ... method create (line 173) | async def create(cls, config: DictConfig, worker_group: RayWorkerGroup... method _async_init (line 178) | async def _async_init(self): method _initialize_llm_servers_async (line 188) | async def _initialize_llm_servers_async(self): method generate_single_sample_async (line 217) | async def generate_single_sample_async( method _select_best_worker (line 236) | def _select_best_worker(self): method cancel (line 245) | async def cancel(self): method resume (line 248) | async def resume(self): method wake_up (line 251) | async def wake_up(self): method sleep (line 254) | async def sleep(self): method reset_prefix_cache (line 257) | async def reset_prefix_cache(self): FILE: verl_distillation/recipe/fully_async_policy/agent_loop/partial_single_turn_agent_loop.py class PartialSingleTurnAgentLoop (line 29) | class PartialSingleTurnAgentLoop(AgentLoopBase): method __init__ (line 32) | def __init__(self, *args, **kwargs): method run (line 38) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... FILE: verl_distillation/recipe/fully_async_policy/detach_utils.py function postprocess_agent_loop_outputs (line 29) | def postprocess_agent_loop_outputs(rs: "RolloutSample", tokenizer, confi... class RolloutSample (line 159) | class RolloutSample: class ValidateMetrics (line 181) | class ValidateMetrics: function prepare_single_generation_data (line 190) | def prepare_single_generation_data(batch_dict, global_steps, rollout_n) ... function process_rollout_log_probs (line 217) | def process_rollout_log_probs(data_proto: DataProto, rollout_log_probs: ... function merge_rollout_sample (line 249) | def merge_rollout_sample(config, tokenizer, rs: RolloutSample, processor): function assemble_batch_from_rollout_samples (line 280) | def assemble_batch_from_rollout_samples( class MetricsAggregator (line 366) | class MetricsAggregator: method __init__ (line 369) | def __init__(self, total_gpus: int): method _init_aggregation_rules (line 384) | def _init_aggregation_rules(self) -> dict[str, dict[str, list[str]]]: method add_step_metrics (line 399) | def add_step_metrics(self, metrics: dict[str, Any], sample_count: int,... method _get_aggregation_type (line 415) | def _get_aggregation_type(self, metric_name: str) -> str: method _aggregate_single_metric (line 437) | def _aggregate_single_metric(self, metric_name: str, values: list[floa... method get_aggregated_metrics (line 476) | def get_aggregated_metrics(self) -> dict[str, Any]: method _special_metrics_aggergate (line 495) | def _special_metrics_aggergate(self, aggregated: dict[str, Any]) -> di... method reset (line 515) | def reset(self): method get_current_stats (line 522) | def get_current_stats(self) -> dict[str, Any]: FILE: verl_distillation/recipe/fully_async_policy/fsdp2_utils.py function fsdp2_sharded_save_to_cpu (line 28) | def fsdp2_sharded_save_to_cpu( function fsdp2_sharded_load_from_cpu (line 70) | def fsdp2_sharded_load_from_cpu( FILE: verl_distillation/recipe/fully_async_policy/fsdp_workers.py function get_inference_model (line 43) | def get_inference_model(rollout): class DetachNcclSync (line 64) | class DetachNcclSync(AsyncActorRolloutRefWorker): method _get_actor_params (line 65) | def _get_actor_params(self): method sync_rollout_weights (line 69) | def sync_rollout_weights(self): class DetachActorWorker (line 97) | class DetachActorWorker(DetachNcclSync): method _get_actor_params (line 98) | def _get_actor_params(self): method get_actor_weights_info (line 109) | def get_actor_weights_info(self): method save_model_to_cpu (line 129) | def save_model_to_cpu(self, n): method restore_model_from_cpu (line 135) | def restore_model_from_cpu(self, n): method clear_cpu_model (line 141) | def clear_cpu_model(self, n): class DetachAsyncRolloutWorker (line 146) | class DetachAsyncRolloutWorker(DetachNcclSync): method __init__ (line 147) | def __init__(self, config: DictConfig, role: str): method set_actor_weights_info (line 152) | def set_actor_weights_info(self, weights_info): FILE: verl_distillation/recipe/fully_async_policy/fully_async_main.py function create_resource_pool_manager (line 33) | def create_resource_pool_manager(config, roles: list) -> ResourcePoolMan... function create_role_worker_mapping (line 72) | def create_role_worker_mapping(config): class FullyAsyncTaskRunner (line 126) | class FullyAsyncTaskRunner: method __init__ (line 131) | def __init__(self): method run (line 136) | def run(self, config): method _initialize_components (line 141) | def _initialize_components(self, config) -> None: method _create_rollouter (line 219) | def _create_rollouter(self, config) -> None: method _create_trainer (line 238) | def _create_trainer(self, config) -> None: method _run_training_loop (line 261) | def _run_training_loop(self): function main (line 298) | def main(config): FILE: verl_distillation/recipe/fully_async_policy/fully_async_rollouter.py class FullyAsyncRollouter (line 37) | class FullyAsyncRollouter(FullyAsyncRayPPOTrainer): method __init__ (line 44) | def __init__( method set_message_queue_client (line 153) | async def set_message_queue_client(self, message_queue_client: Message... method set_max_required_samples (line 158) | async def set_max_required_samples(self): method get_rollout_wg (line 183) | def get_rollout_wg(self): method get_max_queue_size (line 187) | def get_max_queue_size(self): method get_total_train_steps (line 190) | def get_total_train_steps(self): method update_param_version (line 193) | async def update_param_version(self, version: int, validate: bool = Fa... method _validate_config (line 237) | def _validate_config(self): method init_workers (line 243) | async def init_workers(self): method _create_actor_rollout_classes (line 256) | def _create_actor_rollout_classes(self): method _init_models (line 267) | def _init_models(self): method _create_continuous_iterator (line 272) | def _create_continuous_iterator(self): method _init_async_rollout_manager (line 281) | async def _init_async_rollout_manager(self): method _feed_samples (line 293) | async def _feed_samples(self): method _processor_worker (line 333) | async def _processor_worker(self): method _process_single_sample_streaming (line 409) | async def _process_single_sample_streaming(self, rollout_sample: Rollo... method _consumer_worker (line 436) | async def _consumer_worker(self): method _streaming_generation_main (line 457) | async def _streaming_generation_main(self): method fit (line 507) | async def fit(self): method _async_monitor_loop (line 543) | async def _async_monitor_loop(self): method _should_pause_generation (line 572) | async def _should_pause_generation(self) -> bool: method pause (line 596) | async def pause(self): method resume (line 611) | async def resume(self, dependency_ref: ObjectRef = None): method get_statistics (line 623) | async def get_statistics(self) -> dict: FILE: verl_distillation/recipe/fully_async_policy/fully_async_trainer.py class FullyAsyncTrainer (line 39) | class FullyAsyncTrainer(FullyAsyncRayPPOTrainer): method __init__ (line 45) | def __init__( method set_message_queue_client (line 110) | def set_message_queue_client(self, message_queue_client: MessageQueueC... method set_parameter_synchronizer (line 114) | def set_parameter_synchronizer(self, param_synchronizer): method set_total_train_steps (line 118) | def set_total_train_steps(self, total_train_steps): method get_actor_wg (line 122) | def get_actor_wg(self): method _get_samples_from_queue (line 126) | def _get_samples_from_queue(self) -> tuple[None, None] | tuple[int, Any]: method _create_actor_rollout_classes (line 185) | def _create_actor_rollout_classes(self): method _init_models (line 196) | def _init_models(self): method _init_async_rollout_manager (line 213) | def _init_async_rollout_manager(self): method fit (line 216) | def fit(self): method load_checkpoint (line 309) | def load_checkpoint(self): method _collect_metrics_from_samples (line 312) | def _collect_metrics_from_samples(self, batch, metrics): method _trigger_parameter_sync_after_step (line 334) | def _trigger_parameter_sync_after_step(self, validate: bool = False, g... FILE: verl_distillation/recipe/fully_async_policy/megatron_worker.py function get_inference_model (line 40) | def get_inference_model(rollout): class DetachNcclSync (line 61) | class DetachNcclSync(AsyncActorRolloutRefWorker): method _get_actor_params (line 62) | def _get_actor_params(self): method sync_rollout_weights (line 66) | def sync_rollout_weights(self): class DetachActorWorker (line 93) | class DetachActorWorker(DetachNcclSync): method _get_actor_params_generator (line 94) | def _get_actor_params_generator(self): method get_actor_weights_info (line 110) | def get_actor_weights_info(self): class DetachAsyncRolloutWorker (line 124) | class DetachAsyncRolloutWorker(DetachNcclSync): method __init__ (line 125) | def __init__(self, config: DictConfig, role: str): method set_actor_weights_info (line 130) | def set_actor_weights_info(self, weights_info): FILE: verl_distillation/recipe/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 67) | async def put_sample(self, sample: Any, param_version: int) -> bool: method get_sample (line 98) | async def get_sample(self) -> Any | None: method update_param_version (line 118) | async def update_param_version(self, version: int): method get_queue_size (line 125) | async def get_queue_size(self) -> int: method get_statistics (line 130) | async def get_statistics(self) -> dict[str, Any]: method clear_queue (line 143) | async def clear_queue(self): method shutdown (line 150) | async def shutdown(self): method get_memory_usage (line 158) | async def get_memory_usage(self) -> dict: method put_validate (line 190) | async def put_validate(self, data): method get_validate (line 194) | async def get_validate(self): class MessageQueueClient (line 202) | class MessageQueueClient: method __init__ (line 205) | def __init__(self, queue_actor: Any): method put_sample (line 208) | async def put_sample(self, sample: Any, param_version: int) -> bool: method put_validate (line 213) | async def put_validate(self, data: Any) -> bool: method get_validate_sync (line 217) | def get_validate_sync(self) -> Any | None: method get_sample (line 220) | async def get_sample(self) -> Any | None: method get_queue_size (line 225) | async def get_queue_size(self) -> int: method get_statistics (line 230) | async def get_statistics(self) -> dict[str, Any]: method clear_queue (line 235) | async def clear_queue(self): method shutdown (line 240) | async def shutdown(self): method get_memory_usage (line 245) | async def get_memory_usage(self) -> dict: method put_sample_sync (line 251) | def put_sample_sync(self, sample: Any, param_version: int) -> bool: method get_sample_sync (line 255) | def get_sample_sync(self) -> Any | None: method get_statistics_sync (line 259) | def get_statistics_sync(self) -> dict[str, Any]: method update_param_version_sync (line 263) | def update_param_version_sync(self, version: int): FILE: verl_distillation/recipe/fully_async_policy/param_sync.py class ParameterSynchronizer (line 25) | class ParameterSynchronizer: method __init__ (line 32) | def __init__(self, config, trainer, rollouter, mq): method get_current_param_version (line 53) | def get_current_param_version(self) -> int: method get_weights_info (line 57) | def get_weights_info(self): method _init_weights_info (line 61) | def _init_weights_info(self): method _init_sync_group (line 65) | def _init_sync_group(self): method sync_weights (line 76) | def sync_weights(self, version, validate=False, global_steps=0): method wait_last_valid (line 98) | def wait_last_valid(self): FILE: verl_distillation/recipe/fully_async_policy/ray_trainer.py class FullyAsyncRayPPOTrainer (line 53) | class FullyAsyncRayPPOTrainer(RayPPOTrainer): method init_workers (line 54) | def init_workers(self): method _init_resource_pools (line 67) | def _init_resource_pools(self): method _create_worker_classes (line 72) | def _create_worker_classes(self): method _create_actor_rollout_classes (line 78) | def _create_actor_rollout_classes(self): method _create_critic_class (line 81) | def _create_critic_class(self): method _create_reference_policy_class (line 89) | def _create_reference_policy_class(self): method _create_reward_model_class (line 101) | def _create_reward_model_class(self): method _init_worker_groups (line 109) | def _init_worker_groups(self): method _init_models (line 143) | def _init_models(self): method _init_async_rollout_manager (line 160) | def _init_async_rollout_manager(self): method fit (line 163) | def fit(self): method _prepare_generate_batch (line 306) | def _prepare_generate_batch(self, batch_dict): method _post_generate_batch (line 319) | def _post_generate_batch(self, batch, gen_batch_output, metrics): method _process_batch_common (line 339) | def _process_batch_common(self, batch, metrics, timing_raw, local_trig... method _log_rollout (line 465) | def _log_rollout(self, batch, reward_extra_infos_dict, timing_raw): method _validate_metrics (line 490) | def _validate_metrics(self, is_last_step, last_val_metrics, metrics, t... method _check_save_checkpoint (line 503) | def _check_save_checkpoint(self, is_last_step, timing_raw): method _collect_metrics (line 524) | def _collect_metrics(self, batch, epoch, metrics, timing_raw): method _post_batch_processing (line 542) | def _post_batch_processing(self, batch: DataProto): FILE: verl_distillation/recipe/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_distillation/recipe/fully_async_policy/vllm_rollout/vllm_async_server.py class vLLMHttpServerForPartial (line 37) | class vLLMHttpServerForPartial(vLLMHttpServerBase): method __init__ (line 38) | def __init__( method _generate_step (line 57) | async def _generate_step( method generate_for_partial (line 79) | async def generate_for_partial( method cancel (line 120) | async def cancel(self): method resume (line 126) | async def resume(self): method reset_prefix_cache (line 130) | async def reset_prefix_cache(self): class FullyAsyncvLLMReplica (line 135) | class FullyAsyncvLLMReplica(vLLMReplica): method __init__ (line 136) | def __init__( method cancel (line 147) | async def cancel(self): method resume (line 151) | async def resume(self): method reset_prefix_cache (line 155) | async def reset_prefix_cache(self): FILE: verl_distillation/recipe/genrm_remote/reward_function.py function get_response (line 45) | def get_response(problem, solution_str, ground_truth): function compute_reward (line 68) | def compute_reward(response): function compute_score (line 80) | def compute_score(data_source, solution_str, ground_truth, extra_info): function compute_score_batch (line 99) | def compute_score_batch(data_sources, solution_strs, ground_truths, extr... FILE: verl_distillation/recipe/infigui-g1/reward_fn.py function extract_think_format (line 30) | def extract_think_format(predict_str: str) -> None | dict[str, str]: function extract_and_parse_json (line 73) | def extract_and_parse_json(input_string, wrapper): function _extract_verifiable_answer (line 122) | def _extract_verifiable_answer(answer): function _format_reward (line 152) | def _format_reward(answer): function _check_collinear (line 175) | def _check_collinear(points_2d): function _accuracy_reward (line 205) | def _accuracy_reward(answer, ground_truth): function calculate_point_reward (line 260) | def calculate_point_reward(solution_str, ground_truth, extra_info=None, ... function aer_gui_reward_function (line 340) | def aer_gui_reward_function(data_source, solution_str, ground_truth, ext... FILE: verl_distillation/recipe/langgraph_agent/chat_model.py class MaxTokenExceededError (line 47) | class MaxTokenExceededError(Exception): class ChatModel (line 53) | class ChatModel(BaseChatModel): method bind_tools (line 81) | def bind_tools(self, tools, **kwargs) -> Runnable[LanguageModelInput, ... method with_structured_output (line 98) | def with_structured_output( method _generate (line 108) | def _generate( method _agenerate (line 116) | async def _agenerate( method _llm_type (line 151) | def _llm_type(self) -> str: method _preprocess (line 155) | async def _preprocess(self, messages: list[BaseMessage], **kwargs: Any... method _postprocess (line 253) | async def _postprocess( class TruncateStructuredTool (line 320) | class TruncateStructuredTool(StructuredTool): method _arun (line 329) | async def _arun( function convert_to_agent_output (line 350) | def convert_to_agent_output(messages: list[BaseMessage], response_length... FILE: verl_distillation/recipe/langgraph_agent/example/create_dataset.py function generate_math_expression (line 25) | def generate_math_expression(min_terms=2, max_terms=5, min_number=1, max... function test (line 80) | def test(): function calculate (line 98) | def calculate(expression: str) -> float: function generate_data (line 213) | def generate_data(total_num_dataset, split): FILE: verl_distillation/recipe/langgraph_agent/example/math_expression.py function calculate (line 20) | def calculate(a: int, b: int, operand: str) -> int: class MathExpressionReactAgentLoop (line 35) | class MathExpressionReactAgentLoop(ReactAgentLoop): method init_class (line 37) | def init_class(cls, config, tokenizer, **kwargs): FILE: verl_distillation/recipe/langgraph_agent/react_agent_loop.py function call_model (line 36) | async def call_model(state: MessagesState, config: RunnableConfig): function should_continue (line 47) | def should_continue(state: MessagesState, config: RunnableConfig) -> Lit... class ReactAgentLoop (line 71) | class ReactAgentLoop(AgentLoopBase): method init_class (line 73) | def init_class(cls, config, tokenizer, **kwargs): method build_graph (line 83) | def build_graph(cls) -> StateGraph: method run (line 102) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... FILE: verl_distillation/recipe/langgraph_agent/test_react_agent_loop.py function init_config (line 30) | def init_config() -> DictConfig: function get_current_temperature (line 53) | def get_current_temperature(location: str, unit: str = "celsius"): function get_temperature_date (line 72) | def get_temperature_date(location: str, date: str, unit: str = "celsius"): class TestReactAgentLoop (line 92) | class TestReactAgentLoop(ReactAgentLoop): method init_class (line 94) | def init_class(cls, config, tokenizer, **kwargs): function test_react_agent (line 100) | def test_react_agent(init_config): FILE: verl_distillation/recipe/minicpmo/rl_dataset.py function build_transform (line 39) | def build_transform(): function build_image_bound (line 50) | def build_image_bound(input_ids, tokenizer, new_schema=True, logger=None): function preprocess (line 70) | def preprocess( function slice_image (line 204) | def slice_image(image, max_slice_nums=9, scale_resolution=448, patch_siz... function ensure_divide (line 255) | def ensure_divide(length, patch_size): function find_best_resize (line 259) | def find_best_resize(original_size, scale_resolution, patch_size, allow_... function get_refine_size (line 270) | def get_refine_size(original_size, grid, scale_resolution, patch_size, a... function split_to_patches (line 292) | def split_to_patches(image, grid): function get_grid_placeholder (line 309) | def get_grid_placeholder(tokenizer, grid, query_num, new_schema=False): function reshape_by_patch (line 330) | def reshape_by_patch(image_tensor, patch_size): function init_minicpmo_config (line 343) | def init_minicpmo_config(processor, config): function process_minicpmo_data (line 358) | def process_minicpmo_data( class RLHFDataset (line 402) | class RLHFDataset(Dataset): method __init__ (line 419) | def __init__( method _download (line 457) | def _download(self, use_origin_parquet=False): method _read_files_and_tokenize (line 464) | def _read_files_and_tokenize(self): method resume_dataset_state (line 474) | def resume_dataset_state(self): method __len__ (line 483) | def __len__(self): method _build_messages (line 486) | def _build_messages(self, example: dict): method __getitem__ (line 489) | def __getitem__(self, item): method __getstate__ (line 563) | def __getstate__(self): FILE: verl_distillation/recipe/one_step_off_policy/distributed_util.py function stateless_init_process_group (line 18) | def stateless_init_process_group(master_address, master_port, rank, worl... FILE: verl_distillation/recipe/one_step_off_policy/fsdp_workers.py class ActorRolloutRefWorker (line 59) | class ActorRolloutRefWorker(ARRWorker): method create_weight_sync_group (line 61) | def create_weight_sync_group(self, master_address, master_port, rank_o... method _get_actor_params (line 71) | def _get_actor_params(self): method sync_rollout_weights (line 82) | def sync_rollout_weights(self): method update_weights (line 118) | async def update_weights(self, inference_engine, params): method get_actor_weights_info (line 132) | def get_actor_weights_info(self): class RolloutWorker (line 152) | class RolloutWorker(ActorRolloutRefWorker): method __init__ (line 153) | def __init__(self, config: DictConfig, role: str): method init_model (line 189) | def init_model(self): method async_generate_sequences (line 277) | def async_generate_sequences(self, prompts): method set_actor_weights_info (line 323) | def set_actor_weights_info(self, weights_info): class AsyncActorRolloutRefWorker (line 328) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method __init__ (line 329) | def __init__(self, *args, **kwargs): FILE: verl_distillation/recipe/one_step_off_policy/main_ppo.py function main (line 37) | def main(config): function run_ppo (line 42) | def run_ppo(config) -> None: class TaskRunner (line 78) | class TaskRunner: method run (line 79) | def run(self, config): FILE: verl_distillation/recipe/one_step_off_policy/megatron_workers.py class ActorRolloutRefWorker (line 42) | class ActorRolloutRefWorker(ARRWorker): method __init__ (line 43) | def __init__(self, config: DictConfig, role: str): method create_weight_sync_group (line 52) | def create_weight_sync_group(self, master_address, master_port, rank_o... method _get_actor_params_generator (line 62) | def _get_actor_params_generator(self): method sync_rollout_weights (line 82) | def sync_rollout_weights(self): method get_actor_weights_info (line 110) | def get_actor_weights_info(self): class RolloutWorker (line 124) | class RolloutWorker(ActorRolloutRefWorker): method __init__ (line 125) | def __init__(self, config: DictConfig, role: str): method init_model (line 130) | def init_model(self): method async_generate_sequences (line 198) | def async_generate_sequences(self, *args, **kwargs): method set_actor_weights_info (line 202) | def set_actor_weights_info(self, weights_info): class AsyncActorRolloutRefWorker (line 207) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method __init__ (line 208) | def __init__(self, *args, **kwargs): FILE: verl_distillation/recipe/one_step_off_policy/ray_trainer.py class GenerationBatchFuture (line 58) | class GenerationBatchFuture: method __init__ (line 63) | def __init__(self, epoch, batch, gen_batch_output, future_reward=None): method get (line 75) | def get(self): class OneStepOffRayTrainer (line 95) | class OneStepOffRayTrainer(RayPPOTrainer): method __init__ (line 98) | def __init__( method _validate (line 164) | def _validate(self): method init_workers (line 170) | def init_workers(self): method create_weight_sync_group (line 278) | def create_weight_sync_group(self): method sync_rollout_weights (line 297) | def sync_rollout_weights(self): method _create_continuous_iterator (line 302) | def _create_continuous_iterator(self): method _async_gen_next_batch (line 311) | def _async_gen_next_batch(self, continuous_iterator): method _launch_individual_rewards (line 363) | def _launch_individual_rewards(gen_batch_output, config, tokenizer, or... method fit (line 400) | def fit(self): FILE: verl_distillation/recipe/one_step_off_policy/sglang_sharding_manager.py class SGLangShardingManager (line 32) | class SGLangShardingManager(BaseShardingManager): method __init__ (line 34) | def __init__(self, device_mesh: DeviceMesh): method __enter__ (line 44) | def __enter__(self): method __exit__ (line 48) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 53) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 65) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_distillation/recipe/one_step_off_policy/utils.py function need_critic (line 22) | def need_critic(config: DictConfig) -> bool: FILE: verl_distillation/recipe/one_step_off_policy/vllm_sharding_manager.py class VLLMShardingManager (line 33) | class VLLMShardingManager(BaseShardingManager): method __init__ (line 35) | def __init__(self, inference_engine, device_mesh: DeviceMesh): method __enter__ (line 49) | def __enter__(self): method __exit__ (line 53) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 58) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 69) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_distillation/recipe/onpolicy_distill/main_onpolicy_distill.py function create_rl_dataset (line 28) | def create_rl_dataset(data_paths, data_config, tokenizer, processor, is_... class OnPolicyDistillTaskRunner (line 78) | class OnPolicyDistillTaskRunner(TaskRunner): method run (line 80) | def run(self, config): function main (line 193) | def main(config): FILE: verl_distillation/recipe/onpolicy_distill/onpolicy_distill_trainer.py class RayOnPolicyDistillTrainer (line 44) | class RayOnPolicyDistillTrainer(RayPPOTrainer): method compute_kl_related_metrics (line 49) | def compute_kl_related_metrics(self, batch: DataProto, metrics: dict, ... method fit (line 75) | def fit(self): FILE: verl_distillation/recipe/open_math_reasoning/compute_score.py function compute_score_data_source (line 16) | def compute_score_data_source(data_source, response, ground_truth): FILE: verl_distillation/recipe/open_math_reasoning/prepare_eval_dataset.py function make_map_fn (line 29) | def make_map_fn(data_source): FILE: verl_distillation/recipe/open_math_reasoning/prepare_nvidia-OpenMathReasoning_sft.py function make_map_fn (line 46) | def make_map_fn(split): FILE: verl_distillation/recipe/prime/main_prime.py function main (line 43) | def main(config): function run_prime (line 47) | def run_prime(config, compute_score=None): function main_task (line 62) | def main_task(config, compute_score=None): FILE: verl_distillation/recipe/prime/prime_core_algos.py function compute_rloo_advantage_return (line 21) | def compute_rloo_advantage_return(data: verl.DataProto, response_mask: t... function compute_ce_dpo_loss_rm (line 82) | def compute_ce_dpo_loss_rm(token_level_scores, acc, response_mask, beta): function compute_detach_dpo_loss_rm (line 88) | def compute_detach_dpo_loss_rm(token_level_scores, acc, Q_bc, acc_bc, re... function compute_dpo_accuracy (line 119) | def compute_dpo_accuracy(token_level_scores, acc, response_mask, n_sampl... function compute_dpo_abs_accuracy (line 146) | def compute_dpo_abs_accuracy(token_level_scores, acc, response_mask, n_s... FILE: verl_distillation/recipe/prime/prime_dp_rm.py class DataParallelPRIMERewardModel (line 38) | class DataParallelPRIMERewardModel: method __init__ (line 39) | def __init__(self, config, reward_module: nn.Module, ref_module: nn.Mo... method _forward_micro_batch (line 51) | def _forward_micro_batch(self, micro_batch, prompt_length): method _optimizer_step (line 230) | def _optimizer_step(self): method prime_norm (line 242) | def prime_norm(self, token_level_scores): method compute_rm_score (line 248) | def compute_rm_score(self, data: DataProto): method update_rm (line 291) | def update_rm(self, data: DataProto): FILE: verl_distillation/recipe/prime/prime_fsdp_workers.py class PRIMERewardModelWorker (line 53) | class PRIMERewardModelWorker(Worker): method __init__ (line 54) | def __init__(self, config): method _build_reward_ref_model_optimizer (line 89) | def _build_reward_ref_model_optimizer(self, config): method init_model (line 241) | def init_model(self): method compute_rm_score (line 273) | def compute_rm_score(self, data: DataProto): method update_rm (line 308) | def update_rm(self, data: DataProto): method save_checkpoint (line 350) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 365) | def load_checkpoint(self, local_path, del_local_after_load=True): FILE: verl_distillation/recipe/prime/prime_ray_trainer.py function compute_advantage (line 43) | def compute_advantage(data: DataProto, adv_estimator, config): function compute_data_metrics (line 59) | def compute_data_metrics(batch, use_critic=True): function compute_response_mask (line 120) | def compute_response_mask(data: DataProto): function compute_timing_metrics (line 127) | def compute_timing_metrics(batch, timing_raw): class RayPRIMETrainer (line 147) | class RayPRIMETrainer(RayPPOTrainer): method __init__ (line 154) | def __init__( method _create_dataloader (line 180) | def _create_dataloader(self, *args, **kwargs): method _save_checkpoint (line 236) | def _save_checkpoint(self): method _load_checkpoint (line 281) | def _load_checkpoint(self): method compute_reward (line 334) | def compute_reward(self, batch: DataProto, n_samples: int): method fit (line 373) | def fit(self): method filter_and_downsample (line 557) | def filter_and_downsample(self, scores, batch: DataProto): FILE: verl_distillation/recipe/r1/data_process.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_gpqa_dimond_dataset (line 53) | def build_gpqa_dimond_dataset(): function build_cnmo2024_dataset (line 84) | def build_cnmo2024_dataset(): function build_livecodebench_dataset (line 107) | def build_livecodebench_dataset(): FILE: verl_distillation/recipe/r1/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_distillation/recipe/r1/reward_score.py function reward_func (line 16) | def reward_func(data_source, solution_str, ground_truth, extra_info=None): FILE: verl_distillation/recipe/r1/tasks/gpqa.py function compute_score (line 21) | def compute_score(solution_str, ground_truth) -> float: FILE: verl_distillation/recipe/r1/tasks/livecodebench.py function _temp_run (line 25) | def _temp_run(in_outs, generation, debug, result, metadata_list, timeout): function check_correctness (line 31) | def check_correctness(in_outs, generation, timeout, debug=True): function compute_score (line 55) | def compute_score(completion, test_cases): FILE: verl_distillation/recipe/r1/tasks/math_reward.py function compute_score (line 23) | def compute_score(model_output: str, ground_truth: str) -> bool: FILE: verl_distillation/recipe/retool/retool.py class CustomSandboxFusionTool (line 29) | class CustomSandboxFusionTool(SandboxFusionTool): method __init__ (line 30) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method execute (line 35) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class CustomRLHFDataset (line 64) | class CustomRLHFDataset(RLHFDataset): method _read_files_and_tokenize (line 67) | def _read_files_and_tokenize(self): method map_fn (line 84) | def map_fn(self, row: dict, *, data_source: str = None): method map_fn2 (line 100) | def map_fn2(self, row: dict): function compute_score (line 107) | def compute_score(data_source, solution_str, ground_truth, extra_info): FILE: verl_distillation/recipe/retool/retool_sft_preprocess.py function extract_code_message (line 29) | def extract_code_message(content: str) -> tuple[dict[str, Any], str]: function extract_answer_message (line 58) | def extract_answer_message(content: str) -> tuple[dict[str, Any], str]: function extract_interpreter_message (line 74) | def extract_interpreter_message(content: str) -> tuple[dict[str, Any], s... function process (line 90) | def process(row: dict, *, tools: str): FILE: verl_distillation/recipe/spin/core_algos.py class AdaptiveKLController (line 21) | class AdaptiveKLController: method __init__ (line 27) | def __init__(self, init_kl_coef, target_kl, horizon): method update (line 32) | def update(self, current_kl, n_steps): class FixedKLController (line 39) | class FixedKLController: method __init__ (line 42) | def __init__(self, kl_coef): method update (line 45) | def update(self, current_kl, n_steps): function get_kl_controller (line 49) | def get_kl_controller(kl_ctrl): function compute_onlinedpo_pref (line 59) | def compute_onlinedpo_pref( function compute_online_dpo_loss (line 131) | def compute_online_dpo_loss( function get_batch_logps (line 161) | def get_batch_logps( FILE: verl_distillation/recipe/spin/dp_actor.py class SPINDataParallelPPOActor (line 33) | class SPINDataParallelPPOActor(DataParallelPPOActor): method compute_log_prob (line 34) | def compute_log_prob(self, data: DataProto) -> torch.Tensor: method update_policy_dpo_with_ref (line 92) | def update_policy_dpo_with_ref(self, data: DataProto): FILE: verl_distillation/recipe/spin/fsdp_workers.py function create_device_mesh (line 57) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 67) | def get_sharding_strategy(device_mesh): class SPINRolloutRefWorker (line 79) | class SPINRolloutRefWorker(ActorRolloutRefWorker): method init_model (line 81) | def init_model(self): method compute_ref_log_prob (line 169) | def compute_ref_log_prob(self, data: DataProto): method compute_log_prob (line 194) | def compute_log_prob(self, data: DataProto): method update_actor_dpo (line 227) | def update_actor_dpo(self, data: DataProto): class RewardModelWorker (line 289) | class RewardModelWorker(Worker): method __init__ (line 294) | def __init__(self, config): method _build_model (line 334) | def _build_model(self, config): method init_model (line 401) | def init_model(self): method _forward_micro_batch (line 406) | def _forward_micro_batch(self, micro_batch): method _expand_to_token_level (line 461) | def _expand_to_token_level(self, data: DataProto, scores: torch.Tensor): method _switch_chat_template (line 476) | def _switch_chat_template(self, data: DataProto): method compute_rm_score (line 542) | def compute_rm_score(self, data: DataProto): FILE: verl_distillation/recipe/spin/main_spin.py function main (line 28) | def main(config): function run_ppo (line 32) | def run_ppo(config) -> None: class TaskRunner (line 49) | class TaskRunner: method run (line 50) | def run(self, config): FILE: verl_distillation/recipe/spin/spin_trainer.py class ResourcePoolManager (line 49) | class ResourcePoolManager: method create_resource_pool (line 59) | def create_resource_pool(self): method get_resource_pool (line 72) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 76) | def get_n_gpus(self) -> int: method _check_resource_available (line 80) | def _check_resource_available(self): function _compute_response_info (line 111) | def _compute_response_info(batch: DataProto) -> dict[str, Any]: function compute_dpo_data_metrics (line 158) | def compute_dpo_data_metrics(batch: DataProto) -> dict[str, Any]: function apply_kl_penalty (line 247) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 277) | def compute_response_mask(data: DataProto): function compute_onlineDPO_pref (line 284) | def compute_onlineDPO_pref(data: DataProto): function _timer (line 323) | def _timer(name: str, timing_raw: dict[str, float]): class RaySPINTrainer (line 329) | class RaySPINTrainer: method __init__ (line 336) | def __init__( method _create_dataloader (line 383) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _maybe_log_val_generations (line 463) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _validate (line 487) | def _validate(self): method init_workers (line 614) | def init_workers(self): method _save_checkpoint (line 694) | def _save_checkpoint(self): method _load_checkpoint (line 749) | def _load_checkpoint(self): method _balance_batch (line 806) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method fit_dpo (line 823) | def fit_dpo(self): # Renamed for clarity as standard PPO loop FILE: verl_distillation/recipe/spin/utils.py function validate_config (line 18) | def validate_config( FILE: verl_distillation/recipe/sppo/config.py class SPPOActorConfig (line 21) | class SPPOActorConfig(FSDPActorConfig): FILE: verl_distillation/recipe/sppo/dp_actor.py function compute_sppo_loss (line 34) | def compute_sppo_loss( class DataParallelSPPOActor (line 60) | class DataParallelSPPOActor(DataParallelPPOActor): method update_policy (line 62) | def update_policy(self, data: DataProto): FILE: verl_distillation/recipe/sppo/main_sppo.py function main (line 34) | def main(config): function run_ppo (line 38) | def run_ppo(config) -> None: class TaskRunner (line 59) | class TaskRunner: method run (line 60) | def run(self, config): FILE: verl_distillation/recipe/sppo/sppo_ray_trainer.py function softmean (line 50) | def softmean(x: torch.Tensor, beta: float, dim: int = -1, keepdim: bool ... function compute_advantage (line 68) | def compute_advantage(data: DataProto, beta=1.0): class RaySPPOTrainer (line 76) | class RaySPPOTrainer(RayPPOTrainer): method __init__ (line 83) | def __init__( method fit (line 127) | def fit(self): FILE: verl_distillation/recipe/sppo/sppo_worker.py class SPPOActorRolloutRefWorker (line 33) | class SPPOActorRolloutRefWorker(ActorRolloutRefWorker): method init_model (line 40) | def init_model(self): FILE: verl_distillation/recipe/transfer_queue/agent_loop.py class AgentLoopManager (line 22) | class AgentLoopManager(agent_loop.AgentLoopManager): method generate_sequences (line 23) | def generate_sequences(self, prompts: BatchMeta) -> BatchMeta: method _performance_metrics (line 57) | def _performance_metrics(self, metrics: list[list[dict[str, str]]], ou... method create_transferqueue_client (line 70) | def create_transferqueue_client(self, controller_infos, storage_infos,... FILE: verl_distillation/recipe/transfer_queue/main_ppo.py function main (line 42) | def main(config): function run_ppo (line 52) | def run_ppo(config, task_runner_class=None) -> None: class TaskRunner (line 111) | class TaskRunner(MainTaskRunner): method run (line 112) | def run(self, config): FILE: verl_distillation/recipe/transfer_queue/ray_trainer.py class ResourcePoolManager (line 98) | class ResourcePoolManager: method create_resource_pool (line 107) | def create_resource_pool(self): method get_resource_pool (line 127) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 131) | def get_n_gpus(self) -> int: method _check_resource_available (line 135) | def _check_resource_available(self): function compute_reward_decorated (line 155) | def compute_reward_decorated(data, reward_fn): function compute_reward_async_decorated (line 160) | def compute_reward_async_decorated(data, reward_fn): function apply_kl_penalty (line 165) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 206) | def compute_response_mask(batch_meta: BatchMeta, data_system_client): function compute_advantage (line 233) | def compute_advantage( function compute_data_metrics_decorated (line 308) | def compute_data_metrics_decorated(batch, use_critic: bool = True): function compute_timing_metrics_decorated (line 313) | def compute_timing_metrics_decorated(batch, timing_raw: dict[str, float]... function compute_throughout_metrics_decorated (line 318) | def compute_throughout_metrics_decorated(batch, timing_raw: dict[str, fl... function calculate_debug_metrics_decorated (line 323) | def calculate_debug_metrics_decorated(data): function compute_val_reward_decorated (line 330) | def compute_val_reward_decorated(reward_fn, data, return_dict): class RayPPOTrainer (line 334) | class RayPPOTrainer: method __init__ (line 344) | def __init__( method _initialize_train_data_system (line 422) | def _initialize_train_data_system(self, global_batch_size, num_n_sampl... method _initialize_val_data_system (line 471) | def _initialize_val_data_system(self, global_batch_size, num_n_samples... method _create_dataloader (line 520) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _dump_generations (line 595) | def _dump_generations(self, inputs, outputs, gts, scores, reward_extra... method _log_rollout_data (line 623) | def _log_rollout_data( method _maybe_log_val_generations (line 659) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _get_gen_batch (line 683) | def _get_gen_batch(self, batch: DataProto) -> DataProto: method _validate (line 700) | def _validate(self): method init_workers (line 908) | def init_workers(self): method _save_checkpoint (line 1030) | def _save_checkpoint(self): method _load_checkpoint (line 1088) | def _load_checkpoint(self): method _start_profiling (line 1145) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 1156) | def _stop_profiling(self, do_profile: bool) -> None: method _balance_batch (line 1167) | def _balance_batch(self, batch: BatchMeta, data_system_client, metrics... method repeat_dict (line 1187) | def repeat_dict( method dict_to_tensordict (line 1228) | def dict_to_tensordict(cls, data: dict[str, torch.Tensor | np.ndarray]... method fit (line 1257) | def fit(self): FILE: verl_distillation/scripts/converter_hf_to_mcore.py function _init_args (line 49) | def _init_args(): function test_conversion (line 69) | def test_conversion(megatron_model_provider, tfconfig, output_path, model): function convert_checkpoint_from_transformers_to_megatron (line 118) | def convert_checkpoint_from_transformers_to_megatron( function safe_copy (line 193) | def safe_copy( function convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl (line 207) | def convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl(hfmodel,... function convert_checkpoint_from_transformers_to_megatron_dpskv3 (line 314) | def convert_checkpoint_from_transformers_to_megatron_dpskv3( function noop_context (line 403) | def noop_context() -> Any: function support_distributed_convert (line 407) | def support_distributed_convert(hf_config: AutoConfig) -> bool: function convert_hf_to_mcore (line 414) | def convert_hf_to_mcore(hf_model_path, output_path, use_cpu_initializati... FILE: verl_distillation/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: verl_distillation/scripts/init_random_model.py function _init_args (line 37) | def _init_args(): function check_output_path (line 46) | def check_output_path(output_path: str): function check_configs (line 55) | def check_configs(original_config: dict[str, Any], new_config: dict[str,... function init_random_model (line 72) | def init_random_model(hf_model_path, new_config_path, output_path): FILE: verl_distillation/scripts/legacy_model_merger.py class ModelMergerConfig (line 75) | class ModelMergerConfig: method __post_init__ (line 89) | def __post_init__(self): class BaseModelMerger (line 97) | class BaseModelMerger(ABC): method __init__ (line 98) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 115) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 139) | def patch_model_generation_config(self, model): method save_lora_adapter (line 155) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 212) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 241) | def upload_to_huggingface(self): method merge_and_save (line 249) | def merge_and_save(self): class FSDPModelMerger (line 253) | class FSDPModelMerger(BaseModelMerger): method _get_world_size (line 254) | def _get_world_size(self) -> int: method _load_rank_zero_state_dict (line 264) | def _load_rank_zero_state_dict(self, world_size: int) -> dict: method _extract_device_mesh_info (line 271) | def _extract_device_mesh_info(self, state_dict: dict, world_size: int)... method _calculate_shard_configuration (line 291) | def _calculate_shard_configuration( method _merge_by_placement (line 307) | def _merge_by_placement(self, tensors: list[torch.Tensor], placement: ... method _load_and_merge_state_dicts (line 318) | def _load_and_merge_state_dicts( method merge_and_save (line 381) | def merge_and_save(self): method _test_state_dict (line 404) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): class MegatronModelMerger (line 438) | class MegatronModelMerger(BaseModelMerger): method __init__ (line 439) | def __init__(self, config: ModelMergerConfig): method _get_tp_pp_rank_from_sharded_dir (line 482) | def _get_tp_pp_rank_from_sharded_dir(self, sharded_dir: str) -> tuple[... method _check_megatron_checkpoint_path (line 496) | def _check_megatron_checkpoint_path(self, model_path: str) -> tuple[li... method _merge_across_tp (line 511) | def _merge_across_tp( method _load_state_dicts (line 567) | def _load_state_dicts( method _check_megatron_state_key (line 585) | def _check_megatron_state_key(self, key: str) -> bool: method _merge_state_dicts (line 609) | def _merge_state_dicts( method merge_and_save (line 661) | def merge_and_save(self): method _test_state_dict (line 683) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): method _replace_name (line 704) | def _replace_name(self, megatron_name: str, name_mapping: dict[str, st... function main (line 716) | def main(): FILE: verl_distillation/scripts/print_cfg.py function main (line 21) | def main(config): FILE: verl_distillation/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: verl_distillation/tests/experimental/agent_loop/agent_utils.py function init_agent_loop_manager (line 25) | def init_agent_loop_manager(config: DictConfig) -> AgentLoopManager | Ra... FILE: verl_distillation/tests/experimental/agent_loop/test_agent_loop_reward.py function test_agent_loop_compute_score (line 29) | def test_agent_loop_compute_score(): FILE: verl_distillation/tests/experimental/agent_loop/test_agent_loop_reward_model.py function test_agent_loop_compute_score_with_model (line 29) | def test_agent_loop_compute_score_with_model(): FILE: verl_distillation/tests/experimental/agent_loop/test_basic_agent_loop.py function init_config (line 35) | def init_config() -> DictConfig: function test_single_turn (line 67) | def test_single_turn(init_config): class WeatherTool (line 131) | class WeatherTool(BaseTool): method get_current_temperature (line 132) | def get_current_temperature(self, location: str, unit: str = "celsius"): method get_openai_tool_schema (line 149) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 153) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class WeatherToolWithData (line 161) | class WeatherToolWithData(BaseTool): method get_openai_tool_schema (line 162) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method get_temperature_date (line 166) | def get_temperature_date(self, location: str, date: str, unit: str = "... method execute (line 185) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_tool_agent (line 193) | def test_tool_agent(init_config): function test_tool_agent_with_interaction (line 307) | def test_tool_agent_with_interaction(init_config): function test_get_trajectory_info (line 432) | async def test_get_trajectory_info(): FILE: verl_distillation/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: verl_distillation/tests/experimental/agent_loop/test_multi_modal.py function init_config (line 33) | def init_config() -> DictConfig: class ImageGeneratorTool (line 61) | class ImageGeneratorTool(BaseTool): method generate_image (line 62) | def generate_image(self, description: str, size: str = "256x256"): method get_openai_tool_schema (line 99) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 103) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_multimodal_tool_agent (line 112) | def test_multimodal_tool_agent(init_config): function test_multimodal_single_turn_agent (line 249) | def test_multimodal_single_turn_agent(init_config): function test_multimodal_partial_single_turn_agent (line 381) | def test_multimodal_partial_single_turn_agent(init_config): FILE: verl_distillation/tests/experimental/agent_loop/test_standalone_rollout.py function init_config (line 27) | def init_config() -> DictConfig: function test_standalone_rollout (line 46) | async def test_standalone_rollout(init_config, tp_size): function test_hybrid_rollout_with_ep (line 98) | def test_hybrid_rollout_with_ep(init_config): FILE: verl_distillation/tests/experimental/reward/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( FILE: verl_distillation/tests/experimental/reward/test_agent_loop_reward_manager.py function test_agent_loop_reward_manager (line 27) | def test_agent_loop_reward_manager(): FILE: verl_distillation/tests/experimental/reward/test_reward_model.py function create_data_samples (line 41) | def create_data_samples() -> DataProto: function test_reward_model_manager (line 70) | def test_reward_model_manager(): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/tests/models/test_engine.py function test_actor_engine (line 48) | def test_actor_engine(strategy): function create_model (line 160) | def create_model(): function test_critic_engine (line 173) | def test_critic_engine(strategy): function create_actor_model (line 275) | def create_actor_model(tmp_path, config): function _worker (line 283) | def _worker(rank: int, world_size: int, rendezvous_file: str, strategy: ... function test_per_tensor_generator (line 353) | def test_per_tensor_generator(world_size, tmp_path, config, strategy): FILE: verl_distillation/tests/models/test_transformer.py function test_hf_casual_models (line 41) | def test_hf_casual_models(): function test_hf_value_models (line 111) | def test_hf_value_models(): function test_attn_implementation_override (line 166) | def test_attn_implementation_override(): function test_fsdp_worker_attn_implementation_integration (line 201) | def test_fsdp_worker_attn_implementation_integration(): FILE: verl_distillation/tests/models/test_transformers_ulysses.py class SequenceParallelConfig (line 44) | class SequenceParallelConfig: function test_configs (line 50) | def test_configs(): function sync_model_parameters_global (line 87) | def sync_model_parameters_global(layer): function test_hf_casual_fwd_bwd (line 94) | def test_hf_casual_fwd_bwd(test_config): function _hf_casual_fwd (line 107) | def _hf_casual_fwd(config, sp_size, dp_size): function _hf_casual_fwd_bwd (line 186) | def _hf_casual_fwd_bwd(config, sp_size, dp_size): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/tests/single_controller/detached_worker/client.py function compute_position_id_with_mask (line 27) | def compute_position_id_with_mask(mask): FILE: verl_distillation/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 75) | def init_model(self): method train_model (line 118) | def train_model(self, data: DataProto) -> DataProto: FILE: verl_distillation/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: verl_distillation/tests/single_controller/test_colocated_workers.py class Actor (line 29) | class Actor(Worker): method __init__ (line 30) | def __init__(self) -> None: method add (line 34) | def add(self, data: DataProto): class Critic (line 40) | class Critic(Worker): method __init__ (line 41) | def __init__(self, config) -> None: method sub (line 46) | async def sub(self, data: DataProto): function test_colocated_workers (line 51) | def test_colocated_workers(): FILE: verl_distillation/tests/single_controller/test_colocated_workers_fused.py class Actor (line 29) | class Actor(Worker): method __init__ (line 30) | def __init__(self) -> None: method add (line 34) | def add(self, data: DataProto): class Critic (line 40) | class Critic(Worker): method __init__ (line 41) | def __init__(self, config) -> None: method sub (line 46) | def sub(self, data: DataProto): function test_colocated_workers_fused (line 51) | def test_colocated_workers_fused(): FILE: verl_distillation/tests/single_controller/test_data_transfer.py class DummyWorker (line 32) | class DummyWorker(Worker): method __init__ (line 33) | def __init__(self): method do_nothing (line 38) | def do_nothing(self, data): function test_data_transfer (line 46) | def test_data_transfer(): FILE: verl_distillation/tests/single_controller/test_decorator_on_cpu.py function ray_init_shutdown (line 31) | def ray_init_shutdown(): class DecoratorTestWorker (line 39) | class DecoratorTestWorker(Worker): method __init__ (line 40) | def __init__(self, initial_value=0): method dp_compute (line 48) | def dp_compute(self, data: DataProto) -> DataProto: method async_dp_compute (line 56) | async def async_dp_compute(self, data: DataProto) -> DataProto: function test_decorator_dp_compute (line 65) | def test_decorator_dp_compute(ray_init_shutdown): function test_decorator_async_function (line 101) | def test_decorator_async_function(ray_init_shutdown): FILE: verl_distillation/tests/single_controller/test_device_mesh_register.py class TestActor (line 25) | class TestActor(Worker): method __init__ (line 26) | def __init__(self): method generate_data_proto (line 52) | def generate_data_proto(self, data: DataProto): method train_data_proto (line 59) | def train_data_proto(self, data: DataProto): function test_dist_global_info_wg (line 69) | def test_dist_global_info_wg(): FILE: verl_distillation/tests/single_controller/test_driverfunc_to_worker.py class ModelActor (line 31) | class ModelActor(Worker): method __init__ (line 32) | def __init__(self): class HackSelf (line 36) | class HackSelf: method __init__ (line 37) | def __init__(self): function get_aux_metrics (line 41) | def get_aux_metrics(self, test_proto): function test (line 54) | def test(): FILE: verl_distillation/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: verl_distillation/tests/single_controller/test_high_level_scheduling_api.py class TestActor (line 24) | class TestActor(Worker): method __init__ (line 26) | def __init__(self, cuda_visible_devices=None) -> None: method get_node_id (line 29) | def get_node_id(self): function test (line 33) | def test(): FILE: verl_distillation/tests/single_controller/test_nested_worker.py class TestActor (line 23) | class TestActor(Worker): method __init__ (line 25) | def __init__(self, x) -> None: method get (line 30) | def get(self): class TestHighLevelActor (line 34) | class TestHighLevelActor(Worker): method __init__ (line 35) | def __init__(self, x=None) -> None: method get (line 40) | def get(self): function test_nested_worker (line 44) | def test_nested_worker(): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/tests/single_controller/test_worker_group_basics.py function two_to_all_dispatch_fn (line 26) | def two_to_all_dispatch_fn(worker_group, *args, **kwargs): class TestActor (line 42) | class TestActor(Worker): method __init__ (line 44) | def __init__(self, x) -> None: method foo (line 48) | def foo(self, y): method foo_rank_zero (line 52) | def foo_rank_zero(self, x, y): method foo_one_to_all (line 56) | def foo_one_to_all(self, x, y): method foo_all_to_all (line 60) | def foo_all_to_all(self, x, y): method foo_custom (line 64) | def foo_custom(self, x, y): function remote_call_wg (line 69) | def remote_call_wg(worker_names): function add_one (line 85) | def add_one(data): function test_basics (line 92) | def test_basics(): FILE: verl_distillation/tests/single_controller/test_worker_group_torch.py class TestAllGatherActor (line 29) | class TestAllGatherActor(Worker): method __init__ (line 30) | def __init__(self, size) -> None: method init (line 34) | def init(self): method all_gather (line 39) | def all_gather(self): class TestAllGatherActorV2 (line 49) | class TestAllGatherActorV2(Worker): method __init__ (line 50) | def __init__(self, size) -> None: method all_gather (line 58) | def all_gather(self): function test_all_gather_torch (line 67) | def test_all_gather_torch(): function test_all_gather_torch_v2 (line 91) | def test_all_gather_torch_v2(): FILE: verl_distillation/tests/special_distributed/test_fsdp_ckpt.py function create_random_input_ids (line 30) | def create_random_input_ids(batch_size, seq_len, vocab_size): function test_fsdp_ckpt (line 47) | def test_fsdp_ckpt(strategy="fsdp"): FILE: verl_distillation/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: verl_distillation/tests/special_distributed/test_tensor_dict.py function test_all_gather_data_proto (line 27) | def test_all_gather_data_proto(): function test_vocab_parallel_entropy (line 58) | def test_vocab_parallel_entropy(): FILE: verl_distillation/tests/special_e2e/check_custom_rwd_fn.py function check_congratulations_in_file (line 18) | def check_congratulations_in_file(output_file): FILE: verl_distillation/tests/special_e2e/check_results.py function extract_reward_from_line (line 20) | def extract_reward_from_line(line): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/tests/special_e2e/sft/test_sp_loss_match.py function test_trainer_forward_consistency (line 24) | def test_trainer_forward_consistency(trainer: FSDPSFTTrainer, total_step... function create_trainer (line 90) | def create_trainer(config): function main (line 132) | def main(config): function hydra_entry (line 147) | def hydra_entry(cfg: DictConfig) -> None: FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/tests/special_sanity/check_license.py function get_py_files (line 41) | def get_py_files(path_arg: Path) -> Iterable[Path]: FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/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 85) | def check_file( function main (line 114) | def main() -> None: FILE: verl_distillation/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: verl_distillation/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: verl_distillation/tests/special_standalone/test_memory_buffers.py function test_memory_buffers (line 26) | def test_memory_buffers(): FILE: verl_distillation/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: verl_distillation/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_serialize_deserialize_single_tensor (line 782) | def test_serialize_deserialize_single_tensor(): function test_serialize_deserialize_tensordict_regular_tensors (line 799) | def test_serialize_deserialize_tensordict_regular_tensors(): function test_serialize_deserialize_tensordict_nested_tensors (line 828) | def test_serialize_deserialize_tensordict_nested_tensors(): function test_serialize_deserialize_tensordict_mixed_types (line 881) | def test_serialize_deserialize_tensordict_mixed_types(): function test_serialize_deserialize_tensordict_with_device (line 966) | def test_serialize_deserialize_tensordict_with_device(): FILE: verl_distillation/tests/test_protocol_v2_on_cpu.py function test_union_tensor_dict (line 29) | def test_union_tensor_dict(): function test_tensor_dict_constructor (line 66) | def test_tensor_dict_constructor(): function test_index_select_tensor_dict (line 91) | def test_index_select_tensor_dict(): function test_tensordict_with_images (line 130) | def test_tensordict_with_images(): function test_tensordict_with_packing (line 158) | def test_tensordict_with_packing(): function test_tensordict_eq (line 184) | def test_tensordict_eq(): function test_tensor_dict_make_iterator (line 247) | def test_tensor_dict_make_iterator(): function test_reorder (line 279) | def test_reorder(): function test_chunk_concat (line 292) | def test_chunk_concat(): function test_pop (line 320) | def test_pop(): function test_repeat (line 334) | def test_repeat(): function test_dataproto_pad_unpad (line 359) | def test_dataproto_pad_unpad(): function test_torch_save_data_proto (line 410) | def test_torch_save_data_proto(): function test_len (line 428) | def test_len(): function test_dataproto_index (line 445) | def test_dataproto_index(): function test_select (line 505) | def test_select(): function test_dataproto_no_batch (line 518) | def test_dataproto_no_batch(): function test_sample_level_repeat (line 529) | def test_sample_level_repeat(): function test_dataproto_chunk_after_index (line 555) | def test_dataproto_chunk_after_index(): FILE: verl_distillation/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: verl_distillation/tests/trainer/config/test_legacy_config_on_cpu.py class TestConfigComparison (line 35) | class TestConfigComparison(unittest.TestCase): method _compare_configs_recursively (line 54) | def _compare_configs_recursively( method test_ppo_trainer_config_matches_legacy (line 110) | def test_ppo_trainer_config_matches_legacy(self): method test_ppo_megatron_trainer_config_matches_legacy (line 134) | def test_ppo_megatron_trainer_config_matches_legacy(self): method test_load_component (line 156) | def test_load_component(self): FILE: verl_distillation/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: verl_distillation/tests/trainer/ppo/test_metric_utils_on_cpu.py class TestReduceMetrics (line 37) | class TestReduceMetrics(unittest.TestCase): method test_reduce_metrics_basic (line 40) | def test_reduce_metrics_basic(self): method test_reduce_metrics_empty (line 51) | def test_reduce_metrics_empty(self): method test_reduce_metrics_single_value (line 60) | def test_reduce_metrics_single_value(self): class TestComputeDataMetrics (line 70) | class TestComputeDataMetrics(unittest.TestCase): method setUp (line 73) | def setUp(self): method test_compute_data_metrics_with_critic (line 98) | def test_compute_data_metrics_with_critic(self): method test_compute_data_metrics_without_critic (line 116) | def test_compute_data_metrics_without_critic(self): class TestComputeTimingMetrics (line 130) | class TestComputeTimingMetrics(unittest.TestCase): method setUp (line 133) | def setUp(self): method test_compute_timing_metrics (line 155) | def test_compute_timing_metrics(self, mock_compute_response_info): class TestComputeThroughputMetrics (line 181) | class TestComputeThroughputMetrics(unittest.TestCase): method setUp (line 184) | def setUp(self): method test_compute_throughout_metrics (line 192) | def test_compute_throughout_metrics(self): class TestBootstrapMetric (line 213) | class TestBootstrapMetric(unittest.TestCase): method test_bootstrap_metric_basic (line 216) | def test_bootstrap_metric_basic(self): method test_bootstrap_metric_empty (line 240) | def test_bootstrap_metric_empty(self): class TestCalcMajVal (line 246) | class TestCalcMajVal(unittest.TestCase): method test_calc_maj_val_basic (line 249) | def test_calc_maj_val_basic(self): method test_calc_maj_val_tie (line 262) | def test_calc_maj_val_tie(self): class TestProcessValidationMetrics (line 279) | class TestProcessValidationMetrics(unittest.TestCase): method test_process_validation_metrics_basic (line 282) | def test_process_validation_metrics_basic(self): method test_process_validation_metrics_with_pred (line 305) | def test_process_validation_metrics_with_pred(self): FILE: verl_distillation/tests/trainer/ppo/test_rollout_is.py function test_basic_rollout_is (line 37) | def test_basic_rollout_is(): function test_metrics_completeness (line 156) | def test_metrics_completeness(): function test_mismatch_metrics (line 216) | def test_mismatch_metrics(): function test_mask_mode (line 271) | def test_mask_mode(): FILE: verl_distillation/tests/trainer/ppo/test_rollout_is_integration.py class TestRolloutISIntegration (line 24) | class TestRolloutISIntegration: method sample_data (line 28) | def sample_data(self): method config_with_rollout_is (line 42) | def config_with_rollout_is(self): method test_policy_loss_with_rollout_is (line 56) | def test_policy_loss_with_rollout_is(self, sample_data, config_with_ro... method test_rollout_is_weights_computation (line 93) | def test_rollout_is_weights_computation(self, sample_data): method test_all_aggregation_levels (line 118) | def test_all_aggregation_levels(self, sample_data): method test_both_bounding_modes (line 134) | def test_both_bounding_modes(self, sample_data): method test_mismatch_metrics (line 151) | def test_mismatch_metrics(self, sample_data): method test_veto_mechanism (line 165) | def test_veto_mechanism(self): method test_metrics_only_mode (line 192) | def test_metrics_only_mode(self, sample_data, config_with_rollout_is): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/tests/utils/dataset/test_multiturn_sft_dataset_on_cpu.py function test_multiturn_sft_dataset (line 27) | def test_multiturn_sft_dataset(): FILE: verl_distillation/tests/utils/dataset/test_rl_collate_fn_on_cpu.py function test_rl_collate_fn (line 17) | def test_rl_collate_fn(): FILE: verl_distillation/tests/utils/dataset/test_rl_dataset_on_cpu.py function get_gsm8k_data (line 21) | def get_gsm8k_data(): function test_rl_dataset (line 29) | def test_rl_dataset(): function test_rl_dataset_with_max_samples (line 69) | def test_rl_dataset_with_max_samples(): function test_image_rl_data (line 88) | def test_image_rl_data(): FILE: verl_distillation/tests/utils/dataset/test_sft_dataset_on_cpu.py function get_gsm8k_data (line 20) | def get_gsm8k_data(): function test_sft_cot_dataset (line 27) | def test_sft_cot_dataset(): function test_sft_dataset (line 52) | def test_sft_dataset(): function test_sft_dataset_with_max_samples (line 77) | def test_sft_dataset_with_max_samples(): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/tests/utils/reward_score/test_sandbox_on_cpu.py function test_parallelism (line 96) | 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 173) | def test_check_correctness(): function test_prime_math (line 181) | def test_prime_math(): FILE: verl_distillation/tests/utils/test_activation_offload.py function create_random_input_ids (line 32) | def create_random_input_ids(batch_size, seq_len, vocab_size): function _fsdp_activation_offloading_test (line 49) | def _fsdp_activation_offloading_test(rank, world_size, rendezvous_file, ... function test_activation_offloading (line 163) | def test_activation_offloading(world_size, strategy, tmp_path): FILE: verl_distillation/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: verl_distillation/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 234) | def test_flops_counter(config_type: str): FILE: verl_distillation/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: verl_distillation/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(): FILE: verl_distillation/tests/utils/test_import_utils_on_cpu.py function test_load_extern_type_class (line 25) | def test_load_extern_type_class(): function test_load_extern_type_function (line 42) | def test_load_extern_type_function(): function test_load_extern_type_constant (line 55) | def test_load_extern_type_constant(): function test_load_extern_type_nonexistent_file (line 64) | def test_load_extern_type_nonexistent_file(): function test_load_extern_type_nonexistent_type (line 70) | def test_load_extern_type_nonexistent_type(): function test_load_extern_type_none_path (line 76) | def test_load_extern_type_none_path(): function test_load_extern_type_invalid_module (line 82) | def test_load_extern_type_invalid_module(): FILE: verl_distillation/tests/utils/test_linear_cross_entropy.py function run_torch_entropy (line 48) | def run_torch_entropy( function run_verl_original_entropy (line 64) | def run_verl_original_entropy( function run_verl_torch_fused_entropy (line 82) | def run_verl_torch_fused_entropy( class TestLinearCrossEntropy (line 99) | class TestLinearCrossEntropy: method __init__ (line 100) | def __init__(self, test_case_idx: int, temperature: float = 1.5) -> None: method cleanup (line 104) | def cleanup(self): method generate_hyper (line 112) | def generate_hyper(self): method generate_forward_inputs (line 145) | def generate_forward_inputs(self): method generate_backward_inputs (line 159) | def generate_backward_inputs(self): method verify_correctness (line 164) | def verify_correctness(self, iterations=5): method check_storage (line 322) | def check_storage(self, method_name, run_forward): method check_storage_all (line 344) | def check_storage_all(self): FILE: verl_distillation/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: verl_distillation/tests/utils/test_model_on_cpu.py function test_update_model_config (line 30) | def test_update_model_config(override_kwargs): FILE: verl_distillation/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 52) | def test_frozen_config(self): class TestNsightSystemsProfiler (line 74) | class TestNsightSystemsProfiler(unittest.TestCase): method setUp (line 85) | def setUp(self): method test_initialization (line 90) | def test_initialization(self): method test_start_stop_profiling (line 94) | def test_start_stop_profiling(self): method test_annotate_decorator (line 119) | def test_annotate_decorator(self): FILE: verl_distillation/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: verl_distillation/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_rollout_trace_with_real_weave_backend (line 135) | async def test_rollout_trace_with_real_weave_backend(): function test_rollout_trace_with_real_mlflow_backend (line 156) | async def test_rollout_trace_with_real_mlflow_backend(): FILE: verl_distillation/tests/utils/test_seqlen_balancing.py function test_seqlen_balancing (line 30) | def test_seqlen_balancing(): function test_dynamic_batch (line 49) | def test_dynamic_batch(): function _worker (line 63) | def _worker(rank, world_size, init_method, max_token_len, use_same_dp, m... function test_dataproto_split_uneven (line 127) | def test_dataproto_split_uneven(): function test_seqlen_balancing_distributed_params (line 181) | def test_seqlen_balancing_distributed_params(tmp_path): FILE: verl_distillation/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: verl_distillation/tests/utils/test_special_mstx_profile.py class TestNPUProfilerInitialization (line 22) | class TestNPUProfilerInitialization(unittest.TestCase): method setUp (line 23) | def setUp(self): method test_init_with_default_config (line 26) | def test_init_with_default_config(self): method test_init_with_disabled_config (line 32) | 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 165) | def test_annotate_when_profiler_disabled(self): method test_annotate_when_this_step_disabled (line 188) | def test_annotate_when_this_step_disabled(self): method test_annotate_discrete_mode_enabled (line 211) | def test_annotate_discrete_mode_enabled(self): method test_annotate_with_default_message (line 249) | def test_annotate_with_default_message(self): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/tests/utils/test_torch_functional.py function _worker_mean (line 25) | def _worker_mean(rank: int, world_size: int, rendezvous_file: str): function test_masked_mean (line 63) | def test_masked_mean(value, mask, gt): function test_distributed_mean_max_min_std (line 70) | def test_distributed_mean_max_min_std(world_size, tmp_path): function _worker_mask (line 82) | def _worker_mask(rank: int, world_size: int, rendezvous_file: str): function test_distributed_masked_mean (line 108) | def test_distributed_masked_mean(world_size, tmp_path): FILE: verl_distillation/tests/workers/actor/test_special_dp_actor.py class MockTransformerModel (line 27) | class MockTransformerModel(nn.Module): method __init__ (line 30) | def __init__(self, vocab_size=1000, hidden_size=64): method forward (line 40) | def forward(self, input_ids, attention_mask=None, position_ids=None, u... class TestDataParallelPPOActor (line 54) | class TestDataParallelPPOActor(unittest.TestCase): method setUpClass (line 58) | def setUpClass(cls): method setUp (line 74) | def setUp(self): method tearDownClass (line 98) | def tearDownClass(cls): method _create_test_data_for_compute_log_prob (line 103) | def _create_test_data_for_compute_log_prob(self): method _create_test_data_for_update_policy (line 130) | def _create_test_data_for_update_policy(self): method test_compute_log_prob (line 163) | def test_compute_log_prob(self): method test_compute_log_prob_without_entropy (line 181) | def test_compute_log_prob_without_entropy(self): method test_update_policy (line 196) | def test_update_policy(self): method test_dataparallelppoactor_initialization (line 220) | def test_dataparallelppoactor_initialization(self): method test_dataparallelppoactor_with_qwen3_model (line 230) | def test_dataparallelppoactor_with_qwen3_model(self): FILE: verl_distillation/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 64) | def test_actor_config_from_yaml(self): method test_fsdp_actor_config_from_yaml (line 76) | def test_fsdp_actor_config_from_yaml(self): method test_megatron_actor_config_from_yaml (line 88) | def test_megatron_actor_config_from_yaml(self): method test_config_get_method (line 100) | def test_config_get_method(self): method test_config_dict_like_access (line 120) | def test_config_dict_like_access(self): method test_frozen_fields_modification_raises_exception (line 143) | def test_frozen_fields_modification_raises_exception(self): method test_actor_config_validation_exceptions (line 166) | def test_actor_config_validation_exceptions(self): method test_fsdp_actor_config_validation_exceptions (line 208) | def test_fsdp_actor_config_validation_exceptions(self): method test_actor_config_validate_method_exceptions (line 223) | def test_actor_config_validate_method_exceptions(self): FILE: verl_distillation/tests/workers/config/test_critic_config_on_cpu.py class TestCriticConfig (line 33) | class TestCriticConfig: method config_dir (line 37) | def config_dir(self): method test_megatron_critic_config_instantiation_from_yaml (line 41) | def test_megatron_critic_config_instantiation_from_yaml(self, config_d... method test_fsdp_critic_config_instantiation_from_yaml (line 73) | def test_fsdp_critic_config_instantiation_from_yaml(self, config_dir): method test_config_inheritance_hierarchy (line 106) | def test_config_inheritance_hierarchy(self): method test_config_dict_interface (line 121) | def test_config_dict_interface(self): method test_frozen_fields_immutability (line 138) | def test_frozen_fields_immutability(self): method test_batch_size_fields_modifiable (line 161) | def test_batch_size_fields_modifiable(self): method test_profiler_config_type_validation (line 182) | def test_profiler_config_type_validation(self): method test_critic_config_validation_logic (line 210) | def test_critic_config_validation_logic(self): method test_micro_batch_size_divisibility_validation (line 253) | def test_micro_batch_size_divisibility_validation(self): method test_fsdp_sequence_parallelism_validation (line 278) | def test_fsdp_sequence_parallelism_validation(self): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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 87) | def tearDown(self): method _create_test_data_for_compute_values (line 93) | def _create_test_data_for_compute_values(self, batch_size=2, seq_len=1... method _create_test_data_for_update_critic (line 118) | def _create_test_data_for_update_critic(self, batch_size=2, seq_len=10... method test_init_model (line 148) | def test_init_model(self): method test_compute_values (line 158) | def test_compute_values(self): method test_update_critic (line 176) | def test_update_critic(self): method test_critic_attn_implementation_override_functionality (line 201) | def test_critic_attn_implementation_override_functionality(self, mock_... method test_critic_model_config_structure (line 259) | def test_critic_model_config_structure(self): method test_critic_hydra_config_compatibility (line 289) | def test_critic_hydra_config_compatibility(self): method test_critic_backward_compatibility (line 309) | def test_critic_backward_compatibility(self): method test_critic_and_actor_independent_configuration (line 332) | def test_critic_and_actor_independent_configuration(self): FILE: verl_distillation/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: verl_distillation/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: verl_distillation/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: verl_distillation/tests/workers/rollout/rollout_vllm/run_fsdp_vllm.py function main (line 30) | def main(): FILE: verl_distillation/tests/workers/rollout/rollout_vllm/test_vllm_model_rope_scaling.py function test_vllm_rollout_with_yarn_position_embeddings (line 32) | def test_vllm_rollout_with_yarn_position_embeddings(): function prepare_input_dataproto (line 104) | def prepare_input_dataproto(tokenizer, config, validate, do_sample=False): FILE: verl_distillation/tests/workers/rollout/rollout_vllm/test_vllm_spmd.py function levenshtein (line 29) | def levenshtein(s1, s2): function are_lists_similar (line 50) | def are_lists_similar(a, b): function test_vllm_spmd (line 72) | def test_vllm_spmd(): FILE: verl_distillation/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: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_mcp_tools.py function get_search_messages (line 52) | def get_search_messages(): class TestRolloutWithMCPSearchTools (line 120) | class TestRolloutWithMCPSearchTools: method qwen_tokenizer (line 124) | def qwen_tokenizer(self): method qwen_model_config (line 131) | def qwen_model_config(self): method search_data (line 136) | def search_data(self, qwen_tokenizer): method search_rollout_config (line 150) | def search_rollout_config(self): method search_data_proto (line 162) | def search_data_proto(self, search_data, qwen_tokenizer): method mock_rollout (line 196) | def mock_rollout(self, search_rollout_config, qwen_tokenizer, qwen_mod... method test_tools_registration (line 291) | def test_tools_registration(self, mock_rollout): method test_rollout_req_creation (line 300) | def test_rollout_req_creation(self, mock_rollout, search_data_proto): method test_over_size_case (line 306) | def test_over_size_case(self, mock_rollout, search_data_proto, search_... method test_tool_call_basic_case (line 351) | def test_tool_call_basic_case(self, mock_execute, mock_rollout, search... method test_tool_call_batch_case (line 406) | def test_tool_call_batch_case(self, mock_execute, mock_rollout, search... FILE: verl_distillation/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: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_search_tools.py function get_search_messages (line 56) | def get_search_messages(): class TestRolloutWithSearchTools (line 92) | class TestRolloutWithSearchTools: method qwen_tokenizer (line 96) | def qwen_tokenizer(self): method qwen_model_config (line 103) | def qwen_model_config(self): method search_data (line 108) | def search_data(self, qwen_tokenizer): method search_rollout_config (line 122) | def search_rollout_config(self): method search_data_proto (line 134) | def search_data_proto(self, search_data, qwen_tokenizer): method mock_rollout (line 171) | def mock_rollout(self, search_rollout_config, qwen_tokenizer, qwen_mod... method test_tools_registration (line 197) | def test_tools_registration( method test_rollout_req_creation (line 218) | def test_rollout_req_creation( method test_over_size_case (line 261) | def test_over_size_case(self, mock_rollout, search_data_proto, search_... method test_tool_call_basic_case (line 304) | def test_tool_call_basic_case(self, mock_execute, mock_rollout, search... method test_tool_call_batch_case (line 362) | def test_tool_call_batch_case(self, mock_execute, mock_rollout, search... FILE: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_sf_tools.py function get_sandbox_fusion_messages (line 46) | def get_sandbox_fusion_messages(): function skip_if_valid_sandbox (line 136) | def skip_if_valid_sandbox(url): class TestRolloutWithTools (line 148) | class TestRolloutWithTools: method qwen_tokenizer (line 152) | def qwen_tokenizer(self): method qwen_model_config (line 159) | def qwen_model_config(self): method sandbox_fusion_data (line 164) | def sandbox_fusion_data(self, qwen_tokenizer): method sandbox_fusion_rollout_config (line 178) | def sandbox_fusion_rollout_config(self): method sandbox_data_proto (line 190) | def sandbox_data_proto(self, sandbox_fusion_data, qwen_tokenizer): method mock_rollout (line 223) | def mock_rollout(self, sandbox_fusion_rollout_config, qwen_tokenizer, ... method test_tools_registration (line 245) | def test_tools_registration(self, mock_rollout): method test_rollout_req_creation (line 254) | def test_rollout_req_creation(self, mock_rollout, sandbox_data_proto): method test_over_size_case (line 281) | def test_over_size_case(self, mock_rollout, sandbox_data_proto, sandbo... method test_tool_call_basic_case (line 327) | def test_tool_call_basic_case(self, mock_rollout, sandbox_data_proto, ... method test_tool_call_batch_case (line 380) | def test_tool_call_batch_case(self, mock_rollout, sandbox_data_proto, ... method test_sampling_params_functionality (line 447) | def test_sampling_params_functionality(self, mock_rollout): class RayMultiProcessTestCase (line 464) | class RayMultiProcessTestCase(MultiProcessTestCase): method setUp (line 465) | def setUp(self): method tearDown (line 471) | def tearDown(self): class TestActor (line 477) | class TestActor: method __init__ (line 478) | def __init__(self, rank, world_size): method record_rank (line 484) | def record_rank(self, rank): method get_rank (line 487) | def get_rank(self): method ping (line 490) | def ping(self): method record_execution_time (line 493) | def record_execution_time(self, time): method get_time (line 496) | def get_time(self, timeout): method verify_rank (line 510) | def verify_rank(self): class TestRayGlobalActorCase (line 528) | class TestRayGlobalActorCase(RayMultiProcessTestCase): method world_size (line 530) | def world_size(self) -> int: method test_basic_multi_process_init (line 534) | def test_basic_multi_process_init(self): class TestSingleNodeRateLimiterCase (line 554) | class TestSingleNodeRateLimiterCase(RayMultiProcessTestCase): method world_size (line 556) | def world_size(self) -> int: method test_rate_limiter (line 559) | def test_rate_limiter(self): method test_rotten_execution (line 592) | def test_rotten_execution(self): class TestMultiNodeRateLimiterCase (line 620) | class TestMultiNodeRateLimiterCase(RayMultiProcessTestCase): method world_size (line 622) | def world_size(self) -> int: method test_rate_limiter (line 625) | def test_rate_limiter(self): FILE: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_w_interaction.py function test_async_sglang_rollout_w_interaction (line 40) | def test_async_sglang_rollout_w_interaction(): FILE: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_w_tools.py function test_async_sglang_rollout_w_tool (line 40) | def test_async_sglang_rollout_w_tool(): FILE: verl_distillation/tests/workers/rollout/test_sglang_async_rollout_w_tools_token_out.py function test_async_sglang_rollout_w_tool (line 40) | def test_async_sglang_rollout_w_tool(): FILE: verl_distillation/tests/workers/rollout/test_sglang_multi_interaction.py class MockInteraction (line 39) | class MockInteraction(BaseInteraction): method __init__ (line 42) | def __init__(self, config): method start_interaction (line 46) | async def start_interaction(self, instance_id=None, **kwargs): method generate_response (line 52) | async def generate_response(self, instance_id, messages, **kwargs): function create_mock_config_with_multi_interactions (line 56) | def create_mock_config_with_multi_interactions(): function setup_distributed (line 109) | def setup_distributed(): class TestSGLangMultiInteraction (line 115) | class TestSGLangMultiInteraction: method test_initialize_multiple_interactions (line 118) | def test_initialize_multiple_interactions(self): method test_interaction_selection_by_name (line 173) | def test_interaction_selection_by_name(self): method test_fallback_to_default_interaction (line 244) | def test_fallback_to_default_interaction(self): method test_error_on_missing_interaction (line 323) | def test_error_on_missing_interaction(self): method test_backward_compatibility_no_interaction_config (line 366) | def test_backward_compatibility_no_interaction_config(self): FILE: verl_distillation/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: verl_distillation/tests/workers/rollout/test_sglang_spmd.py function _pre_process_inputs (line 38) | def _pre_process_inputs(pad_token_id, prompt_token_ids: torch.Tensor): function test_sglang_spmd (line 44) | def test_sglang_spmd(): FILE: verl_distillation/tests/workers/rollout/utils_sglang.py function levenshtein (line 26) | def levenshtein(s1, s2): function are_lists_similar (line 40) | def are_lists_similar(a, b, threshold=10): function initialize_global_process_group (line 55) | def initialize_global_process_group(timeout_second=36000, spmd=False): function clean_torchelastic_env (line 82) | def clean_torchelastic_env(): function load_tokenizer_and_model (line 88) | def load_tokenizer_and_model(local_model_path, dtype="bfloat16"): function prepare_inputs (line 95) | def prepare_inputs(tokenizer, prompts, max_prompt_length): function generate_hf_output (line 107) | def generate_hf_output(model, input_ids, attention_mask, tokenizer, max_... function get_rollout_config (line 125) | def get_rollout_config( FILE: verl_distillation/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: verl_distillation/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_distillation/verl/__init__.py function _sync_all_patch (line 90) | def _sync_all_patch(self): FILE: verl_distillation/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_distillation/verl/experimental/agent_loop/agent_loop.py class AsyncLLMServerManager (line 47) | class AsyncLLMServerManager: method __init__ (line 54) | def __init__(self, config: DictConfig, server_handles: list[ray.actor.... method _choose_server (line 73) | def _choose_server(self, request_id: str) -> ray.actor.ActorHandle: method generate (line 85) | async def generate( class AgentLoopMetrics (line 113) | class AgentLoopMetrics(BaseModel): class AgentLoopOutput (line 120) | class AgentLoopOutput(BaseModel): class _InternalAgentLoopOutput (line 145) | class _InternalAgentLoopOutput(AgentLoopOutput): class _DummyConfig (line 173) | class _DummyConfig: method __init__ (line 174) | def __init__(self, config: DictConfig) -> None: class AgentLoopBase (line 178) | class AgentLoopBase(ABC): method __init__ (line 184) | def __init__( method init_class (line 208) | def init_class(cls, config: DictConfig, tokenizer: AutoTokenizer, proc... method run (line 222) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... function register (line 243) | def register(agent_name: str): class AgentLoopWorkerBase (line 254) | class AgentLoopWorkerBase: method __init__ (line 257) | def __init__( method generate_sequences (line 309) | async def generate_sequences(self, batch: DataProto) -> DataProto: method _run_agent_loop (line 366) | async def _run_agent_loop( method _postprocess (line 555) | def _postprocess(self, inputs: list[_InternalAgentLoopOutput]) -> Data... method create_transferqueue_client (line 624) | def create_transferqueue_client(self, controller_infos, storage_infos,... class AgentLoopWorker (line 638) | class AgentLoopWorker(AgentLoopWorkerBase): method __init__ (line 641) | def __init__( function get_trajectory_info (line 653) | async def get_trajectory_info(step, index, validate): class AgentLoopManager (line 675) | class AgentLoopManager: method __init__ (line 678) | def __init__(self, config: DictConfig, worker_group: RayWorkerGroup = ... method _initialize_llm_servers (line 708) | def _initialize_llm_servers(self): method _init_agent_loop_workers (line 739) | def _init_agent_loop_workers(self): method generate_sequences (line 756) | def generate_sequences(self, prompts: DataProto) -> DataProto: method _performance_metrics (line 791) | def _performance_metrics(self, metrics: list[list[dict[str, str]]], ou... method wake_up (line 819) | def wake_up(self): method sleep (line 823) | def sleep(self): method _run_all (line 827) | def _run_all(self, tasks: list[asyncio.Task]): FILE: verl_distillation/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 37) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... FILE: verl_distillation/verl/experimental/agent_loop/tool_agent_loop.py class AgentState (line 40) | class AgentState(Enum): class AgentData (line 48) | class AgentData: method __init__ (line 51) | def __init__( class ToolAgentLoop (line 85) | class ToolAgentLoop(AgentLoopBase): method init_class (line 87) | def init_class(cls, config, tokenizer, processor, **kwargs): method run (line 123) | async def run(self, sampling_params: dict[str, Any], **kwargs) -> Agen... method _handle_pending_state (line 193) | async def _handle_pending_state(self, agent_data: AgentData, sampling_... method _handle_generating_state (line 221) | async def _handle_generating_state( method _handle_processing_tools_state (line 290) | async def _handle_processing_tools_state(self, agent_data: AgentData) ... method _handle_interacting_state (line 407) | async def _handle_interacting_state(self, agent_data: AgentData) -> Ag... method _call_tool (line 458) | async def _call_tool( method _initialize_interactions (line 507) | def _initialize_interactions(cls, interaction_config_file): FILE: verl_distillation/verl/experimental/agent_loop/tool_parser.py class FunctionCall (line 29) | class FunctionCall(BaseModel): class ToolParser (line 42) | class ToolParser(ABC): method __init__ (line 45) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 49) | async def extract_tool_calls(self, responses_ids: list[int]) -> tuple[... method get_tool_parser (line 61) | def get_tool_parser(cls, name: str, tokenizer): method register (line 67) | def register(cls, name: str): class HermesToolParser (line 76) | class HermesToolParser(ToolParser): method __init__ (line 79) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 87) | async def extract_tool_calls(self, responses_ids: list[int]) -> tuple[... class GptOssToolParser (line 110) | class GptOssToolParser(ToolParser): method __init__ (line 119) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 134) | async def extract_tool_calls(self, responses_ids: list[int]) -> tuple[... FILE: verl_distillation/verl/experimental/agent_loop/utils.py function format_gpt_oss_tool_response_manually (line 18) | def format_gpt_oss_tool_response_manually(tool_response: str, tool_call_... function add_generation_prompt_for_gpt_oss (line 30) | def add_generation_prompt_for_gpt_oss(message_content: str) -> str: FILE: verl_distillation/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_distillation/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_distillation/verl/experimental/reward/reward_loop/base.py class RewardLoopManagerBase (line 29) | class RewardLoopManagerBase(ABC): method __init__ (line 32) | def __init__(self, config: DictConfig, tokenizer: AutoTokenizer): method init_class (line 45) | def init_class(cls, config: DictConfig, tokenizer: AutoTokenizer): method run_single (line 52) | async def run_single(self, data: DataProto): FILE: verl_distillation/verl/experimental/reward/reward_loop/dapo.py class DAPORewardLoopManager (line 24) | class DAPORewardLoopManager(RewardLoopManagerBase): method __init__ (line 27) | def __init__(self, config, tokenizer, compute_score=None, reward_route... method run_single (line 47) | async def run_single(self, data: DataProto) -> dict: FILE: verl_distillation/verl/experimental/reward/reward_loop/naive.py class NaiveRewardLoopManager (line 24) | class NaiveRewardLoopManager(RewardLoopManagerBase): method __init__ (line 27) | def __init__(self, config, tokenizer, compute_score=None, reward_route... method run_single (line 34) | async def run_single(self, data: DataProto) -> dict: FILE: verl_distillation/verl/experimental/reward/reward_loop/registry.py function register (line 24) | def register(name: str) -> Callable[[type[RewardLoopManagerBase]], type[... function get_reward_loop_manager_cls (line 43) | def get_reward_loop_manager_cls(name: str) -> type[RewardLoopManagerBase]: FILE: verl_distillation/verl/experimental/reward/reward_manager.py class RewardManagerWorker (line 32) | class RewardManagerWorker: method __init__ (line 33) | def __init__(self, config: DictConfig, reward_router_address: str = No... method _init_reward_fn (line 38) | def _init_reward_fn(self): method compute_score (line 51) | async def compute_score(self, data: DataProto) -> DataProto: FILE: verl_distillation/verl/experimental/reward/reward_model.py class RewardModelManager (line 32) | class RewardModelManager: method __init__ (line 35) | def __init__(self, config: RewardModelConfig, worker_group: RayWorkerG... method _initialize_llm_servers (line 50) | def _initialize_llm_servers(self): method _initialize_router (line 84) | def _initialize_router(self): method get_router_address (line 94) | def get_router_address(self): method wake_up (line 97) | def wake_up(self): method sleep (line 101) | def sleep(self): method _run_all (line 105) | def _run_all(self, tasks: list[asyncio.Task]): method chat_complete (line 111) | async def chat_complete(self, chat_complete_request: dict): method generate_sequences (line 125) | def generate_sequences(self, prompts: DataProto, sampling_params: dict): FILE: verl_distillation/verl/experimental/reward/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_distillation/verl/experimental/reward/router/sglang_router.py function launch_router_process (line 30) | def launch_router_process( FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/model_merger/__main__.py function main (line 52) | def main(): FILE: verl_distillation/verl/model_merger/base_model_merger.py function parse_args (line 34) | def parse_args(): class ModelMergerConfig (line 84) | class ModelMergerConfig: method __post_init__ (line 119) | def __post_init__(self): function generate_config_from_args (line 127) | def generate_config_from_args(args: argparse.Namespace) -> ModelMergerCo... class BaseModelMerger (line 162) | class BaseModelMerger(ABC): method __init__ (line 184) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 191) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 218) | def patch_model_generation_config(self, model): method save_lora_adapter (line 235) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 292) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 319) | def upload_to_huggingface(self): method merge_and_save (line 357) | def merge_and_save(self): method cleanup (line 361) | def cleanup(self): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/models/llama/megatron/layers/parallel_rmsnorm.py class ParallelLlamaRMSNorm (line 26) | class ParallelLlamaRMSNorm(nn.Module): method __init__ (line 27) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 41) | def forward(self, hidden_states): FILE: verl_distillation/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_distillation/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 365) | def hf_to_mcore_config_qwen2_5_vl( function hf_to_mcore_config_llama4 (line 384) | def hf_to_mcore_config_llama4( function mapping_string_to_attn_backend (line 391) | def mapping_string_to_attn_backend(args: dict) -> dict: FILE: verl_distillation/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_distillation/verl/models/mcore/model_forward.py function model_forward_gen (line 28) | def model_forward_gen(vision_model: bool = False): function gptmodel_forward_no_padding (line 99) | def gptmodel_forward_no_padding( FILE: verl_distillation/verl/models/mcore/model_forward_1f1b_overlap.py function gptmodel_forward_1f1b_overlap (line 33) | def gptmodel_forward_1f1b_overlap( FILE: verl_distillation/verl/models/mcore/model_forward_fused.py function _get_patching_model (line 39) | def _get_patching_model(model: torch.nn.Module): function patch_fused_forward (line 51) | def patch_fused_forward(model: torch.nn.Module): function unpatch_fused_forward (line 59) | def unpatch_fused_forward(model: torch.nn.Module): function fused_forward_model_gen (line 65) | def fused_forward_model_gen(vision_model: bool = False): function _fused_GPTModel_forward (line 137) | def _fused_GPTModel_forward( FILE: verl_distillation/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_distillation/verl/models/mcore/patch_v012.py function apply_patch (line 20) | def apply_patch(): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/models/mcore/registry.py class SupportedModel (line 57) | class SupportedModel(Enum): function get_supported_model (line 169) | def get_supported_model(model_type: str) -> SupportedModel: function hf_to_mcore_config (line 179) | def hf_to_mcore_config( function init_mcore_model (line 197) | def init_mcore_model( function get_mcore_forward_fn (line 235) | def get_mcore_forward_fn(hf_config: PretrainedConfig) -> Callable: function get_mcore_forward_no_padding_fn (line 244) | def get_mcore_forward_no_padding_fn(hf_config: PretrainedConfig) -> Call... function get_mcore_forward_fused_fn (line 253) | def get_mcore_forward_fused_fn(hf_config: PretrainedConfig) -> Callable: function get_mcore_weight_converter (line 262) | def get_mcore_weight_converter(hf_config: PretrainedConfig, dtype: torch... FILE: verl_distillation/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_distillation/verl/models/mcore/util.py function preprocess_packed_seqs (line 23) | def preprocess_packed_seqs( function postprocess_packed_seqs (line 105) | def postprocess_packed_seqs( function preprocess_packed_seqs_no_padding (line 165) | def preprocess_packed_seqs_no_padding( function postprocess_packed_seqs_no_padding (line 247) | def postprocess_packed_seqs_no_padding( function remove_left_padding (line 311) | def remove_left_padding( function recover_left_padding (line 352) | def recover_left_padding( function postprocess_packed_seqs_for_dict_output (line 374) | def postprocess_packed_seqs_for_dict_output( FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/models/transformers/apertus.py function apertus_attn_forward (line 41) | def apertus_attn_forward( FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/models/transformers/monkey_patch.py function repeat_kv (line 37) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function _ulysses_flash_attention_forward (line 49) | def _ulysses_flash_attention_forward( function patch_vlm_for_ulysses_input_slicing (line 120) | def patch_vlm_for_ulysses_input_slicing(model_class: type): function patch_forward_with_backends (line 196) | def patch_forward_with_backends( function apply_monkey_patch (line 248) | def apply_monkey_patch( FILE: verl_distillation/verl/models/transformers/npu_patch.py function apply_rotary_pos_emb_flashatt_qwen2_5_vl_npu (line 37) | def apply_rotary_pos_emb_flashatt_qwen2_5_vl_npu( function rms_norm_forward (line 54) | def rms_norm_forward(self, x): function silu_forward (line 58) | def silu_forward(self, hidden_state): function apply_rotary_pos_emb_qwen3_npu (line 64) | def apply_rotary_pos_emb_qwen3_npu(q, k, cos, sin, position_ids=None, un... class GmmFunction (line 72) | class GmmFunction(torch.autograd.Function): method forward (line 74) | def forward(ctx, x, weight, group_list, split_size): method backward (line 83) | def backward(ctx, grad_outputs): function moe_block_forward (line 99) | def moe_block_forward(self, hidden_states: torch.Tensor) -> torch.Tensor: function _check_and_enable_flash_attn_2 (line 169) | def _check_and_enable_flash_attn_2( FILE: verl_distillation/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_distillation/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_distillation/verl/models/transformers/qwen3_vl.py function get_rope_index (line 30) | def get_rope_index( function _get_input_embeds (line 136) | def _get_input_embeds( class Qwen3VLCausalLMOutputForPPO (line 229) | class Qwen3VLCausalLMOutputForPPO(Qwen3VLCausalLMOutputWithPast): function qwen3_vl_base_forward (line 234) | def qwen3_vl_base_forward( function forward_with_normal_backend (line 254) | def forward_with_normal_backend( function forward_with_torch_backend (line 271) | def forward_with_torch_backend( function forward_with_triton_backend (line 305) | def forward_with_triton_backend( FILE: verl_distillation/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_distillation/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 list_of_dict_to_dict_of_list (line 201) | def list_of_dict_to_dict_of_list(list_of_dict: list[dict]): function fold_batch_dim (line 213) | def fold_batch_dim(data: "DataProto", new_batch_size): function unfold_batch_dim (line 233) | def unfold_batch_dim(data: "DataProto", batch_dims=2): function serialize_single_tensor (line 252) | def serialize_single_tensor(obj: torch.Tensor) -> tuple[str, tuple[int, ... function serialize_tensordict (line 258) | def serialize_tensordict(batch: TensorDict) -> tuple[tuple[int, ...], Op... function deserialize_single_tensor (line 273) | def deserialize_single_tensor(arr: Any) -> torch.Tensor: function deserialize_tensordict (line 286) | def deserialize_tensordict(arr: Any) -> TensorDict: function collate_fn (line 307) | def collate_fn(x: list["DataProtoItem"]): class DataProtoItem (line 321) | class DataProtoItem: class DataProto (line 329) | class DataProto: method __post_init__ (line 341) | def __post_init__(self): method __len__ (line 345) | def __len__(self): method __getitem__ (line 354) | def __getitem__(self, item): method __getstate__ (line 388) | def __getstate__(self): method __setstate__ (line 411) | def __setstate__(self, data): method save_to_disk (line 433) | def save_to_disk(self, filepath): method load_from_disk (line 438) | def load_from_disk(filepath) -> "DataProto": method print_size (line 443) | def print_size(self, prefix=""): method check_consistency (line 461) | def check_consistency(self): method from_single_dict (line 487) | def from_single_dict(cls, data: dict[str, torch.Tensor | np.ndarray], ... method from_dict (line 503) | def from_dict( method from_tensordict (line 553) | def from_tensordict( method to (line 593) | def to(self, device) -> "DataProto": method select (line 607) | def select(self, batch_keys=None, non_tensor_batch_keys=None, meta_inf... method select_idxs (line 642) | def select_idxs(self, idxs): method slice (line 682) | def slice(self, start=None, end=None, step=None): method pop (line 728) | def pop(self, batch_keys=None, non_tensor_batch_keys=None, meta_info_k... method rename (line 761) | def rename(self, old_keys=None, new_keys=None) -> "DataProto": method union (line 788) | def union(self, other: "DataProto") -> "DataProto": method make_iterator (line 807) | def make_iterator(self, mini_batch_size, epochs, seed=None, dataloader... method is_padding_enabled (line 847) | def is_padding_enabled(self): method padding (line 856) | def padding(self, padding_size, padding_candidate=""): method chunk (line 871) | def chunk(self, chunks: int) -> list["DataProto"]: method split (line 912) | def split(self, split_size: int) -> list["DataProto"]: method concat (line 924) | def concat(data: list["DataProto"]) -> "DataProto": method reorder (line 970) | def reorder(self, indices): method repeat (line 978) | def repeat(self, repeat_times=2, interleave=True): method unfold_column_chunks (line 1022) | def unfold_column_chunks(self, n_split: int, split_keys: Optional[list... method sample_level_repeat (line 1061) | def sample_level_repeat(self, repeat_times): method to_tensordict (line 1109) | def to_tensordict(self) -> TensorDict: method get_data_info (line 1132) | def get_data_info(self) -> str: method _get_type_info (line 1159) | def _get_type_info(self, value): class DataProtoFuture (line 1178) | class DataProtoFuture: method concat (line 1197) | def concat(data: list[ray.ObjectRef]) -> "DataProtoFuture": method chunk (line 1201) | def chunk(self, chunks: int) -> list["DataProtoFuture"]: method get (line 1216) | def get(self): function all_gather_data_proto (line 1226) | def all_gather_data_proto(data: DataProto, process_group): FILE: verl_distillation/verl/single_controller/base/decorator.py class Dispatch (line 27) | class Dispatch(DynamicEnum): function init_predefined_dispatch_mode (line 39) | def init_predefined_dispatch_mode(): class Execute (line 51) | class Execute(DynamicEnum): function init_predefined_execute_mode (line 62) | def init_predefined_execute_mode(): function _split_args_kwargs_data_proto (line 72) | def _split_args_kwargs_data_proto(chunks, *args, **kwargs): function _split_args_kwargs_data_proto_with_auto_padding (line 88) | def _split_args_kwargs_data_proto_with_auto_padding(chunks, *args, **kwa... function dispatch_one_to_all (line 117) | def dispatch_one_to_all(worker_group, *args, **kwargs): function dummy_direct_rollout_call (line 123) | def dummy_direct_rollout_call(worker_group, *args, **kwargs): function dispatch_all_to_all (line 127) | def dispatch_all_to_all(worker_group, *args, **kwargs): function collect_all_to_all (line 131) | def collect_all_to_all(worker_group, output): function _concat_data_proto_or_future (line 135) | def _concat_data_proto_or_future(output: list): function dispatch_dp_compute (line 156) | def dispatch_dp_compute(worker_group, *args, **kwargs): function collect_dp_compute (line 167) | def collect_dp_compute(worker_group, output): function dispatch_dp_compute_data_proto (line 175) | def dispatch_dp_compute_data_proto(worker_group, *args, **kwargs): function dispatch_dp_compute_data_proto_with_func (line 188) | def dispatch_dp_compute_data_proto_with_func(worker_group, *args, **kwar... function collect_dp_compute_data_proto (line 199) | def collect_dp_compute_data_proto(worker_group, output): function dispatch_nd_compute (line 211) | def dispatch_nd_compute(dp_rank_mapping: list[int], dp_size, worker_grou... function collect_nd_compute (line 245) | def collect_nd_compute(collect_mask: list[bool], worker_group, output): function dispatch_nd_compute_dataproto (line 259) | def dispatch_nd_compute_dataproto(dp_rank_mapping: list[int], dp_size, w... function collect_nd_compute_dataproto (line 264) | def collect_nd_compute_dataproto(collect_mask: list[bool], worker_group,... function dispatch_lazy_compute_data_proto (line 277) | def dispatch_lazy_compute_data_proto(mesh_name, worker_group, *args, **k... function collect_lazy_compute_data_proto (line 293) | def collect_lazy_compute_data_proto(mesh_name, worker_group, *args, **kw... function make_nd_compute_dataproto_dispatch_fn (line 311) | def make_nd_compute_dataproto_dispatch_fn(mesh_name): function get_predefined_dispatch_fn (line 345) | def get_predefined_dispatch_fn(dispatch_mode): function register_dispatch_mode (line 349) | def register_dispatch_mode(dispatch_mode_name, dispatch_fn, collect_fn): function update_dispatch_mode (line 359) | def update_dispatch_mode(dispatch_mode, dispatch_fn, collect_fn): function get_predefined_execute_fn (line 368) | def get_predefined_execute_fn(execute_mode): function _check_dispatch_mode (line 380) | def _check_dispatch_mode(dispatch_mode): function _check_execute_mode (line 390) | def _check_execute_mode(execute_mode): function _materialize_futures (line 394) | def _materialize_futures(*args, **kwargs): function register (line 409) | def register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL... FILE: verl_distillation/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 create_transferqueue_client (line 134) | def create_transferqueue_client(self, controller_infos, storage_infos,... method env_keys (line 144) | def env_keys(cls): method __init__ (line 156) | def __init__(self, cuda_visible_devices=None) -> None: method get_fused_worker_by_name (line 197) | def get_fused_worker_by_name(self, worker_name: str): method _setup_env_cuda_visible_devices (line 206) | def _setup_env_cuda_visible_devices(self): method _configure_with_store (line 258) | def _configure_with_store(self, store: dict): method get_master_addr_port (line 274) | def get_master_addr_port(self): method get_cuda_visible_devices (line 278) | def get_cuda_visible_devices(self): method world_size (line 286) | def world_size(self): method rank (line 291) | def rank(self): method execute_with_func_generator (line 296) | def execute_with_func_generator(self, func, *args, **kwargs): method execute_func_rank_zero (line 311) | def execute_func_rank_zero(self, func, *args, **kwargs): FILE: verl_distillation/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_distillation/verl/single_controller/ray/base.py function get_random_string (line 33) | def get_random_string(length: int) -> str: function func_generator (line 41) | def func_generator(self, method_name, dispatch_fn, collect_fn, execute_f... function sort_placement_group_by_node_ip (line 62) | def sort_placement_group_by_node_ip(pgs: list[PlacementGroup]) -> list[P... function get_master_addr_port (line 83) | def get_master_addr_port() -> tuple[str, str]: class RayResourcePool (line 91) | class RayResourcePool(ResourcePool): method __init__ (line 92) | def __init__( method get_placement_groups (line 109) | def get_placement_groups(self, strategy="STRICT_PACK", name=None, devi... function extract_pg_from_exist (line 142) | def extract_pg_from_exist( function merge_resource_pool (line 168) | def merge_resource_pool(rp1: RayResourcePool, rp2: RayResourcePool) -> R... class RayClassWithInitArgs (line 182) | class RayClassWithInitArgs(ClassWithInitArgs): method __init__ (line 190) | def __init__(self, cls, *args, **kwargs) -> None: method set_additional_resource (line 196) | def set_additional_resource(self, additional_resource): method update_options (line 204) | def update_options(self, options: dict): method __call__ (line 212) | def __call__( class RayWorkerGroup (line 262) | class RayWorkerGroup(WorkerGroup): method __init__ (line 270) | def __init__( method _is_worker_alive (line 331) | def _is_worker_alive(self, worker: ray.actor.ActorHandle): method _init_with_detached_workers (line 343) | def _init_with_detached_workers(self, worker_names, worker_handles): method _get_master_addr_port (line 352) | def _get_master_addr_port(self, pg): method _init_with_resource_pool (line 362) | def _init_with_resource_pool(self, resource_pool, ray_cls_with_init, b... method worker_names (line 447) | def worker_names(self): method from_detached (line 451) | def from_detached( method spawn (line 479) | def spawn(self, prefix_set): method spawn_fused (line 514) | def spawn_fused(self, prefix_set): method fuse (line 531) | def fuse(self, prefix_set): method _execute_remote_single_worker (line 543) | def _execute_remote_single_worker(self, worker, method_name: str, *arg... method execute_rank_zero_sync (line 562) | def execute_rank_zero_sync(self, method_name: str, *args, **kwargs): method execute_rank_zero_async (line 575) | def execute_rank_zero_async(self, method_name: str, *args, **kwargs): method execute_rank_zero (line 588) | def execute_rank_zero(self, method_name: str, *args, **kwargs): method execute_all (line 601) | def execute_all(self, method_name: str, *args, **kwargs): method execute_all_sync (line 614) | def execute_all_sync(self, method_name: str, *args, **kwargs): method execute_all_async (line 627) | def execute_all_async(self, method_name: str, *args, **kwargs): method master_address (line 658) | def master_address(self): method master_port (line 662) | def master_port(self): method workers (line 666) | def workers(self): method world_size (line 670) | def world_size(self): function _bind_workers_method_to_parent (line 681) | def _bind_workers_method_to_parent(cls, key, user_defined_cls): function _unwrap_ray_remote (line 729) | def _unwrap_ray_remote(cls): function _determine_fsdp_megatron_base_class (line 735) | def _determine_fsdp_megatron_base_class(mros: list): function create_colocated_worker_cls (line 749) | def create_colocated_worker_cls(class_dict: dict[str, RayClassWithInitAr... function create_colocated_worker_raw_cls (line 796) | def create_colocated_worker_raw_cls(class_dict: dict[str, RayClassWithIn... function create_colocated_worker_cls_fused (line 868) | def create_colocated_worker_cls_fused(class_dict: dict[str, RayClassWith... FILE: verl_distillation/verl/third_party/sglang/parallel_state.py function initialize_parallel_state (line 38) | def initialize_parallel_state( function ensure_model_parallel_initialized (line 77) | def ensure_model_parallel_initialized( function model_parallel_is_initialized (line 105) | def model_parallel_is_initialized(): function initialize_model_parallel_for_sglang (line 111) | def initialize_model_parallel_for_sglang( function initialize_model_parallel (line 204) | def initialize_model_parallel( function get_device_mesh (line 292) | def get_device_mesh(): function get_tensor_model_parallel_group (line 306) | def get_tensor_model_parallel_group(): function get_tensor_model_parallel_world_size (line 313) | def get_tensor_model_parallel_world_size(): function get_tensor_model_parallel_rank (line 318) | def get_tensor_model_parallel_rank(): function get_tensor_model_parallel_src_rank (line 323) | def get_tensor_model_parallel_src_rank(): FILE: verl_distillation/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_distillation/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_distillation/verl/third_party/vllm/__init__.py function get_version (line 23) | def get_version(pkg): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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 179) | def execute_code(self, instance_id, code, timeout=30, language="python"): method calc_reward (line 191) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 194) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/trainer/config/algorithm.py class KLControlConfig (line 24) | class KLControlConfig(BaseConfig): class FilterGroupsConfig (line 43) | class FilterGroupsConfig(BaseConfig): class AlgoConfig (line 60) | class AlgoConfig(BaseConfig): FILE: verl_distillation/verl/trainer/config/config.py class CheckpointConfig (line 24) | class CheckpointConfig(BaseConfig): class ProfileConfig (line 42) | class ProfileConfig(BaseConfig): class BaseModelConfig (line 61) | class BaseModelConfig(BaseConfig): FILE: verl_distillation/verl/trainer/constants_ppo.py function get_ppo_ray_runtime_env (line 36) | def get_ppo_ray_runtime_env(): FILE: verl_distillation/verl/trainer/fsdp_sft_trainer.py function extract_step (line 83) | def extract_step(path): class FSDPSFTTrainer (line 90) | class FSDPSFTTrainer: method __init__ (line 91) | def __init__( method _normalize_config_bsz (line 137) | def _normalize_config_bsz(self): method _build_dataloader (line 150) | def _build_dataloader(self, train_dataset, val_dataset): method _build_model_optimizer (line 200) | def _build_model_optimizer(self): method _compute_loss_and_backward (line 365) | def _compute_loss_and_backward(self, batch, do_backward=True, n_micro_... method training_step (line 466) | def training_step(self, batch: TensorDict): method validation_step (line 526) | def validation_step(self, batch: TensorDict): method save_checkpoint (line 537) | def save_checkpoint(self, step): method _init_checkpoint_manager (line 580) | def _init_checkpoint_manager(self): method load_checkpoint (line 607) | def load_checkpoint(self): method _load_dataloader_state (line 641) | def _load_dataloader_state(self, checkpoint_path: str): method _determine_resume_path (line 666) | def _determine_resume_path(self): method _find_latest_checkpoint (line 691) | def _find_latest_checkpoint(self): method fit (line 706) | def fit(self): function run_sft (line 799) | def run_sft(config): function main (line 837) | def main(config): function create_sft_dataset (line 841) | def create_sft_dataset(data_paths, data_config, tokenizer, max_samples=-1): FILE: verl_distillation/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_distillation/verl/trainer/main_generation.py function main (line 44) | def main(config): function run_generation (line 48) | def run_generation(config) -> None: function main_task (line 63) | def main_task(config): FILE: verl_distillation/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_distillation/verl/trainer/main_ppo.py function main (line 36) | def main(config): function run_ppo (line 46) | def run_ppo(config, task_runner_class=None) -> None: class TaskRunner (line 110) | class TaskRunner: method __init__ (line 121) | def __init__(self): method add_actor_rollout_worker (line 125) | def add_actor_rollout_worker(self, config): method add_critic_worker (line 158) | def add_critic_worker(self, config): method init_resource_pool_mgr (line 181) | def init_resource_pool_mgr(self, config): method add_reward_model_worker (line 206) | def add_reward_model_worker(self, config): method add_ref_policy_worker (line 232) | def add_ref_policy_worker(self, config, ref_policy_cls): method run (line 240) | def run(self, config): function create_rl_dataset (line 349) | def create_rl_dataset(data_paths, data_config, tokenizer, processor, is_... function create_rl_sampler (line 399) | def create_rl_sampler(data_config, dataset): FILE: verl_distillation/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 114) | def register_adv_est(name_or_enum: str | AdvantageEstimator) -> Any: function get_adv_estimator_fn (line 135) | def get_adv_estimator_fn(name_or_enum): class AdaptiveKLController (line 151) | class AdaptiveKLController: method __init__ (line 157) | def __init__(self, init_kl_coef, target_kl, horizon): method update (line 162) | def update(self, current_kl, n_steps): class FixedKLController (line 175) | class FixedKLController: method __init__ (line 178) | def __init__(self, kl_coef): method update (line 181) | def update(self, current_kl, n_steps): function get_kl_controller (line 191) | def get_kl_controller(kl_ctrl): function compute_gae_advantage_return (line 214) | def compute_gae_advantage_return( function compute_on_policy_distill_reverse_kl (line 264) | def compute_on_policy_distill_reverse_kl( function compute_grpo_outcome_advantage (line 274) | def compute_grpo_outcome_advantage( function compute_grpo_vectorized_outcome_advantage (line 341) | def compute_grpo_vectorized_outcome_advantage( function compute_grpo_passk_outcome_advantage (line 368) | def compute_grpo_passk_outcome_advantage( function compute_reinforce_plus_plus_baseline_outcome_advantage (line 432) | def compute_reinforce_plus_plus_baseline_outcome_advantage( function compute_rloo_outcome_advantage (line 484) | def compute_rloo_outcome_advantage( function compute_opo_outcome_advantage (line 536) | def compute_opo_outcome_advantage( function compute_reinforce_plus_plus_outcome_advantage (line 590) | def compute_reinforce_plus_plus_outcome_advantage( function compute_remax_outcome_advantage (line 629) | def compute_remax_outcome_advantage( function compute_gpg_outcome_advantage (line 665) | def compute_gpg_outcome_advantage( function compute_rloo_vectorized_outcome_advantage (line 728) | def compute_rloo_vectorized_outcome_advantage( function compute_rewards (line 765) | def compute_rewards(token_level_scores, old_log_prob, ref_log_prob, kl_r... function agg_loss (line 781) | def agg_loss(loss_mat: torch.Tensor, loss_mask: torch.Tensor, loss_agg_m... function compute_policy_loss (line 821) | def compute_policy_loss( function compute_policy_loss_vanilla (line 897) | def compute_policy_loss_vanilla( function compute_policy_loss_gspo (line 984) | def compute_policy_loss_gspo( function compute_policy_loss_gpg (line 1054) | def compute_policy_loss_gpg( function compute_policy_loss_clip_cov (line 1087) | def compute_policy_loss_clip_cov( function compute_policy_loss_kl_cov (line 1187) | def compute_policy_loss_kl_cov( function compute_policy_loss_geo_mean (line 1263) | def compute_policy_loss_geo_mean( function compute_entropy_loss (line 1344) | def compute_entropy_loss(logits, response_mask, loss_agg_mode: str = "to... function compute_value_loss (line 1361) | def compute_value_loss( function kl_penalty (line 1403) | def kl_penalty(logprob: torch.FloatTensor, ref_logprob: torch.FloatTenso... function kl_penalty_forward (line 1429) | def kl_penalty_forward(logprob: torch.FloatTensor, ref_logprob: torch.Fl... function compute_pf_ppo_reweight_data (line 1467) | def compute_pf_ppo_reweight_data( FILE: verl_distillation/verl/trainer/ppo/metric_utils.py function reduce_metrics (line 30) | def reduce_metrics(metrics: dict[str, list[Any]]) -> dict[str, Any]: function _compute_response_info (line 50) | def _compute_response_info(batch: DataProto) -> dict[str, Any]: function compute_on_policy_distill_data_metrics (line 79) | def compute_on_policy_distill_data_metrics(batch: DataProto, use_critic:... function compute_data_metrics (line 208) | def compute_data_metrics(batch: DataProto, use_critic: bool = True) -> d... function compute_timing_metrics (line 355) | def compute_timing_metrics(batch: DataProto, timing_raw: dict[str, float... function compute_throughout_metrics (line 397) | def compute_throughout_metrics(batch: DataProto, timing_raw: dict[str, f... function bootstrap_metric (line 433) | def bootstrap_metric( function calc_maj_val (line 474) | def calc_maj_val(data: list[dict[str, Any]], vote_key: str, val_key: str... function process_validation_metrics (line 510) | def process_validation_metrics( FILE: verl_distillation/verl/trainer/ppo/mismatch_helper.py function compute_rollout_importance_weights (line 47) | def compute_rollout_importance_weights( function compute_is_metrics (line 277) | def compute_is_metrics( function compute_mismatch_metrics (line 401) | def compute_mismatch_metrics( FILE: verl_distillation/verl/trainer/ppo/ray_trainer.py class ResourcePoolManager (line 69) | class ResourcePoolManager: method create_resource_pool (line 78) | def create_resource_pool(self): method get_resource_pool (line 98) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 102) | def get_n_gpus(self) -> int: method _check_resource_available (line 106) | def _check_resource_available(self): function apply_kl_penalty (line 125) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 167) | def compute_response_mask(data: DataProto): function compute_advantage (line 185) | def compute_advantage( class RayPPOTrainer (line 281) | class RayPPOTrainer: method __init__ (line 291) | def __init__( method _create_dataloader (line 365) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _dump_generations (line 448) | def _dump_generations(self, inputs, outputs, scores, reward_extra_info... method _log_rollout_data (line 485) | def _log_rollout_data( method _maybe_log_val_generations (line 519) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _get_gen_batch (line 543) | def _get_gen_batch(self, batch: DataProto) -> DataProto: method _validate (line 560) | def _validate(self): method init_workers (line 702) | def init_workers(self): method _save_checkpoint (line 809) | def _save_checkpoint(self): method _load_checkpoint (line 869) | def _load_checkpoint(self): method _start_profiling (line 929) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 940) | def _stop_profiling(self, do_profile: bool) -> None: method _balance_batch (line 951) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method compute_rollout_importance_weights_and_add_to_batch (line 988) | def compute_rollout_importance_weights_and_add_to_batch(self, batch: D... method fit (line 1047) | def fit(self): FILE: verl_distillation/verl/trainer/ppo/reward.py function _call_with_kwargs (line 35) | def _call_with_kwargs(raw_fn, extra_kwargs, *args, **kwargs): function _call_with_kwargs_async (line 44) | async def _call_with_kwargs_async(raw_fn, extra_kwargs, *args, **kwargs): function get_custom_reward_fn (line 53) | def get_custom_reward_fn(config: DictConfig) -> Optional[RawRewardFn]: function load_reward_manager (line 110) | def load_reward_manager( function compute_reward (line 170) | def compute_reward(data: DataProto, reward_fn: AbstractRewardManager) ->... function compute_reward_async (line 192) | def compute_reward_async(data: DataProto, config=None, tokenizer=None, r... FILE: verl_distillation/verl/trainer/ppo/utils.py class Role (line 26) | class Role(Enum): method __str__ (line 39) | def __str__(self): method _get_role_string (line 42) | def _get_role_string(self): method from_string (line 55) | def from_string(cls, name: str): function need_reference_policy (line 71) | def need_reference_policy( function need_reward_model (line 78) | def need_reward_model( function need_critic (line 85) | def need_critic(config: DictConfig) -> bool: FILE: verl_distillation/verl/trainer/sft_trainer.py class SFTTrainer (line 52) | class SFTTrainer: method __init__ (line 53) | def __init__( method _build_ckpt_handler (line 86) | def _build_ckpt_handler(self): method _build_config (line 102) | def _build_config(self): method _build_engine (line 110) | def _build_engine(self): method _init_engine (line 122) | def _init_engine(self): method _build_dataset (line 143) | def _build_dataset(self): method _build_dataloader (line 158) | def _build_dataloader(self): method fit (line 206) | def fit(self): function run_sft (line 363) | def run_sft(config): function main (line 373) | def main(config): function create_sft_dataset (line 377) | def create_sft_dataset(data_paths, data_config, tokenizer, max_samples=-1): FILE: verl_distillation/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_distillation/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_distillation/verl/utils/checkpoint/checkpoint_handler.py function extract_step (line 30) | def extract_step(path): class CheckpointHandler (line 41) | class CheckpointHandler: method __init__ (line 48) | def __init__( method save_checkpoint (line 68) | def save_checkpoint(self, step): method load_checkpoint (line 113) | def load_checkpoint(self): method _load_dataloader_state (line 140) | def _load_dataloader_state(self, checkpoint_path: str): method _determine_resume_path (line 166) | def _determine_resume_path(self): method _find_latest_checkpoint (line 191) | def _find_latest_checkpoint(self): FILE: verl_distillation/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 get_rng_state (line 145) | def get_rng_state(): method load_rng_state (line 158) | def load_rng_state(rng_state): function find_latest_ckpt_path (line 167) | def find_latest_ckpt_path(path, directory_format="global_step_{}"): function get_checkpoint_tracker_filename (line 200) | def get_checkpoint_tracker_filename(root_path: str): function should_save_ckpt_esi (line 207) | def should_save_ckpt_esi(max_steps_duration: float, save_ckpt_duration: ... FILE: verl_distillation/verl/utils/checkpoint/fsdp_checkpoint_manager.py class FSDPConfig (line 44) | class FSDPConfig: class FSDPCheckpointManager (line 56) | class FSDPCheckpointManager(BaseCheckpointManager): method __init__ (line 75) | def __init__( method load_checkpoint (line 98) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 180) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl_distillation/verl/utils/checkpoint/megatron_checkpoint_manager.py class MegatronCheckpointManager (line 48) | class MegatronCheckpointManager(BaseCheckpointManager): method __init__ (line 102) | def __init__( method get_rng_state (line 153) | def get_rng_state(self, use_dist_ckpt: bool = True, data_parallel_rand... method get_checkpoint_name (line 187) | def get_checkpoint_name( method generate_state_dict (line 233) | def generate_state_dict( method load_rng_states (line 277) | def load_rng_states(self, rng_states, data_parallel_random_init=False,... method load_checkpoint (line 295) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 375) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl_distillation/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_distillation/verl/utils/dataset/dataset_utils.py class DatasetPadMode (line 21) | class DatasetPadMode(str, Enum): class SFTTensorCollator (line 29) | class SFTTensorCollator: method __init__ (line 36) | def __init__(self, pad_mode: DatasetPadMode = DatasetPadMode.LEFT_RIGHT): method __call__ (line 39) | def __call__(self, batch: list[dict[str, any]]) -> dict[str, any]: method collate_variable_batch (line 49) | def collate_variable_batch(self, batch: list[dict[str, any]]) -> dict[... FILE: verl_distillation/verl/utils/dataset/multiturn_sft_dataset.py function convert_nested_value_to_list_recursive (line 34) | def convert_nested_value_to_list_recursive(data_item): class MultiTurnSFTDataset (line 47) | class MultiTurnSFTDataset(Dataset): method __init__ (line 52) | def __init__(self, parquet_files: str | list[str], tokenizer, config=N... method _download (line 84) | def _download(self): method _read_files_and_process (line 88) | def _read_files_and_process(self): method __len__ (line 130) | def __len__(self): method _process_message_tokens (line 133) | def _process_message_tokens( method _validate_and_convert_tokens (line 211) | def _validate_and_convert_tokens( method __getitem__ (line 253) | def __getitem__(self, item): FILE: verl_distillation/verl/utils/dataset/onerec_dataset.py class OneRecDataset (line 20) | class OneRecDataset(Dataset): method __init__ (line 29) | def __init__( method _download (line 78) | def _download(self, use_origin_parquet: bool = False) -> None: method _read_files_and_tokenize (line 89) | def _read_files_and_tokenize(self) -> None: method _extract_prompt_fields (line 128) | def _extract_prompt_fields(self, row: dict[str, Any]) -> dict[str, Any]: method _is_valid_sample (line 216) | def _is_valid_sample(self, row: dict[str, Any]) -> bool: method maybe_filter_out_long_prompts (line 223) | def maybe_filter_out_long_prompts(self, dataframe: datasets.Dataset) -... method resume_dataset_state (line 268) | def resume_dataset_state(self) -> None: method __len__ (line 279) | def __len__(self) -> int: # type: ignore[override] method _build_messages (line 282) | def _build_messages(self, example: dict[str, Any]) -> list[dict[str, A... method __getitem__ (line 301) | def __getitem__(self, index: int) -> dict[str, Any]: # type: ignore[o... method _truncate_ids (line 408) | def _truncate_ids(self, token_ids: list[int]) -> list[int]: method __getstate__ (line 424) | def __getstate__(self) -> dict[str, Any]: FILE: verl_distillation/verl/utils/dataset/rl_dataset.py function collate_fn (line 38) | def collate_fn(data_list: list[dict]) -> dict: class RLHFDataset (line 69) | class RLHFDataset(Dataset): method __init__ (line 86) | def __init__( method _download (line 145) | def _download(self, use_origin_parquet=False): method _read_files_and_tokenize (line 152) | def _read_files_and_tokenize(self): method maybe_filter_out_long_prompts (line 175) | def maybe_filter_out_long_prompts(self, dataframe: datasets.Dataset = ... method resume_dataset_state (line 257) | def resume_dataset_state(self): method __len__ (line 266) | def __len__(self): method _build_messages (line 269) | def _build_messages(self, example: dict): method __getitem__ (line 290) | def __getitem__(self, item): method __getstate__ (line 455) | def __getstate__(self): FILE: verl_distillation/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_distillation/verl/utils/dataset/sft_dataset.py class SFTDataset (line 33) | class SFTDataset(Dataset): method __init__ (line 41) | def __init__(self, parquet_files: str | ListConfig, tokenizer, config,... method _download (line 76) | def _download(self): method _read_files_and_tokenize (line 80) | def _read_files_and_tokenize(self): method __len__ (line 133) | def __len__(self): method __getitem__ (line 136) | def __getitem__(self, item): FILE: verl_distillation/verl/utils/dataset/vision_utils.py function process_image (line 23) | def process_image(image: dict | Image.Image, image_patch_size: int = 14)... function process_video (line 62) | def process_video( function process_multi_modal_inputs_for_minicpmo (line 103) | def process_multi_modal_inputs_for_minicpmo(input_ids, attention_mask, p... FILE: verl_distillation/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_distillation/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_distillation/verl/utils/device.py function is_torch_npu_available (line 18) | def is_torch_npu_available() -> bool: function get_visible_devices_keyword (line 32) | def get_visible_devices_keyword() -> str: function get_device_name (line 40) | def get_device_name() -> str: function get_torch_device (line 55) | def get_torch_device() -> any: function get_device_id (line 68) | def get_device_id() -> int: function get_nccl_backend (line 76) | def get_nccl_backend() -> str: function set_expandable_segments (line 89) | def set_expandable_segments(enable: bool) -> None: FILE: verl_distillation/verl/utils/distributed.py function set_numa_affinity (line 26) | def set_numa_affinity(): function initialize_global_process_group (line 54) | def initialize_global_process_group(timeout_second=36000): function destroy_global_process_group (line 69) | def destroy_global_process_group(): function initialize_global_process_group_ray (line 74) | def initialize_global_process_group_ray(timeout_second=None): FILE: verl_distillation/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_distillation/verl/utils/flops_counter.py function get_device_flops (line 41) | def get_device_flops(unit="T"): class FlopsCounter (line 108) | class FlopsCounter: method __init__ (line 118) | def __init__(self, config: PretrainedConfig): method _estimate_unknown_flops (line 146) | def _estimate_unknown_flops(self, tokens_sum, batch_seqlens, delta_time): method _estimate_qwen2_flops (line 149) | def _estimate_qwen2_flops(self, tokens_sum, batch_seqlens, delta_time): method _estimate_deepseek_v3_flops (line 183) | def _estimate_deepseek_v3_flops(self, tokens_sum, batch_seqlens, delta... method _estimate_qwen2_moe_flops (line 237) | def _estimate_qwen2_moe_flops(self, tokens_sum, batch_seqlens, delta_t... method _estimate_gemma3_flops (line 273) | def _estimate_gemma3_flops(self, tokens_sum, batch_seqlens, delta_time): method _estimate_apertus_flops (line 340) | def _estimate_apertus_flops(self, tokens_sum, batch_seqlens, delta_time): method estimate_flops (line 379) | def estimate_flops(self, batch_seqlens, delta_time): FILE: verl_distillation/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_distillation/verl/utils/fsdp_utils.py function init_fn (line 50) | def init_fn(x: torch.nn.Module): function get_init_weight_context_manager (line 57) | def get_init_weight_context_manager(use_meta_tensor=True, mesh: DeviceMe... function get_fsdp_wrap_policy (line 73) | def get_fsdp_wrap_policy(module, config=None, is_lora=False): function offload_fsdp_model_to_cpu (line 144) | def offload_fsdp_model_to_cpu(model: FSDP, empty_cache: bool = True): function offload_fsdp2_model_to_cpu (line 171) | def offload_fsdp2_model_to_cpu(model, empty_cache: bool = True): function load_fsdp_model_to_gpu (line 178) | def load_fsdp_model_to_gpu(model: FSDP): function load_fsdp2_model_to_gpu (line 198) | def load_fsdp2_model_to_gpu(model): function offload_fsdp_optimizer (line 204) | def offload_fsdp_optimizer(optimizer): function load_fsdp_optimizer (line 216) | def load_fsdp_optimizer(optimizer, device_id): function meta_device_init (line 228) | def meta_device_init(): function parallel_load_safetensors (line 259) | def parallel_load_safetensors(filepath): function parallel_init_module_fn (line 315) | def parallel_init_module_fn(module: torch.nn.Module, shard_states: dict[... function fsdp_version (line 399) | def fsdp_version(model): function get_fsdp_state_ctx (line 408) | def get_fsdp_state_ctx(model, state_type, state_cfg, optim_cfg): function get_fsdp_full_state_dict (line 415) | def get_fsdp_full_state_dict(model: torch.nn.Module, offload_to_cpu: boo... function fsdp2_load_full_state_dict (line 451) | def fsdp2_load_full_state_dict(model: torch.nn.Module, full_state: dict,... function maybe_patch_fsdp_module (line 489) | def maybe_patch_fsdp_module(model): function apply_fsdp2 (line 507) | def apply_fsdp2(model, fsdp_kwargs, config): function get_shard_placement_fn (line 540) | def get_shard_placement_fn(fsdp_size): function fsdp2_clip_grad_norm_ (line 553) | def fsdp2_clip_grad_norm_(parameters, max_norm, norm_type=2.0, error_if_... function layered_summon_lora_params (line 569) | def layered_summon_lora_params(fsdp_module) -> OrderedDict: function collect_lora_params (line 611) | def collect_lora_params(module: FSDP, layered_summon: bool, base_sync_do... function replace_lora_wrapper (line 669) | def replace_lora_wrapper(k, peft_config): FILE: verl_distillation/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_distillation/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_distillation/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_extern_type (line 83) | def load_extern_type(file_path: Optional[str], type_name: Optional[str])... function _get_qualified_name (line 117) | def _get_qualified_name(func): function deprecated (line 124) | def deprecated(replacement: str = ""): FILE: verl_distillation/verl/utils/kernel/kernels.py function null_decorator (line 56) | def null_decorator(*args, **kwargs): class EntropyReductionEnum (line 73) | class EntropyReductionEnum: function get_entropy_reduction_enum_number (line 83) | def get_entropy_reduction_enum_number(reduction: str) -> int: function get_entropy_reduction_enum (line 99) | def get_entropy_reduction_enum(ce_reduction: int) -> EntropyReductionEnum: class BackwardEnum (line 116) | class BackwardEnum: class Config (line 130) | class Config: function set_backward_method (line 145) | def set_backward_method(backward_method: BackwardEnum): function efficient_entropy_kernel_general_mainloop (line 158) | def efficient_entropy_kernel_general_mainloop( function efficient_entropy_triton_kernel_epilogue (line 292) | def efficient_entropy_triton_kernel_epilogue( function efficient_entropy_triton_kernel_epilogue_tp (line 384) | def efficient_entropy_triton_kernel_epilogue_tp( function efficient_entropy_triton_epilogue_tp_update (line 460) | def efficient_entropy_triton_epilogue_tp_update( function efficient_entropy_forward (line 507) | def efficient_entropy_forward( function efficient_entropy_backward_kernel_general_mainloop_MN (line 711) | def efficient_entropy_backward_kernel_general_mainloop_MN( function efficient_entropy_backward_kernel_d_hidden (line 888) | def efficient_entropy_backward_kernel_d_hidden( function efficient_entropy_backward_kernel_d_weight (line 1015) | def efficient_entropy_backward_kernel_d_weight( function efficient_entropy_backward_kernel_general_d_logits (line 1135) | def efficient_entropy_backward_kernel_general_d_logits( function efficient_entropy_backward_kernel_general_d_logits_split_N (line 1274) | def efficient_entropy_backward_kernel_general_d_logits_split_N( function efficient_entropy_backward (line 1378) | def efficient_entropy_backward( FILE: verl_distillation/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_distillation/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_distillation/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_distillation/verl/utils/megatron/dist_checkpointing.py function save_dist_checkpointing (line 26) | def save_dist_checkpointing(sharded_state_dict, ckpt_path, async_save=Fa... function load_dist_checkpointing (line 46) | def load_dist_checkpointing(sharded_state_dict, ckpt_dir): FILE: verl_distillation/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_distillation/verl/utils/megatron/optimizer.py function init_megatron_optim_config (line 24) | def init_megatron_optim_config(optim_config: dict) -> OptimizerConfig: function get_megatron_optimizer (line 47) | def get_megatron_optimizer( function get_megatron_optimizer_param_scheduler (line 64) | def get_megatron_optimizer_param_scheduler( function get_megatron_last_lr (line 104) | def get_megatron_last_lr(optimizer): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/verl/utils/megatron_utils.py function get_model_config (line 45) | def get_model_config(model): function get_model (line 49) | def get_model( class McoreModuleWrapperConfig (line 163) | class McoreModuleWrapperConfig: function make_megatron_module (line 172) | def make_megatron_module( function unwrap_model (line 224) | def unwrap_model(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES): function convert_config (line 239) | def convert_config(hf_config: PretrainedConfig, megatron_config) -> Tran... function mcore_model_parallel_config (line 295) | def mcore_model_parallel_config( function offload_megatron_model_to_cpu (line 322) | def offload_megatron_model_to_cpu(models): function load_megatron_model_to_gpu (line 358) | def load_megatron_model_to_gpu(models, load_grad=True): function offload_megatron_copy_params (line 385) | def offload_megatron_copy_params(optimizers): function load_megatron_copy_params (line 426) | def load_megatron_copy_params(optimizers): function offload_megatron_optimizer (line 467) | def offload_megatron_optimizer(optimizers): function load_megatron_optimizer (line 488) | def load_megatron_optimizer(optimizers): function get_dist_checkpoint_path (line 512) | def get_dist_checkpoint_path(checkpoint_path): function get_hf_model_checkpoint_path (line 518) | def get_hf_model_checkpoint_path(checkpoint_path): function get_transformer_config_checkpoint_path (line 524) | def get_transformer_config_checkpoint_path(checkpoint_path): function convert_megatron_model_to_transformers_model (line 529) | def convert_megatron_model_to_transformers_model( function broadcast_from_megatron_pp (line 669) | def broadcast_from_megatron_pp(tensor: torch.Tensor): function broadcast_str_from_megatron_pp (line 706) | def broadcast_str_from_megatron_pp(obj: Any): function default_tp_concat_fn (line 732) | def default_tp_concat_fn( function per_tensor_generator (line 814) | def per_tensor_generator( function get_transformer_layer_offset (line 959) | def get_transformer_layer_offset(pipeline_rank, vp_stage, config: Transf... FILE: verl_distillation/verl/utils/memory_buffer.py class MemoryBuffer (line 26) | class MemoryBuffer: method __init__ (line 32) | def __init__(self, numel: int, numel_padded: int, dtype: torch.dtype, ... method zero (line 41) | def zero(self): method get (line 45) | def get(self, shape, start_index): function calc_padded_numel (line 55) | def calc_padded_numel(shape: torch.Size, dtype: torch.dtype): function get_weight_buffer_meta_from_module (line 62) | def get_weight_buffer_meta_from_module(module: nn.Module) -> dict[str, d... function build_memory_buffer (line 72) | def build_memory_buffer(weight_buffer_meta: dict[str, dict]) -> dict[tor... function build_memory_reference_from_module (line 101) | def build_memory_reference_from_module( function build_memory_reference (line 117) | def build_memory_reference(weight_buffer_meta: dict[str, dict], memory_b... class MemoryBufferModuleWrapper (line 144) | class MemoryBufferModuleWrapper: method __init__ (line 150) | def __init__(self, module: nn.Module): method get_memory_buffers (line 157) | def get_memory_buffers(self): method get_weight_buffer_meta (line 160) | def get_weight_buffer_meta(self): class MegatronMemoryBufferForRollout (line 164) | class MegatronMemoryBufferForRollout: method __init__ (line 179) | def __init__(self, transform_memory_param_fn): method initialize_weight_buffer (line 185) | def initialize_weight_buffer(self, weight_buffer_meta_pp: list[dict[st... method build_memory_reference (line 203) | def build_memory_reference(self): method named_parameters (line 209) | def named_parameters(self): method weight_buffers (line 213) | def weight_buffers(self): method memory_buffers (line 217) | def memory_buffers(self): FILE: verl_distillation/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_distillation/verl/utils/metric/utils.py function reduce_metrics (line 23) | def reduce_metrics(metrics: dict[str, list[Any]]) -> dict[str, Any]: FILE: verl_distillation/verl/utils/model.py class LambdaLayer (line 46) | class LambdaLayer(nn.Module): method __init__ (line 47) | def __init__(self, fn): method forward (line 51) | def forward(self, *args, **kwargs): function squeeze (line 55) | def squeeze(x): function update_model_config (line 59) | def update_model_config(module_config, override_config_kwargs): function get_huggingface_actor_config (line 72) | def get_huggingface_actor_config(model_name: str, override_config_kwargs... function get_generation_config (line 84) | def get_generation_config( function create_huggingface_actor (line 101) | def create_huggingface_actor(model_name: str, override_config_kwargs=Non... function create_huggingface_critic (line 125) | def create_huggingface_critic(model_name: str, override_config_kwargs=No... function get_model_size (line 147) | def get_model_size(model: nn.Module, scale="auto"): function print_model_size (line 174) | def print_model_size(model: nn.Module, name: str = None): function create_random_mask (line 181) | def create_random_mask( function compute_position_id_with_mask (line 224) | def compute_position_id_with_mask(mask): function convert_weight_keys (line 228) | def convert_weight_keys(state_dict: dict[str, torch.Tensor], model: PreT... function check_exclude_modules (line 249) | def check_exclude_modules(config, key: str) -> bool: function check_target_modules (line 272) | def check_target_modules(config, key: str) -> bool: function normalize_model_name (line 323) | def normalize_model_name(name, pp_rank, vpp_rank, transformer_config, la... function normalize_pp_vpp_params (line 347) | def normalize_pp_vpp_params(params, num_hidden_layers, layer_name="layer... function get_parallel_model_from_config (line 368) | def get_parallel_model_from_config( function _get_parallel_model_architecture_from_config (line 386) | def _get_parallel_model_architecture_from_config(config: PretrainedConfi... function _load_hf_model (line 399) | def _load_hf_model(config, model_config, is_value_model): function get_hf_model_path (line 453) | def get_hf_model_path(config): function load_megatron_model_weights (line 463) | def load_megatron_model_weights(config, model_config, parallel_model, pa... function load_megatron_gptmodel_weights (line 484) | def load_megatron_gptmodel_weights(config, model_config, parallel_model,... function pad_packed_inputs (line 501) | def pad_packed_inputs(unpad_tokens: torch.Tensor, cu_seqlens, max_seqlen... function load_mcore_dist_weights (line 534) | def load_mcore_dist_weights(parallel_model, dist_weight_path, is_value_m... function get_parallel_gptmodel_from_config (line 553) | def get_parallel_gptmodel_from_config( function patch_valuehead_model (line 589) | def patch_valuehead_model(model) -> None: function load_valuehead_model (line 619) | def load_valuehead_model(local_path, torch_dtype, model_config, trust_re... function get_hf_auto_model_class (line 665) | def get_hf_auto_model_class(hf_config): function extract_multi_modal_inputs (line 688) | def extract_multi_modal_inputs( function get_lora_rank_from_adapter (line 729) | def get_lora_rank_from_adapter(adapter_path: str | os.PathLike) -> int: class CausalLMOutputForPPO (line 765) | class CausalLMOutputForPPO(CausalLMOutputWithPast): FILE: verl_distillation/verl/utils/net_utils.py function is_ipv4 (line 30) | def is_ipv4(ip_str: str) -> bool: function is_ipv6 (line 47) | def is_ipv6(ip_str: str) -> bool: FILE: verl_distillation/verl/utils/npu_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_distillation/verl/utils/profiler/config.py class NsightToolConfig (line 25) | class NsightToolConfig(BaseConfig): method __post_init__ (line 31) | def __post_init__(self) -> None: class TorchProfilerToolConfig (line 36) | class TorchProfilerToolConfig(BaseConfig): method __post_init__ (line 47) | def __post_init__(self) -> None: class TorchMemoryToolConfig (line 54) | class TorchMemoryToolConfig(BaseConfig): method __post_init__ (line 65) | def __post_init__(self) -> None: class NPUToolConfig (line 78) | class NPUToolConfig(NsightToolConfig): method __post_init__ (line 90) | def __post_init__(self) -> None: class ProfilerConfig (line 105) | class ProfilerConfig(BaseConfig): method union (line 126) | def union(self, other: "ProfilerConfig") -> "ProfilerConfig": method intersect (line 138) | def intersect(self, other: "ProfilerConfig") -> "ProfilerConfig": method __post_init__ (line 152) | def __post_init__(self) -> None: FILE: verl_distillation/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_distillation/verl/utils/profiler/mstx_profile.py function mark_start_range (line 29) | def mark_start_range(message: Optional[str] = None) -> None: function mark_end_range (line 39) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 49) | def mark_annotate(message: Optional[str] = None) -> Callable: function marked_timer (line 65) | def marked_timer(name: str, timing_raw: dict[str, float], *args: Any, **... function get_npu_profiler (line 89) | def get_npu_profiler( class NPUProfiler (line 157) | class NPUProfiler(DistProfiler): method __init__ (line 164) | def __init__(self, rank: int, config: ProfilerConfig, tool_config: NPU... method start (line 192) | def start(self, **kwargs): method stop (line 209) | def stop(self): method annotate (line 217) | def annotate(self, message: Optional[str] = None, role: Optional[str] ... FILE: verl_distillation/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 140) | def start(self, **kwargs): method stop (line 146) | def stop(self): method annotate (line 152) | def annotate( FILE: verl_distillation/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... FILE: verl_distillation/verl/utils/profiler/profile.py class Profiler (line 26) | class Profiler: method __init__ (line 43) | def __init__(self, config: ProfilerConfig, tool_config: Optional[Torch... method _validate (line 77) | def _validate(self): method check (line 88) | def check(self): method start (line 91) | def start(self): method step (line 96) | def step(self): method stop (line 100) | def stop(self): method save (line 105) | def save(self): method stop_and_save (line 115) | def stop_and_save(self): method stop_trace (line 120) | def stop_trace(self): function mark_start_range (line 126) | def mark_start_range( function mark_end_range (line 143) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 152) | def mark_annotate( class DistProfiler (line 176) | class DistProfiler: method __init__ (line 186) | def __init__( method start (line 224) | def start(self, **kwargs): method stop (line 227) | def stop(self): method annotate (line 231) | def annotate( class _NoOpProfiler (line 263) | class _NoOpProfiler: method start (line 264) | def start(self, **kwargs): method stop (line 267) | def stop(self): class TorchMemoryProfiler (line 271) | class TorchMemoryProfiler: method __init__ (line 282) | def __init__( method start (line 313) | def start(self, **kwargs): method stop (line 323) | def stop(self): method _should_profile_this_rank (line 337) | def _should_profile_this_rank(self) -> bool: class DistProfilerExtension (line 346) | class DistProfilerExtension: method __init__ (line 358) | def __init__(self, profiler: DistProfiler): method start_profile (line 364) | def start_profile(self, **kwargs) -> None: method stop_profile (line 369) | def stop_profile(self) -> None: FILE: verl_distillation/verl/utils/py_functional.py function _mp_target_wrapper (line 31) | def _mp_target_wrapper(target_func: Callable, mp_queue: multiprocessing.... function timeout_limit (line 52) | def timeout_limit(seconds: float, use_signals: bool = False): function union_two_dict (line 147) | def union_two_dict(dict1: dict, dict2: dict): function append_to_dict (line 165) | def append_to_dict(data: dict, new_data: dict, prefix: str = ""): class NestedNamespace (line 185) | class NestedNamespace(SimpleNamespace): method __init__ (line 201) | def __init__(self, dictionary, **kwargs): class DynamicEnumMeta (line 210) | class DynamicEnumMeta(type): method __iter__ (line 211) | def __iter__(cls) -> Iterator[Any]: method __contains__ (line 214) | def __contains__(cls, item: Any) -> bool: method __getitem__ (line 220) | def __getitem__(cls, name: str) -> Any: method __reduce_ex__ (line 223) | def __reduce_ex__(cls, protocol): method names (line 227) | def names(cls): method values (line 230) | def values(cls): class DynamicEnum (line 234) | class DynamicEnum(metaclass=DynamicEnumMeta): method __init__ (line 238) | def __init__(self, name: str, value: int): method __repr__ (line 242) | def __repr__(self): method __reduce_ex__ (line 245) | def __reduce_ex__(self, protocol): method register (line 255) | def register(cls, name: str) -> "DynamicEnum": method remove (line 266) | def remove(cls, name: str): method from_name (line 273) | def from_name(cls, name: str) -> Optional["DynamicEnum"]: function temp_env_var (line 278) | def temp_env_var(key: str, value: str): function convert_to_regular_types (line 308) | def convert_to_regular_types(obj): FILE: verl_distillation/verl/utils/ray_utils.py function ray_noset_visible_devices (line 26) | def ray_noset_visible_devices(env_vars=os.environ): function parallel_put (line 49) | def parallel_put(data_list: list[Any], max_workers: Optional[int] = None): function get_event_loop (line 85) | def get_event_loop(): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/utils/reward_score/prime_code/__init__.py function compute_score (line 21) | def compute_score(completion, test_cases, continuous=False): FILE: verl_distillation/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_distillation/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_distillation/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_distillation/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_distillation/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_distillation/verl/utils/reward_score/sandbox_fusion/__init__.py function compute_score (line 28) | def compute_score( FILE: verl_distillation/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_distillation/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_distillation/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_distillation/verl/utils/rollout_trace.py class RolloutTraceConfig (line 23) | class RolloutTraceConfig: method __new__ (line 45) | def __new__(cls, *args, **kwargs): method get_instance (line 52) | def get_instance(cls) -> "RolloutTraceConfig": method init (line 58) | def init(cls, project_name: str, experiment_name: str, backend: str, t... method get_backend (line 88) | def get_backend(cls) -> Optional[str]: method get_client (line 92) | def get_client(cls) -> Optional[object]: method enable_token2text (line 96) | def enable_token2text(cls) -> Optional[bool]: method reset (line 100) | def reset(cls): function rollout_trace_attr (line 105) | def rollout_trace_attr(sample_index=None, step=None, rollout_n=None, nam... function rollout_trace_op (line 140) | def rollout_trace_op(func): FILE: verl_distillation/verl/utils/seqlen_balancing.py function calculate_workload (line 27) | def calculate_workload(seqlen_list: list[int]): function karmarkar_karp (line 37) | def karmarkar_karp(seqlen_list: list[int], k_partitions: int, equal_size... function greedy_partition (line 141) | def greedy_partition(seqlen_list: list[int], k_partitions: int, equal_si... function get_seqlen_balanced_partitions (line 161) | def get_seqlen_balanced_partitions(seqlen_list: list[int], k_partitions:... function log_seqlen_unbalance (line 205) | def log_seqlen_unbalance(seqlen_list: list[int], partitions: list[list[i... function ceildiv (line 253) | def ceildiv(a, b): function roundup_divisible (line 257) | def roundup_divisible(a, b): function rearrange_micro_batches (line 261) | def rearrange_micro_batches( function get_reverse_idx (line 337) | def get_reverse_idx(idx_map): function prepare_dynamic_batch (line 355) | def prepare_dynamic_batch( function restore_dynamic_batch (line 394) | def restore_dynamic_batch(data: torch.Tensor, batch_idx_list: list[list[... FILE: verl_distillation/verl/utils/tensordict_utils.py function assign_non_tensor_dict (line 23) | def assign_non_tensor_dict(tensor_dict: TensorDict, non_tensor_dict: dict): function assign_non_tensor_data (line 29) | def assign_non_tensor_data(tensor_dict: TensorDict, key, val): function assign_non_tensor (line 33) | def assign_non_tensor(tensordict: TensorDict, **kwargs): function unwrap_non_tensor_data (line 39) | def unwrap_non_tensor_data(data): function get_non_tensor_data (line 45) | def get_non_tensor_data(data: TensorDict, key: str, default): function get_tensordict (line 50) | def get_tensordict(tensor_dict: dict[str, torch.Tensor | list], non_tens... function index_select_tensor_dict (line 95) | def index_select_tensor_dict(batch: TensorDict, indices: torch.Tensor | ... function union_tensor_dict (line 124) | def union_tensor_dict(tensor_dict1: TensorDict, tensor_dict2: TensorDict... function make_iterator (line 146) | def make_iterator(tensordict: TensorDict, mini_batch_size, epochs, seed=... function assert_tensordict_eq (line 172) | def assert_tensordict_eq(tensordict1: TensorDict, tensordict2: TensorDict): function pop (line 196) | def pop(tensordict: TensorDict, keys: Iterator[str]) -> TensorDict: function pad_to_divisor (line 212) | def pad_to_divisor(data: TensorDict, size_divisor: int): function unpad (line 240) | def unpad(data: TensorDict, pad_size): FILE: verl_distillation/verl/utils/tokenizer.py function set_pad_token_id (line 21) | def set_pad_token_id(tokenizer): function hf_tokenizer (line 36) | def hf_tokenizer(name_or_path, correct_pad_token=True, correct_gemma2=Tr... function hf_processor (line 66) | def hf_processor(name_or_path, **kwargs): FILE: verl_distillation/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_distillation/verl/utils/torch_functional.py function gather_from_labels (line 49) | def gather_from_labels(data, label): function logprobs_from_logits (line 64) | def logprobs_from_logits(logits, labels, inplace_backward=True): function logprobs_from_logits_flash_attn (line 95) | def logprobs_from_logits_flash_attn(logits, labels, inplace_backward=True): function logprobs_from_logits_torch_npu (line 103) | def logprobs_from_logits_torch_npu(logits, labels): function logprobs_from_logits_naive (line 110) | def logprobs_from_logits_naive(logits, labels): function logprobs_from_logits_v2 (line 116) | def logprobs_from_logits_v2(logits: torch.FloatTensor, labels): function clip_by_value (line 136) | def clip_by_value(x, tensor_min, tensor_max): function entropy_from_logits (line 145) | def entropy_from_logits(logits: torch.Tensor): function entropy_from_logits_with_chunking (line 152) | def entropy_from_logits_with_chunking(logits: torch.Tensor, chunk_size: ... function masked_sum (line 163) | def masked_sum(values, mask, axis=None): function masked_mean (line 171) | def masked_mean(values, mask, axis=None): function masked_var (line 188) | def masked_var(values, mask, unbiased=True): function masked_whiten (line 206) | def masked_whiten(values, mask, shift_mean=True): function get_response_mask (line 226) | def get_response_mask(response_id: torch.Tensor, eos_token: int | list[i... function compute_grad_norm (line 249) | def compute_grad_norm(model: nn.Module): function broadcast_dict_tensor (line 257) | def broadcast_dict_tensor(tensors: dict[str, torch.Tensor] | TensorDict,... function allgather_dict_tensors (line 266) | def allgather_dict_tensors(tensors: dict[str, torch.Tensor] | TensorDict... function split_dict_tensor_into_batches (line 300) | def split_dict_tensor_into_batches(tensors: TensorDict, batch_size) -> l... function pad_2d_list_to_length (line 307) | def pad_2d_list_to_length(response, pad_token_id, max_length=None): function pad_sequence_to_length (line 318) | def pad_sequence_to_length(tensors, max_seq_len, pad_token_id, left_pad=... function postprocess_data (line 331) | def postprocess_data( function tokenize_and_postprocess_data (line 384) | def tokenize_and_postprocess_data( function remove_pad_token (line 407) | def remove_pad_token(input_ids: torch.Tensor, attention_mask: torch.Tens... function log_probs_from_logits_response (line 422) | def log_probs_from_logits_response(input_ids, logits, response_length): function log_probs_from_logits_response_rmpad (line 438) | def log_probs_from_logits_response_rmpad(input_ids, attention_mask, logi... function log_probs_from_logits_all_rmpad (line 465) | def log_probs_from_logits_all_rmpad(input_ids_rmpad, logits_rmpad, indic... function post_process_logits (line 493) | def post_process_logits(input_ids, logits, temperature, top_k, top_p): function get_cosine_schedule_with_warmup (line 509) | def get_cosine_schedule_with_warmup( function get_constant_schedule_with_warmup (line 559) | def get_constant_schedule_with_warmup( function prepare_decoder_attention_mask (line 584) | def prepare_decoder_attention_mask(attention_mask, input_shape, inputs_e... function _make_causal_mask (line 608) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, d... function _expand_mask (line 621) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function get_unpad_data (line 635) | def get_unpad_data(attention_mask): function get_wsd_schedule_with_warmup (line 647) | def get_wsd_schedule_with_warmup( function check_device_is_available (line 703) | def check_device_is_available(): function distributed_mean_max_min_std (line 715) | def distributed_mean_max_min_std(local_tensor, compute_max=True, compute... function distributed_masked_mean (line 758) | def distributed_masked_mean(local_tensor, local_mask): FILE: verl_distillation/verl/utils/tracking.py class Tracking (line 27) | class Tracking: method __init__ (line 50) | def __init__(self, project_name, experiment_name, default_backend: str... method log (line 153) | def log(self, data, step, backend=None): method __del__ (line 158) | def __del__(self): class ClearMLLogger (line 175) | class ClearMLLogger: method __init__ (line 176) | def __init__(self, project_name: str, experiment_name: str, config): method _get_logger (line 191) | def _get_logger(self): method log (line 194) | def log(self, data, step): method finish (line 223) | def finish(self): class FileLogger (line 227) | class FileLogger: method __init__ (line 228) | def __init__(self, project_name: str, experiment_name: str): method log (line 241) | def log(self, data, step): method finish (line 245) | def finish(self): class _TensorboardAdapter (line 249) | class _TensorboardAdapter: method __init__ (line 250) | def __init__(self, project_name, experiment_name): method log (line 260) | def log(self, data, step): method finish (line 264) | def finish(self): class _MlflowLoggingAdapter (line 268) | class _MlflowLoggingAdapter: method __init__ (line 269) | def __init__(self): method log (line 282) | def log(self, data, step): function _compute_mlflow_params_from_objects (line 300) | def _compute_mlflow_params_from_objects(params) -> dict[str, Any]: function _transform_params_to_json_serializable (line 307) | def _transform_params_to_json_serializable(x, convert_list_to_dict: bool): function _flatten_dict (line 327) | def _flatten_dict(raw: dict[str, Any], *, sep: str) -> dict[str, Any]: class ValidationGenerationsLogger (line 336) | class ValidationGenerationsLogger: method log (line 340) | def log(self, loggers, samples, step): method log_generations_to_vemlp_wandb (line 356) | def log_generations_to_vemlp_wandb(self, samples, step): method log_generations_to_wandb (line 361) | def log_generations_to_wandb(self, samples, step): method _log_generations_to_wandb (line 366) | def _log_generations_to_wandb(self, samples, step, wandb): method log_generations_to_swanlab (line 394) | def log_generations_to_swanlab(self, samples, step): method log_generations_to_mlflow (line 409) | def log_generations_to_mlflow(self, samples, step): method log_generations_to_clearml (line 431) | def log_generations_to_clearml(self, samples, step): method log_generations_to_tensorboard (line 459) | def log_generations_to_tensorboard(self, samples, step): FILE: verl_distillation/verl/utils/transferqueue_utils.py class BatchMeta (line 34) | class BatchMeta: function create_transferqueue_client (line 46) | def create_transferqueue_client( function get_transferqueue_client (line 59) | def get_transferqueue_client() -> "AsyncTransferQueueClient": function get_val_transferqueue_client (line 63) | def get_val_transferqueue_client() -> "AsyncTransferQueueClient": function _run_async_in_temp_loop (line 67) | def _run_async_in_temp_loop(async_func: Callable[..., Any], *args, **kwa... function _find_batchmeta (line 94) | def _find_batchmeta(*args, **kwargs): function _async_batchmeta_to_dataproto (line 104) | async def _async_batchmeta_to_dataproto(batchmeta: "BatchMeta") -> DataP... function _batchmeta_to_dataproto (line 119) | def _batchmeta_to_dataproto(batchmeta: "BatchMeta") -> DataProto: function _async_update_batchmeta_with_output (line 123) | async def _async_update_batchmeta_with_output(output: DataProto, batchme... function _update_batchmeta_with_output (line 139) | def _update_batchmeta_with_output(output: DataProto, batchmeta: "BatchMe... function tqbridge (line 143) | def tqbridge(put_data: bool = True): FILE: verl_distillation/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, ... FILE: verl_distillation/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(input_ids_rmpad: torch.Tensor, position_ids_rmpad: Optio... function ulysses_pad_and_slice_inputs (line 296) | def ulysses_pad_and_slice_inputs( function validate_ulysses_config (line 324) | def validate_ulysses_config(num_heads, ulysses_sequence_size): FILE: verl_distillation/verl/utils/vllm/patch.py function patch_vllm_moe_model_weight_loader (line 63) | def patch_vllm_moe_model_weight_loader(model): FILE: verl_distillation/verl/utils/vllm/utils.py class TensorLoRARequest (line 26) | class TensorLoRARequest(LoRARequest): class VLLMHijack (line 31) | class VLLMHijack: method hijack (line 33) | def hijack(): function is_version_ge (line 120) | def is_version_ge(pkg: str = "vllm", minver: str = "0.7.3"): FILE: verl_distillation/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_distillation/verl/workers/actor/dp_actor.py class DataParallelPPOActor (line 48) | class DataParallelPPOActor(BasePPOActor): method __init__ (line 57) | def __init__(self, config: ActorConfig, actor_module: nn.Module, actor... method _forward_micro_batch (line 86) | def _forward_micro_batch( method _optimizer_step (line 275) | def _optimizer_step(self): method compute_log_prob (line 297) | def compute_log_prob(self, data: DataProto, calculate_entropy=False, m... method update_policy (line 369) | def update_policy(self, data: DataProto): FILE: verl_distillation/verl/workers/actor/megatron_actor.py class MegatronPPOActor (line 58) | class MegatronPPOActor(BasePPOActor): method __init__ (line 59) | def __init__( method _validate_config (line 158) | def _validate_config(self, config) -> None: method compute_log_prob (line 169) | def compute_log_prob(self, data: DataProto, calculate_entropy=False) -... method make_minibatch_iterator (line 283) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 336) | def forward_backward_batch( method update_policy (line 650) | def update_policy(self, dataloader: Iterable[DataProto]) -> dict: FILE: verl_distillation/verl/workers/config/actor.py class PolicyLossConfig (line 32) | class PolicyLossConfig(BaseConfig): class ActorConfig (line 55) | class ActorConfig(BaseConfig): method __post_init__ (line 125) | def __post_init__(self): method validate (line 151) | def validate(self, n_gpus: int, train_batch_size: int, model_config: d... method _check_mutually_exclusive (line 174) | def _check_mutually_exclusive(mbs, mbs_per_gpu, name: str): class McoreActorConfig (line 190) | class McoreActorConfig(ActorConfig): class FSDPActorConfig (line 212) | class FSDPActorConfig(ActorConfig): method __post_init__ (line 238) | def __post_init__(self): method validate (line 242) | def validate(self, n_gpus: int, train_batch_size: int, model_config: d... FILE: verl_distillation/verl/workers/config/critic.py class CriticConfig (line 33) | class CriticConfig(BaseConfig): method __post_init__ (line 90) | def __post_init__(self): method validate (line 108) | def validate(self, n_gpus: int, train_batch_size: int): method _check_mutually_exclusive (line 123) | def _check_mutually_exclusive(mbs, mbs_per_gpu, name: str): class McoreCriticConfig (line 151) | class McoreCriticConfig(CriticConfig): method validate (line 169) | def validate(self, n_gpus: int, train_batch_size: int): class FSDPCriticConfig (line 175) | class FSDPCriticConfig(CriticConfig): method __post_init__ (line 198) | def __post_init__(self): method validate (line 209) | def validate(self, n_gpus: int, train_batch_size: int): class FSDPCriticModelCfg (line 224) | class FSDPCriticModelCfg(BaseModelConfig): FILE: verl_distillation/verl/workers/config/engine.py class McoreEngineConfig (line 25) | class McoreEngineConfig(BaseConfig): method __post_init__ (line 75) | def __post_init__(self) -> None: class FSDPEngineConfig (line 84) | class FSDPEngineConfig(BaseConfig): method __post_init__ (line 119) | def __post_init__(self): FILE: verl_distillation/verl/workers/config/model.py class HFModelConfig (line 31) | class HFModelConfig(BaseConfig): method __post_init__ (line 93) | def __post_init__(self): method get_processor (line 156) | def get_processor(self): FILE: verl_distillation/verl/workers/config/optimizer.py class OptimizerConfig (line 26) | class OptimizerConfig(BaseConfig): method __post_init__ (line 49) | def __post_init__(self): class FSDPOptimizerConfig (line 57) | class FSDPOptimizerConfig(OptimizerConfig): method __post_init__ (line 82) | def __post_init__(self): class McoreOptimizerConfig (line 94) | class McoreOptimizerConfig(OptimizerConfig): function build_optimizer (line 123) | def build_optimizer(parameters, config: FSDPOptimizerConfig): FILE: verl_distillation/verl/workers/config/reward_model.py class SandboxFusionConfig (line 27) | class SandboxFusionConfig(BaseConfig): class RewardModelConfig (line 42) | class RewardModelConfig(BaseConfig): FILE: verl_distillation/verl/workers/config/rollout.py class SamplingConfig (line 35) | class SamplingConfig(BaseConfig): class MultiTurnConfig (line 44) | class MultiTurnConfig(BaseConfig): class CustomAsyncServerConfig (line 62) | class CustomAsyncServerConfig(BaseConfig): class AgentLoopConfig (line 68) | class AgentLoopConfig(BaseConfig): class TraceConfig (line 76) | class TraceConfig(BaseConfig): class ServerConfig (line 82) | class ServerConfig(BaseConfig): class RolloutConfig (line 95) | class RolloutConfig(BaseConfig): method __post_init__ (line 185) | def __post_init__(self): FILE: verl_distillation/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_distillation/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_distillation/verl/workers/critic/megatron_critic.py class MegatronPPOCritic (line 46) | class MegatronPPOCritic(BasePPOCritic): method __init__ (line 47) | def __init__( method _validate_config (line 82) | def _validate_config(self, config) -> None: method compute_values (line 90) | def compute_values(self, data: DataProto) -> DataProto: method make_minibatch_iterator (line 145) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 155) | def forward_backward_batch( method update_critic (line 297) | def update_critic(self, dataloader: Iterable[DataProto]): FILE: verl_distillation/verl/workers/engine/base.py class BaseEngine (line 26) | class BaseEngine: method initialize (line 34) | def initialize(self): method train_mode (line 42) | def train_mode(self): method eval_mode (line 52) | def eval_mode(self): method optimizer_zero_grad (line 62) | def optimizer_zero_grad(self): method optimizer_step (line 68) | def optimizer_step(self): method lr_scheduler_step (line 74) | def lr_scheduler_step(self): method forward_backward_batch (line 83) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method train_batch (line 97) | def train_batch(self, data: TensorDict, loss_function: Callable) -> Any: method infer_batch (line 115) | def infer_batch(self, data: TensorDict, loss_function: Optional[Callab... method get_per_tensor_param (line 129) | def get_per_tensor_param(self): method get_data_parallel_size (line 132) | def get_data_parallel_size(self): method get_data_parallel_rank (line 135) | def get_data_parallel_rank(self): method get_data_parallel_group (line 138) | def get_data_parallel_group(self): method to (line 141) | def to(self, device: str, model: bool = True, optimizer: bool = True): method save_checkpoint (line 152) | def save_checkpoint( method load_checkpoint (line 172) | def load_checkpoint( method is_mp_src_rank_with_outputs (line 186) | def is_mp_src_rank_with_outputs(self): class EngineRegistry (line 193) | class EngineRegistry: method register (line 205) | def register(cls, model_type: str, backend: list[str] | str, device: l... method get_engine_cls (line 240) | def get_engine_cls(cls, model_type: str, backend: str): method new (line 250) | def new(cls, model_type, backend, *args, **kwargs): FILE: verl_distillation/verl/workers/engine/fsdp/transformer_impl.py class FSDPEngine (line 81) | class FSDPEngine(BaseEngine): method __init__ (line 88) | def __init__( method is_mp_src_rank_with_outputs (line 135) | def is_mp_src_rank_with_outputs(self): method initialize (line 142) | def initialize(self): method _init_device_mesh (line 167) | def _init_device_mesh(self): method _build_module (line 185) | def _build_module(self): method _build_lora_module (line 241) | def _build_lora_module(self, module): method _build_fsdp_module (line 273) | def _build_fsdp_module(self, module): method _build_optimizer (line 373) | def _build_optimizer(self, module): method _build_lr_scheduler (line 380) | def _build_lr_scheduler(self, optimizer): method _build_model_optimizer (line 411) | def _build_model_optimizer(self): method train_mode (line 444) | def train_mode(self): method eval_mode (line 452) | def eval_mode(self): method get_data_parallel_rank (line 460) | def get_data_parallel_rank(self): method get_data_parallel_size (line 466) | def get_data_parallel_size(self): method get_data_parallel_group (line 469) | def get_data_parallel_group(self): method forward_backward_batch (line 475) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method forward_step (line 507) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... method optimizer_zero_grad (line 510) | def optimizer_zero_grad(self): method optimizer_step (line 516) | def optimizer_step(self): method lr_scheduler_step (line 545) | def lr_scheduler_step(self): method to (line 553) | def to(self, device: str, model: bool = True, optimizer: bool = True): method save_checkpoint (line 580) | def save_checkpoint( method load_checkpoint (line 602) | def load_checkpoint( method get_per_tensor_param (line 624) | def get_per_tensor_param(self, layered_summon=False, base_sync_done=Fa... class EngineEvalModeCtx (line 664) | class EngineEvalModeCtx: method __init__ (line 665) | def __init__(self, engine: FSDPEngine): method __enter__ (line 668) | def __enter__(self): method __exit__ (line 676) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 692) | class EngineTrainModeCtx: method __init__ (line 693) | def __init__(self, engine: FSDPEngine): method __enter__ (line 696) | def __enter__(self): method __exit__ (line 706) | def __exit__(self, exc_type, exc_value, traceback): class FSDPEngineWithLMHead (line 718) | class FSDPEngineWithLMHead(FSDPEngine): method prepare_model_inputs (line 719) | def prepare_model_inputs(self, micro_batch: TensorDict): method prepare_model_outputs (line 833) | def prepare_model_outputs(self, output, output_args, micro_batch: Tens... method forward_step (line 939) | def forward_step(self, micro_batch: TensorDict, loss_function, forward... class FSDPEngineWithValueHead (line 974) | class FSDPEngineWithValueHead(FSDPEngineWithLMHead): method prepare_model_outputs (line 979) | def prepare_model_outputs(self, output, output_args, micro_batch: Tens... FILE: verl_distillation/verl/workers/engine/fsdp/utils.py function create_device_mesh (line 19) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 40) | def get_sharding_strategy(device_mesh): FILE: verl_distillation/verl/workers/engine/megatron/transformer_impl.py class MegatronEngine (line 53) | class MegatronEngine(BaseEngine): method __init__ (line 54) | def __init__( method _init_device_mesh (line 84) | def _init_device_mesh(self): method _build_tf_config (line 97) | def _build_tf_config(self): method _build_megatron_module (line 125) | def _build_megatron_module(self): method _build_optimizer (line 182) | def _build_optimizer(self): method _build_lr_scheduler (line 189) | def _build_lr_scheduler(self): method is_mp_src_rank_with_outputs (line 197) | def is_mp_src_rank_with_outputs(self): method initialize (line 204) | def initialize(self): method train_mode (line 240) | def train_mode(self): method eval_mode (line 250) | def eval_mode(self): method optimizer_zero_grad (line 260) | def optimizer_zero_grad(self): method optimizer_step (line 270) | def optimizer_step(self): method lr_scheduler_step (line 287) | def lr_scheduler_step(self): method to (line 299) | def to(self, device: str, model: bool = True, optimizer: bool = True): method get_data_parallel_rank (line 326) | def get_data_parallel_rank(self): method get_data_parallel_size (line 329) | def get_data_parallel_size(self): method get_data_parallel_group (line 332) | def get_data_parallel_group(self): method save_checkpoint (line 335) | def save_checkpoint( method load_checkpoint (line 361) | def load_checkpoint( method forward_backward_batch (line 382) | def forward_backward_batch(self, data: TensorDict, loss_function: Call... method get_per_tensor_param (line 451) | def get_per_tensor_param(self): method forward_step (line 466) | def forward_step(self, batch_iter, model, postprocess_micro_batch_func): method postprocess_micro_batch_func (line 469) | def postprocess_micro_batch_func(self, output, data: TensorDict, forwa... class EngineEvalModeCtx (line 473) | class EngineEvalModeCtx: method __init__ (line 474) | def __init__(self, engine: MegatronEngine): method __enter__ (line 477) | def __enter__(self): method __exit__ (line 488) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 494) | class EngineTrainModeCtx: method __init__ (line 495) | def __init__(self, engine: MegatronEngine): method __enter__ (line 498) | def __enter__(self): method __exit__ (line 511) | def __exit__(self, exc_type, exc_value, traceback): class MegatronEngineWithLMHead (line 520) | class MegatronEngineWithLMHead(MegatronEngine): method prepare_model_inputs (line 521) | def prepare_model_inputs(self, batch: TensorDict): method prepare_model_outputs (line 555) | def prepare_model_outputs(self, output: dict, data: TensorDict): method forward_step (line 566) | def forward_step(self, batch_iter: Iterator[TensorDict], model, postpr... method postprocess_micro_batch_func (line 632) | def postprocess_micro_batch_func(self, output, data: TensorDict, forwa... class MegatronEngineWithValueHead (line 659) | class MegatronEngineWithValueHead(MegatronEngineWithLMHead): method forward_step (line 661) | def forward_step(self, batch_iter, model, postprocess_micro_batch_func): method prepare_model_outputs (line 681) | def prepare_model_outputs(self, output: dict | torch.Tensor, data: Ten... FILE: verl_distillation/verl/workers/engine/megatron/utils.py function set_random_seed (line 19) | def set_random_seed(seed): FILE: verl_distillation/verl/workers/engine/mindspeed/transformer_impl.py class MindspeedEngineWithLMHead (line 31) | class MindspeedEngineWithLMHead(MegatronEngineWithLMHead): method __init__ (line 32) | def __init__( FILE: verl_distillation/verl/workers/engine/utils.py function prepare_micro_batches (line 25) | def prepare_micro_batches( function postprocess_batch_func (line 59) | def postprocess_batch_func(output_lst, indices, data: TensorDict): FILE: verl_distillation/verl/workers/fsdp_workers.py function create_device_mesh (line 95) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 105) | def get_sharding_strategy(device_mesh): function get_vl_model_vision_tower (line 117) | def get_vl_model_vision_tower(vl_model_instance): class ActorRolloutRefWorker (line 130) | class ActorRolloutRefWorker(Worker, DistProfilerExtension): method __init__ (line 136) | def __init__(self, config: DictConfig, role: str, **kwargs): method _build_model_optimizer (line 265) | def _build_model_optimizer( method _build_rollout (line 575) | def _build_rollout(self, trust_remote_code=False): method rollout_mode (line 647) | async def rollout_mode(self): method trainer_mode (line 730) | async def trainer_mode(self): method init_model (line 749) | def init_model(self): method update_actor (line 861) | def update_actor(self, data: DataProto): method generate_sequences (line 904) | def generate_sequences(self, prompts: DataProto): method compute_log_prob (line 954) | def compute_log_prob(self, data: DataProto): method compute_ref_log_prob (line 995) | def compute_ref_log_prob(self, data: DataProto): method save_checkpoint (line 1030) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 1079) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... method start_profile (line 1107) | def start_profile(self, **kwargs) -> None: method stop_profile (line 1112) | def stop_profile(self) -> None: method dump_memory_snapshot (line 1117) | def dump_memory_snapshot(self, tag: str = "manual", sub_dir: str = Non... class CriticWorker (line 1132) | class CriticWorker(Worker, DistProfilerExtension): method __init__ (line 1133) | def __init__(self, config: FSDPCriticConfig): method _build_critic_model_optimizer (line 1214) | def _build_critic_model_optimizer(self, config): method init_model (line 1452) | def init_model(self): method compute_values (line 1484) | def compute_values(self, data: DataProto): method update_critic (line 1504) | def update_critic(self, data: DataProto): method save_checkpoint (line 1536) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 1551) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class RewardModelWorker (line 1570) | class RewardModelWorker(Worker, DistProfilerExtension): method __init__ (line 1575) | def __init__(self, config): method _build_model (line 1634) | def _build_model(self, config): method init_model (line 1716) | def init_model(self): method _forward_micro_batch (line 1721) | def _forward_micro_batch(self, micro_batch): method _expand_to_token_level (line 1786) | def _expand_to_token_level(self, data: DataProto, scores: torch.Tensor): method _switch_chat_template (line 1803) | def _switch_chat_template(self, data: DataProto): method compute_rm_score (line 1870) | def compute_rm_score(self, data: DataProto): class AsyncActorRolloutRefWorker (line 1928) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method wake_up (line 1930) | async def wake_up(self): method sleep (line 1935) | async def sleep(self): method get_zeromq_address (line 1942) | def get_zeromq_address(self): method chat_completion (line 1948) | async def chat_completion(self, json_request): method generate (line 1953) | async def generate( FILE: verl_distillation/verl/workers/megatron_workers.py function set_random_seed (line 83) | def set_random_seed(seed): class MegatronWorker (line 102) | class MegatronWorker(Worker): method _init_hf_config_and_tf_config (line 103) | def _init_hf_config_and_tf_config( class ActorRolloutRefWorker (line 175) | class ActorRolloutRefWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 181) | def __init__(self, config: DictConfig, role: str, **kwargs): method _build_model_optimizer (line 289) | def _build_model_optimizer( method _build_rollout (line 392) | def _build_rollout(self, trust_remote_code=False): method init_model (line 442) | def init_model(self): method rollout_mode (line 560) | async def rollout_mode(self): method trainer_mode (line 594) | async def trainer_mode(self): method update_actor (line 619) | def update_actor(self, data: DataProto): method generate_sequences (line 662) | def generate_sequences(self, prompts: DataProto): method compute_ref_log_prob (line 712) | def compute_ref_log_prob(self, data: DataProto): method compute_log_prob (line 734) | def compute_log_prob(self, data: DataProto): method load_checkpoint (line 758) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method load_pretrained_model (line 779) | def load_pretrained_model(self, checkpoint_path, del_local_after_load=... method save_checkpoint (line 783) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... class AsyncActorRolloutRefWorker (line 794) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method wake_up (line 796) | async def wake_up(self): method sleep (line 801) | async def sleep(self): method get_zeromq_address (line 808) | def get_zeromq_address(self): method chat_completion (line 814) | async def chat_completion(self, json_request): method generate (line 819) | async def generate( class CriticWorker (line 830) | class CriticWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 831) | def __init__(self, config: McoreCriticConfig): method _build_critic_model_optimizer (line 898) | def _build_critic_model_optimizer( method init_model (line 967) | def init_model(self): method compute_values (line 1036) | def compute_values(self, data: DataProto): method update_critic (line 1053) | def update_critic(self, data: DataProto): method load_checkpoint (line 1083) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method save_checkpoint (line 1095) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... class RewardModelWorker (line 1105) | class RewardModelWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 1110) | def __init__(self, config): method _build_rm_model (line 1171) | def _build_rm_model(self, model_path, tokenizer, override_model_config... method init_model (line 1214) | def init_model(self): method compute_rm_score (line 1265) | def compute_rm_score(self, data: DataProto): FILE: verl_distillation/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__( FILE: verl_distillation/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_distillation/verl/workers/reward_manager/dapo.py class DAPORewardManager (line 26) | class DAPORewardManager(AbstractRewardManager): method __init__ (line 29) | def __init__( method __call__ (line 53) | def __call__(self, data: DataProto, return_dict: bool = False): FILE: verl_distillation/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_distillation/verl/workers/reward_manager/prime.py function single_compute_score (line 30) | async def single_compute_score(evaluation_func, completion, reference, t... function parallel_compute_score_async (line 44) | async def parallel_compute_score_async( function run_reward_scoring (line 90) | def run_reward_scoring(evaluation_func, completions, references, tasks, ... class PrimeRewardManager (line 102) | class PrimeRewardManager(AbstractRewardManager): method __init__ (line 107) | def __init__( method verify (line 119) | def verify(self, data): method __call__ (line 151) | def __call__(self, data: DataProto, return_dict: bool = False) -> torc... FILE: verl_distillation/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_distillation/verl/workers/reward_model/base.py class BasePPORewardModel (line 28) | class BasePPORewardModel(ABC): method __init__ (line 31) | def __init__( method compute_reward (line 42) | def compute_reward(self, data: DataProto) -> DataProto: FILE: verl_distillation/verl/workers/reward_model/megatron/reward_model.py class MegatronRewardModel (line 34) | class MegatronRewardModel(BasePPORewardModel): method __init__ (line 35) | def __init__( method re_encode_by_rm_tokenizer (line 60) | def re_encode_by_rm_tokenizer(self, data: DataProto) -> DataProto: method compute_reward (line 132) | def compute_reward(self, data: DataProto) -> DataProto: method forward_batch (line 215) | def forward_batch(self, data: DataProto, use_dynamic_bsz=False, micro_... method offload_params_to_cpu (line 335) | def offload_params_to_cpu(self): method load_params_to_cuda (line 343) | def load_params_to_cuda(self): FILE: verl_distillation/verl/workers/roles/actor.py class ActorWorker (line 44) | class ActorWorker(Worker, DistProfilerExtension): method __init__ (line 50) | def __init__(self, config: ActorConfig): method _build_engine (line 63) | def _build_engine(self): method init_model (line 98) | def init_model(self): method set_loss_fn (line 103) | def set_loss_fn(self, loss_fn): method compute_log_prob (line 108) | def compute_log_prob(self, data: DataProto): method update_actor (line 141) | def update_actor(self, data: DataProto): method save_checkpoint (line 188) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 192) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... FILE: verl_distillation/verl/workers/roles/critic.py class CriticWorker (line 46) | class CriticWorker(Worker, DistProfilerExtension): method __init__ (line 52) | def __init__(self, config: CriticConfig): method _build_engine (line 65) | def _build_engine(self): method init_model (line 124) | def init_model(self): method set_loss_fn (line 129) | def set_loss_fn(self, loss_fn): method compute_values (line 134) | def compute_values(self, data: DataProto): method update_critic (line 162) | def update_critic(self, data: DataProto): method save_checkpoint (line 207) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 211) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... FILE: verl_distillation/verl/workers/roles/utils/losses.py function sft_loss (line 27) | def sft_loss(config: ActorConfig, model_output, data: TensorDict, dp_gro... function ppo_loss (line 56) | def ppo_loss(config: ActorConfig, model_output, data: TensorDict, dp_gro... function value_loss (line 115) | def value_loss(config: CriticConfig, model_output, data: TensorDict, dp_... FILE: verl_distillation/verl/workers/roles/utils/padding.py function left_right_2_no_padding (line 30) | def left_right_2_no_padding(data: TensorDict) -> TensorDict: function no_padding_2_padding (line 88) | def no_padding_2_padding(nested_tensor: torch.Tensor, data: TensorDict) ... FILE: verl_distillation/verl/workers/rollout/base.py class BaseRollout (line 28) | class BaseRollout(ABC): method __init__ (line 31) | def __init__( method resume (line 42) | async def resume(self, tags: list[str]): method update_weights (line 51) | async def update_weights( method release (line 64) | async def release(self): method generate_sequences (line 68) | def generate_sequences(self, prompts: DataProto) -> DataProto: function get_rollout_class (line 88) | def get_rollout_class(rollout_name: str, mode: str) -> type[BaseRollout]: FILE: verl_distillation/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_distillation/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_distillation/verl/workers/rollout/replica.py class TokenOutput (line 32) | class TokenOutput(BaseModel): class RolloutMode (line 39) | class RolloutMode(Enum): class RolloutReplica (line 55) | class RolloutReplica(ABC): method __init__ (line 77) | def __init__( method init_hybrid (line 109) | async def init_hybrid(self, worker_group: RayWorkerGroup): method init_colocated (line 122) | async def init_colocated(self, worker_group: RayWorkerGroup): method init_standalone (line 135) | async def init_standalone(self): method get_ray_class_with_init_args (line 163) | def get_ray_class_with_init_args(self) -> RayClassWithInitArgs: method launch_servers (line 168) | async def launch_servers(self): method server_address (line 173) | def server_address(self) -> str: method server_handle (line 178) | def server_handle(self) -> ActorHandle: method wake_up (line 182) | async def wake_up(self): method sleep (line 186) | async def sleep(self): class RolloutReplicaRegistry (line 191) | class RolloutReplicaRegistry: method register (line 197) | def register(cls, name: str, loader: Callable[[], type[RolloutReplica]... method get (line 202) | def get(cls, name: str) -> type[RolloutReplica]: function _load_vllm (line 210) | def _load_vllm(): function _load_sglang (line 216) | def _load_sglang(): function get_rollout_replica_class (line 243) | def get_rollout_replica_class(rollout: str) -> type[RolloutReplica]: FILE: verl_distillation/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_distillation/verl/workers/rollout/sglang_rollout/async_sglang_server.py class SGLangHttpServer (line 51) | class SGLangHttpServer: method __init__ (line 66) | def __init__( method get_master_address (line 111) | def get_master_address(self): method get_server_address (line 115) | def get_server_address(self): method launch_server (line 120) | async def launch_server(self, master_address: str = None, master_port:... method wake_up (line 186) | async def wake_up(self): method sleep (line 199) | async def sleep(self): method generate (line 208) | async def generate( class SGLangReplica (line 243) | class SGLangReplica(RolloutReplica): method get_ray_class_with_init_args (line 244) | def get_ray_class_with_init_args(self) -> RayClassWithInitArgs: method launch_servers (line 254) | async def launch_servers(self): FILE: verl_distillation/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_distillation/verl/workers/rollout/sglang_rollout/sglang_rollout.py function _set_envs_and_config (line 95) | def _set_envs_and_config(server_args: ServerArgs): class AsyncEngine (line 134) | class AsyncEngine(sglang.srt.entrypoints.engine.Engine): method __init__ (line 135) | def __init__(self, **kwargs): method release_memory_occupation (line 138) | async def release_memory_occupation(self, tags: Optional[list[str]] = ... method resume_memory_occupation (line 146) | async def resume_memory_occupation(self, tags: Optional[list[str]] = N... method update_weights_from_tensor (line 154) | async def update_weights_from_tensor(self, update_weights_request: Upd... method flush_cache (line 157) | async def flush_cache(self): method abort_request (line 160) | async def abort_request(self, rid: str = "", abort_all: bool = False): function _pre_process_inputs (line 172) | def _pre_process_inputs( function _extract_logprob_from_output (line 181) | def _extract_logprob_from_output(output): function _post_process_outputs (line 198) | def _post_process_outputs(processing_class, output): function get_tool_call_parser_type (line 229) | def get_tool_call_parser_type( class SGLangRollout (line 257) | class SGLangRollout(BaseRollout): method __init__ (line 258) | def __init__( method _init_distributed_env (line 311) | def _init_distributed_env(self, device_mesh_cpu, **kwargs): method _verify_config (line 356) | def _verify_config(self, model_hf_config): method _init_inference_engine (line 400) | def _init_inference_engine(self, trust_remote_code, actor_module, port): method _init_sampling_params (line 491) | def _init_sampling_params(self, **kwargs): method _initialize_tools (line 506) | def _initialize_tools(self, config, processing_class): method _initialize_interactions (line 554) | def _initialize_interactions(self, config): method generate_sequences (line 571) | def generate_sequences(self, prompts: DataProto, **kwargs) -> DataProto: method _batch_level_generate_sequences (line 598) | def _batch_level_generate_sequences(self, prompts: DataProto, **kwargs... method _async_rollout_a_request (line 807) | async def _async_rollout_a_request( method _handle_engine_call (line 1053) | async def _handle_engine_call( method _handle_engine_generate (line 1059) | async def _handle_engine_generate( method _handle_pending_state (line 1077) | async def _handle_pending_state(self, _req: AsyncRolloutRequest) -> As... method _req_level_generate_sequences (line 1103) | def _req_level_generate_sequences(self, prompts: DataProto, **kwargs) ... method _create_padding_request (line 1362) | def _create_padding_request(self, original_req: AsyncRolloutRequest) -... method _preprocess_prompt_to_async_rollout_requests (line 1426) | def _preprocess_prompt_to_async_rollout_requests(self, prompts: DataPr... method resume (line 1499) | async def resume(self, tags: list[str]): method release (line 1508) | async def release(self): method update_weights (line 1513) | async def update_weights(self, weights: Generator[tuple[str, torch.Ten... class ServerAdapter (line 1539) | class ServerAdapter(BaseRollout): method __init__ (line 1547) | def __init__( method _init_server_adapter (line 1564) | async def _init_server_adapter(self): method resume (line 1580) | async def resume(self, tags: list[str]): method release (line 1590) | async def release(self): method update_weights (line 1596) | async def update_weights(self, weights: Generator[tuple[str, torch.Ten... FILE: verl_distillation/verl/workers/rollout/sglang_rollout/utils.py function broadcast_pyobj (line 26) | def broadcast_pyobj( function get_named_tensor_buckets (line 71) | def get_named_tensor_buckets( FILE: verl_distillation/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_distillation/verl/workers/rollout/utils.py function is_valid_ipv6_address (line 26) | def is_valid_ipv6_address(address: str) -> bool: function get_free_port (line 34) | def get_free_port(address: str) -> tuple[int, socket.socket]: function run_unvicorn (line 48) | async def run_unvicorn(app: FastAPI, server_args, server_address, max_re... FILE: verl_distillation/verl/workers/rollout/vllm_rollout/__init__.py function get_version (line 20) | def get_version(pkg): FILE: verl_distillation/verl/workers/rollout/vllm_rollout/utils.py function get_vllm_max_lora_rank (line 21) | def get_vllm_max_lora_rank(lora_rank: int): FILE: verl_distillation/verl/workers/rollout/vllm_rollout/vllm_async_server.py class ExternalZeroMQDistributedExecutor (line 61) | class ExternalZeroMQDistributedExecutor(Executor): method _init_executor (line 66) | def _init_executor(self) -> None: method collective_rpc (line 92) | def collective_rpc( method check_health (line 119) | def check_health(self): class vLLMHttpServerBase (line 123) | class vLLMHttpServerBase: method __init__ (line 130) | def __init__( method get_master_address (line 185) | def get_master_address(self): method get_server_address (line 189) | def get_server_address(self): method launch_server (line 194) | async def launch_server(self, master_address: str = None, master_port:... method run_server (line 313) | async def run_server(self, args: argparse.Namespace): method run_headless (line 337) | async def run_headless(self, args: argparse.Namespace): method generate (line 363) | async def generate( method wake_up (line 407) | async def wake_up(self): method sleep (line 418) | async def sleep(self): method wait_for_requests_to_drain (line 430) | async def wait_for_requests_to_drain(self): class vLLMHttpServer (line 435) | class vLLMHttpServer(vLLMHttpServerBase): method __init__ (line 442) | def __init__( class vLLMReplica (line 459) | class vLLMReplica(RolloutReplica): method __init__ (line 460) | def __init__( method get_ray_class_with_init_args (line 471) | def get_ray_class_with_init_args(self) -> RayClassWithInitArgs: method launch_servers (line 481) | async def launch_servers(self): method sleep (line 546) | async def sleep(self): function _qwen2_5_vl_dedup_image_tokens (line 553) | def _qwen2_5_vl_dedup_image_tokens(prompt_ids: list[int], processor): FILE: verl_distillation/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py function _pre_process_inputs (line 100) | def _pre_process_inputs(pad_token_id, prompt_token_ids: torch.Tensor) ->... class vLLMRollout (line 113) | class vLLMRollout(BaseRollout): method __init__ (line 114) | def __init__( method update_sampling_params (line 263) | def update_sampling_params(self, **kwargs): method generate_sequences (line 280) | def generate_sequences(self, prompts: DataProto, **kwargs) -> DataProto: method resume (line 438) | async def resume(self, tags: list[str]): method release (line 452) | async def release(self): method update_weights (line 461) | async def update_weights(self, weights: Generator[tuple[str, torch.Ten... function _monkey_patch_compute_logits (line 488) | def _monkey_patch_compute_logits(model, vocab_size: int): class vLLMAsyncRollout (line 503) | class vLLMAsyncRollout(BaseRollout): method __init__ (line 506) | def __init__( method _init_zeromq (line 528) | def _init_zeromq(self) -> str: method _loop_forever (line 557) | async def _loop_forever(self): method _init_worker (line 569) | def _init_worker(self, all_kwargs: list[dict[str, Any]]): method _load_model (line 587) | def _load_model(self, *args, **kwargs): method _execute_method (line 591) | async def _execute_method(self, method: str | bytes, *args, **kwargs): method resume (line 601) | async def resume(self, tags: list[str]): method release (line 610) | async def release(self): method update_weights (line 615) | async def update_weights(self, weights: Generator[tuple[str, torch.Ten... method generate_sequences (line 641) | def generate_sequences(self, prompts: DataProto) -> DataProto: method get_zeromq_address (line 647) | def get_zeromq_address(self): FILE: verl_distillation/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_distillation/verl/workers/sharding_manager/fsdp_sglang.py class FSDPSGLangShardingManager (line 46) | class FSDPSGLangShardingManager(BaseShardingManager): method __init__ (line 48) | def __init__( method __enter__ (line 95) | def __enter__(self): method __exit__ (line 102) | def __exit__(self, exc_type, exc_value, traceback): method update_weights (line 106) | async def update_weights(self, params): method release_memory (line 120) | async def release_memory(self): method wake_up (line 129) | async def wake_up(self): method sleep (line 186) | async def sleep(self): method preprocess_data (line 207) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 218) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_distillation/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_distillation/verl/workers/sharding_manager/fsdp_vllm.py class FSDPVLLMShardingManager (line 57) | class FSDPVLLMShardingManager(BaseShardingManager): method __init__ (line 66) | def __init__( method __enter__ (line 129) | def __enter__(self): method __exit__ (line 245) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 264) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 276) | def postprocess_data(self, data: DataProto) -> DataProto: method update_params (line 283) | def update_params(self, updated_params, peft_config=None): FILE: verl_distillation/verl/workers/sharding_manager/megatron_sglang.py class MegatronSGLangShardingManager (line 60) | class MegatronSGLangShardingManager(BaseShardingManager): method __init__ (line 82) | def __init__( method __enter__ (line 123) | def __enter__(self): method __exit__ (line 130) | def __exit__(self, exc_type, exc_value, traceback): method update_weights (line 134) | async def update_weights(self, params): method release_memory (line 163) | async def release_memory(self): method wake_up (line 168) | async def wake_up(self): method sleep (line 196) | async def sleep(self): method preprocess_data (line 215) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 223) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_distillation/verl/workers/sharding_manager/megatron_vllm.py class MegatronVLLMShardingManager (line 59) | class MegatronVLLMShardingManager(BaseShardingManager): method __init__ (line 85) | def __init__( method __enter__ (line 145) | def __enter__(self): method __exit__ (line 195) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 211) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 223) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_rl/examples/data_preprocess/aime2024_multiturn_w_tool.py function make_map_fn (line 40) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/dapo_multiturn_w_tool.py function make_map_fn (line 40) | def make_map_fn(split): FILE: verl_rl/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 58) | def generate_rm_dataset(target_hdfs_path_dir, local_dir="~/data/full_hh_... function generate_rl_dataset (line 86) | def generate_rl_dataset(target_hdfs_path_dir, local_dir="~/data/full_hh_... FILE: verl_rl/examples/data_preprocess/geo3k.py function make_map_fn (line 46) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/geo3k_multiturn_w_tool.py function make_map_fn (line 45) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/gsm8k.py function extract_solution (line 27) | def extract_solution(solution_str): function make_map_fn (line 52) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/gsm8k_multiturn_w_interaction.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 53) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/gsm8k_multiturn_w_tool.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 53) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/gsm8k_tool_agent_loop.py function extract_solution (line 29) | def extract_solution(solution_str): function make_map_fn (line 53) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/hellaswag.py function preprocess (line 28) | def preprocess(text): function make_map_fn (line 54) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/math_dataset.py function extract_solution (line 27) | def extract_solution(solution_str): function make_map_fn (line 50) | def make_map_fn(split): FILE: verl_rl/examples/data_preprocess/multiturn.py function main (line 24) | def main(): FILE: verl_rl/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: verl_rl/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: verl_rl/examples/split_placement/main_ppo_split.py function _select_rm_score_fn (line 28) | def _select_rm_score_fn(data_source): class RewardManager (line 37) | class RewardManager: method __init__ (line 38) | def __init__(self, tokenizer, num_examine) -> None: method __call__ (line 42) | def __call__(self, data: DataProto, return_dict: bool = False): function main (line 94) | def main(config): function main_task (line 106) | def main_task(config): FILE: verl_rl/examples/split_placement/split_monkey_patch.py function fit (line 37) | def fit(self): FILE: verl_rl/recipe/char_count/create_dataset.py function generate_random_char (line 30) | def generate_random_char(): function create_prompt_response (line 34) | def create_prompt_response(min_length=3, max_length=5): FILE: verl_rl/recipe/char_count/reward_function.py function char_count_reward_function (line 22) | def char_count_reward_function(data_source, solution_str, ground_truth, ... FILE: verl_rl/recipe/dapo/dapo_ray_trainer.py class RayDAPOTrainer (line 46) | class RayDAPOTrainer(RayPPOTrainer): method fit (line 51) | def fit(self): FILE: verl_rl/recipe/dapo/main_dapo.py function main (line 32) | def main(config): function run_ppo (line 36) | def run_ppo(config) -> None: class TaskRunner (line 59) | class TaskRunner: method run (line 60) | def run(self, config): FILE: verl_rl/recipe/entropy/entropy_ray_trainer.py class RayEntropyTrainer (line 45) | class RayEntropyTrainer(RayPPOTrainer): method fit (line 50) | def fit(self): FILE: verl_rl/recipe/entropy/main_entropy.py function main (line 26) | def main(config): function run_ppo (line 30) | def run_ppo(config) -> None: function merge_dict (line 49) | def merge_dict(a: dict, b: dict) -> dict: class TaskRunner (line 65) | class TaskRunner: method run (line 66) | def run(self, config): function create_rl_dataset (line 182) | def create_rl_dataset(data_paths, data_config, tokenizer, processor): function create_rl_sampler (line 220) | def create_rl_sampler(data_config, dataset): FILE: verl_rl/recipe/entropy/reward.py function load_reward_manager (line 26) | def load_reward_manager(config, tokenizer, num_examine, **reward_kwargs): function compute_reward_async (line 80) | def compute_reward_async(data: DataProto, config, tokenizer): FILE: verl_rl/recipe/entropy/reward_score/__init__.py function _default_compute_score (line 21) | def _default_compute_score( FILE: verl_rl/recipe/entropy/reward_score/entropy_math/__init__.py function timeout_ours (line 40) | def timeout_ours(timeout_seconds: int = 8): function mathd_normalize_answer (line 67) | def mathd_normalize_answer(answer: Optional[str]) -> Optional[str]: function _strip_string (line 220) | def _strip_string(string): function normalize_final_answer (line 440) | def normalize_final_answer(final_answer: str) -> str: function repeatness (line 477) | def repeatness(s: str): class timeout (line 520) | class timeout: method __init__ (line 521) | def __init__(self, seconds=1, error_message="Timeout"): method handle_timeout (line 525) | def handle_timeout(self, signum, frame): method __enter__ (line 528) | def __enter__(self): method __exit__ (line 532) | def __exit__(self, type, value, traceback): function latex_eval (line 536) | def latex_eval(latex): function numeric_equal (line 542) | def numeric_equal(prediction: float, reference: float): function symbolic_equal (line 553) | def symbolic_equal(a, b): function _is_latex_equal (line 609) | def _is_latex_equal(str1, str2): function is_latex_equal (line 629) | def is_latex_equal(given_answer: str, ground_truth: str) -> bool: function is_value_equal (line 682) | def is_value_equal(given_answer: str, ground_truth: str) -> bool: function _sympy_parse (line 701) | def _sympy_parse(expr: str): function _parse_latex (line 710) | def _parse_latex(expr: str) -> str: function _is_float (line 728) | def _is_float(num: str) -> bool: function _is_int (line 736) | def _is_int(x: float) -> bool: function _is_frac (line 743) | def _is_frac(expr: str) -> bool: function _str_is_int (line 747) | def _str_is_int(x: str) -> bool: function _str_to_int (line 756) | def _str_to_int(x: str) -> bool: function _inject_implicit_mixed_number (line 762) | def _inject_implicit_mixed_number(step: str): function _strip_properly_formatted_commas (line 772) | def _strip_properly_formatted_commas(expr: str): function _normalize (line 783) | def _normalize(expr: str) -> str: function count_unknown_letters_in_expr (line 856) | def count_unknown_letters_in_expr(expr: str): function should_allow_eval (line 863) | def should_allow_eval(expr: str): function are_equal_under_sympy (line 880) | def are_equal_under_sympy(ground_truth_normalized: str, given_normalized... function split_tuple (line 894) | def split_tuple(expr: str): function last_boxed_only_string (line 913) | def last_boxed_only_string(string): function remove_boxed (line 940) | def remove_boxed(s): function extract_boxed_answer (line 950) | def extract_boxed_answer(solution: str) -> str: function grade_answer_sympy (line 957) | def grade_answer_sympy(given_answer: str, ground_truth: str) -> bool: function grade_answer_mathd (line 997) | def grade_answer_mathd(given_answer: str, ground_truth: str) -> bool: function extract_answer (line 1007) | def extract_answer(passage: str) -> str: function grade (line 1013) | def grade(model_answer: str, gt_answer: str, fast: bool = True): function compute_score (line 1027) | def compute_score(model_response, gt_answer, fast=False): FILE: verl_rl/recipe/entropy/reward_score/entropy_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_rl/recipe/entropy/reward_score/entropy_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_rl/recipe/genrm_remote/reward_function.py function get_response (line 45) | def get_response(problem, solution_str, ground_truth): function compute_reward (line 68) | def compute_reward(response): function compute_score (line 80) | def compute_score(data_source, solution_str, ground_truth, extra_info): function compute_score_batch (line 99) | def compute_score_batch(data_sources, solution_strs, ground_truths, extr... FILE: verl_rl/recipe/langgraph_agent/chat_model.py class MaxTokenExceededError (line 46) | class MaxTokenExceededError(Exception): class ChatModel (line 52) | class ChatModel(BaseChatModel): method bind_tools (line 80) | def bind_tools(self, tools, **kwargs) -> Runnable[LanguageModelInput, ... method with_structured_output (line 97) | def with_structured_output( method _generate (line 107) | def _generate( method _agenerate (line 115) | async def _agenerate( method _llm_type (line 150) | def _llm_type(self) -> str: method _preprocess (line 154) | async def _preprocess(self, messages: list[BaseMessage], **kwargs: Any... method _postprocess (line 226) | async def _postprocess( class TruncateStructuredTool (line 284) | class TruncateStructuredTool(StructuredTool): method _arun (line 293) | async def _arun( function convert_to_agent_output (line 314) | def convert_to_agent_output(messages: list[BaseMessage], response_length... FILE: verl_rl/recipe/langgraph_agent/example/create_dataset.py function generate_math_expression (line 23) | def generate_math_expression(min_terms=2, max_terms=5, min_number=1, max... function test (line 78) | def test(): function calculate (line 96) | def calculate(expression: str) -> float: function generate_data (line 211) | def generate_data(total_num_dataset, split): FILE: verl_rl/recipe/langgraph_agent/example/math_expression.py function calculate (line 20) | def calculate(a: int, b: int, operand: str) -> int: class MathExpressionReactAgentLoop (line 35) | class MathExpressionReactAgentLoop(ReactAgentLoop): method init_class (line 37) | def init_class(cls, config, tokenizer, **kwargs): FILE: verl_rl/recipe/langgraph_agent/react_agent_loop.py function call_model (line 36) | async def call_model(state: MessagesState, config: RunnableConfig): function should_continue (line 47) | def should_continue(state: MessagesState, config: RunnableConfig) -> Lit... class ReactAgentLoop (line 71) | class ReactAgentLoop(AgentLoopBase): method init_class (line 73) | def init_class(cls, config, tokenizer, **kwargs): method build_graph (line 83) | def build_graph(cls) -> StateGraph: method run (line 102) | async def run(self, messages: list[dict[str, Any]], sampling_params: d... FILE: verl_rl/recipe/langgraph_agent/test_react_agent_loop.py function init_config (line 30) | def init_config() -> DictConfig: function get_current_temperature (line 52) | def get_current_temperature(location: str, unit: str = "celsius"): function get_temperature_date (line 71) | def get_temperature_date(location: str, date: str, unit: str = "celsius"): class TestReactAgentLoop (line 91) | class TestReactAgentLoop(ReactAgentLoop): method init_class (line 93) | def init_class(cls, config, tokenizer, **kwargs): function test_react_agent (line 99) | def test_react_agent(init_config): FILE: verl_rl/recipe/minicpmo/rl_dataset.py function build_transform (line 39) | def build_transform(): function build_image_bound (line 50) | def build_image_bound(input_ids, tokenizer, new_schema=True, logger=None): function preprocess (line 70) | def preprocess( function slice_image (line 201) | def slice_image(image, max_slice_nums=9, scale_resolution=448, patch_siz... function ensure_divide (line 252) | def ensure_divide(length, patch_size): function find_best_resize (line 256) | def find_best_resize(original_size, scale_resolution, patch_size, allow_... function get_refine_size (line 267) | def get_refine_size(original_size, grid, scale_resolution, patch_size, a... function split_to_patches (line 289) | def split_to_patches(image, grid): function get_grid_placeholder (line 306) | def get_grid_placeholder(tokenizer, grid, query_num, new_schema=False): function reshape_by_patch (line 327) | def reshape_by_patch(image_tensor, patch_size): function init_minicpmo_config (line 340) | def init_minicpmo_config(processor, config): function process_minicpmo_data (line 355) | def process_minicpmo_data( class RLHFDataset (line 388) | class RLHFDataset(Dataset): method __init__ (line 405) | def __init__( method _download (line 442) | def _download(self, use_origin_parquet=False): method _read_files_and_tokenize (line 449) | def _read_files_and_tokenize(self): method resume_dataset_state (line 459) | def resume_dataset_state(self): method __len__ (line 468) | def __len__(self): method _build_messages (line 471) | def _build_messages(self, example: dict): method __getitem__ (line 474) | def __getitem__(self, item): method __getstate__ (line 545) | def __getstate__(self): FILE: verl_rl/recipe/one_step_off_policy/fsdp_workers.py class ActorRolloutRefWorker (line 53) | class ActorRolloutRefWorker(ARRWorker): method _get_actor_params (line 54) | def _get_actor_params(self): method sync_rollout_weights (line 65) | def sync_rollout_weights(self): method get_actor_weights_info (line 91) | def get_actor_weights_info(self): class RolloutWorker (line 111) | class RolloutWorker(ActorRolloutRefWorker): method __init__ (line 112) | def __init__(self, config: DictConfig, role: str): method init_model (line 139) | def init_model(self): method async_generate_sequences (line 217) | def async_generate_sequences(self, *args, **kwargs): method set_actor_weights_info (line 221) | def set_actor_weights_info(self, weights_info): class AsyncActorRolloutRefWorker (line 226) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method __init__ (line 227) | def __init__(self, *args, **kwargs): FILE: verl_rl/recipe/one_step_off_policy/main_ppo.py function main (line 34) | def main(config): function run_ppo (line 39) | def run_ppo(config) -> None: class TaskRunner (line 71) | class TaskRunner: method run (line 72) | def run(self, config): FILE: verl_rl/recipe/one_step_off_policy/megatron_workers.py class ActorRolloutRefWorker (line 39) | class ActorRolloutRefWorker(ARRWorker): method __init__ (line 40) | def __init__(self, config: DictConfig, role: str): method _get_actor_params_generator (line 48) | def _get_actor_params_generator(self): method sync_rollout_weights (line 68) | def sync_rollout_weights(self): method get_actor_weights_info (line 95) | def get_actor_weights_info(self): class RolloutWorker (line 109) | class RolloutWorker(ActorRolloutRefWorker): method __init__ (line 110) | def __init__(self, config: DictConfig, role: str): method init_model (line 115) | def init_model(self): method async_generate_sequences (line 190) | def async_generate_sequences(self, *args, **kwargs): method set_actor_weights_info (line 194) | def set_actor_weights_info(self, weights_info): class AsyncActorRolloutRefWorker (line 199) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method __init__ (line 200) | def __init__(self, *args, **kwargs): FILE: verl_rl/recipe/one_step_off_policy/ray_trainer.py class GenerationBatchFuture (line 58) | class GenerationBatchFuture: method __init__ (line 63) | def __init__(self, epoch, batch, gen_batch_output): method get (line 73) | def get(self): class OneStepOffRayTrainer (line 91) | class OneStepOffRayTrainer(RayPPOTrainer): method __init__ (line 94) | def __init__( method _validate (line 176) | def _validate(self): method init_workers (line 182) | def init_workers(self): method sync_rollout_weights (line 298) | def sync_rollout_weights(self): method _create_continuous_iterator (line 303) | def _create_continuous_iterator(self): method _async_gen_next_batch (line 312) | def _async_gen_next_batch(self, continuous_iterator): method fit (line 346) | def fit(self): FILE: verl_rl/recipe/one_step_off_policy/vllm_sharding_manager.py class VLLMShardingManager (line 33) | class VLLMShardingManager(BaseShardingManager): method __init__ (line 35) | def __init__(self, inference_engine, device_mesh: DeviceMesh): method __enter__ (line 49) | def __enter__(self): method __exit__ (line 53) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 58) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 69) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_rl/recipe/onerec/main_onerec_ppo.py function main (line 40) | def main(config): function run_ppo (line 49) | def run_ppo(config) -> None: class OneRecTaskRunner (line 84) | class OneRecTaskRunner: method run (line 92) | def run(self, config): FILE: verl_rl/recipe/onerec/onerec_fsdp_workers.py class OneRecActorRolloutRefWorker (line 12) | class OneRecActorRolloutRefWorker(ActorRolloutRefWorker): method _build_rollout (line 16) | def _build_rollout(self, trust_remote_code=False): FILE: verl_rl/recipe/onerec/onerec_ray_trainer.py class Role (line 70) | class Role(Enum): class ResourcePoolManager (line 85) | class ResourcePoolManager: method create_resource_pool (line 94) | def create_resource_pool(self): method get_resource_pool (line 114) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 118) | def get_n_gpus(self) -> int: method _check_resource_available (line 122) | def _check_resource_available(self): function apply_kl_penalty (line 156) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 199) | def compute_response_mask(data: DataProto): function compute_advantage (line 217) | def compute_advantage( class RayPPOTrainer (line 298) | class RayPPOTrainer: method __init__ (line 308) | def __init__( method _validate_config (line 394) | def _validate_config(self): method _create_dataloader (line 561) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _dump_generations (line 635) | def _dump_generations(self, inputs, outputs, scores, reward_extra_info... method _maybe_log_val_generations (line 665) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _validate (line 689) | def _validate(self): method init_workers (line 981) | def init_workers(self): method _save_checkpoint (line 1085) | def _save_checkpoint(self): method _load_checkpoint (line 1143) | def _load_checkpoint(self): method _start_profiling (line 1200) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 1211) | def _stop_profiling(self, do_profile: bool) -> None: method _balance_batch (line 1222) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method fit (line 1239) | def fit(self): FILE: verl_rl/recipe/onerec/onerec_recipe.py function collate_fn (line 25) | def collate_fn(samples: list[dict[str, Any]]) -> dict[str, Any]: class OneRecDataset (line 46) | class OneRecDataset(Dataset): method __init__ (line 47) | def __init__( method _download (line 93) | def _download(self, use_origin_parquet: bool = False) -> None: method _read_files_and_tokenize (line 104) | def _read_files_and_tokenize(self) -> None: method _extract_prompt_fields (line 132) | def _extract_prompt_fields(self, row: dict[str, Any]) -> dict[str, Any]: method maybe_filter_out_long_prompts (line 174) | def maybe_filter_out_long_prompts(self, dataframe: datasets.Dataset) -... method resume_dataset_state (line 210) | def resume_dataset_state(self) -> None: method __len__ (line 218) | def __len__(self) -> int: # type: ignore[override] method _build_messages (line 221) | def _build_messages(self, example: dict[str, Any]) -> list[dict[str, A... method __getitem__ (line 240) | def __getitem__(self, index: int) -> dict[str, Any]: # type: ignore[o... method _truncate_ids (line 350) | def _truncate_ids(self, token_ids: list[int]) -> list[int]: method __getstate__ (line 366) | def __getstate__(self) -> dict[str, Any]: function _extract_all_tuples (line 377) | def _extract_all_tuples(text: Any) -> list[tuple[str, str, str]]: function think_format_reward (line 386) | def think_format_reward(prediction: str) -> float: function partial_hit_reward (line 410) | def partial_hit_reward(prediction: str, ground_truth: str) -> float: function hit_reward (line 453) | def hit_reward(prediction: str, ground_truth: str) -> float: function first_sid_hit_reward (line 479) | def first_sid_hit_reward(prediction: str, ground_truth: str) -> float: function pass_rate (line 511) | def pass_rate(prediction: str, ground_truth: str) -> float: function compute_score (line 535) | def compute_score( FILE: verl_rl/recipe/onerec/onerec_vllm_rollout.py class OneRecvLLMRollout (line 16) | class OneRecvLLMRollout(vLLMRollout): method _two_stage_generation (line 24) | def _two_stage_generation(self, prompts: DataProto, **kwargs) -> DataP... method generate_sequences (line 274) | def generate_sequences(self, prompts: DataProto, **kwargs) -> DataProto: FILE: verl_rl/recipe/prime/main_prime.py function main (line 39) | def main(config): function run_prime (line 43) | def run_prime(config, compute_score=None): function main_task (line 55) | def main_task(config, compute_score=None): FILE: verl_rl/recipe/prime/prime_core_algos.py function compute_rloo_advantage_return (line 21) | def compute_rloo_advantage_return(data: verl.DataProto, response_mask: t... function compute_ce_dpo_loss_rm (line 82) | def compute_ce_dpo_loss_rm(token_level_scores, acc, response_mask, beta): function compute_detach_dpo_loss_rm (line 88) | def compute_detach_dpo_loss_rm(token_level_scores, acc, Q_bc, acc_bc, re... function compute_dpo_accuracy (line 119) | def compute_dpo_accuracy(token_level_scores, acc, response_mask, n_sampl... function compute_dpo_abs_accuracy (line 146) | def compute_dpo_abs_accuracy(token_level_scores, acc, response_mask, n_s... FILE: verl_rl/recipe/prime/prime_dp_rm.py class DataParallelPRIMERewardModel (line 38) | class DataParallelPRIMERewardModel: method __init__ (line 39) | def __init__(self, config, reward_module: nn.Module, ref_module: nn.Mo... method _forward_micro_batch (line 51) | def _forward_micro_batch(self, micro_batch, prompt_length): method _optimizer_step (line 230) | def _optimizer_step(self): method prime_norm (line 242) | def prime_norm(self, token_level_scores): method compute_rm_score (line 248) | def compute_rm_score(self, data: DataProto): method update_rm (line 291) | def update_rm(self, data: DataProto): FILE: verl_rl/recipe/prime/prime_fsdp_workers.py class PRIMERewardModelWorker (line 51) | class PRIMERewardModelWorker(Worker): method __init__ (line 52) | def __init__(self, config): method _build_reward_ref_model_optimizer (line 87) | def _build_reward_ref_model_optimizer(self, config): method init_model (line 247) | def init_model(self): method compute_rm_score (line 279) | def compute_rm_score(self, data: DataProto): method update_rm (line 314) | def update_rm(self, data: DataProto): method save_checkpoint (line 356) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 371) | def load_checkpoint(self, local_path, del_local_after_load=True): FILE: verl_rl/recipe/prime/prime_ray_trainer.py function compute_advantage (line 42) | def compute_advantage(data: DataProto, adv_estimator, config): function compute_data_metrics (line 58) | def compute_data_metrics(batch, use_critic=True): function compute_response_mask (line 119) | def compute_response_mask(data: DataProto): function compute_timing_metrics (line 126) | def compute_timing_metrics(batch, timing_raw): class RayPRIMETrainer (line 146) | class RayPRIMETrainer(RayPPOTrainer): method __init__ (line 153) | def __init__( method _validate_config (line 179) | def _validate_config(self): method _create_dataloader (line 183) | def _create_dataloader(self, *args, **kwargs): method _save_checkpoint (line 237) | def _save_checkpoint(self): method _load_checkpoint (line 282) | def _load_checkpoint(self): method fit (line 335) | def fit(self): method filter_and_downsample (line 543) | def filter_and_downsample(self, scores, batch: DataProto): FILE: verl_rl/recipe/r1/data_process.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_gpqa_dimond_dataset (line 53) | def build_gpqa_dimond_dataset(): function build_cnmo2024_dataset (line 84) | def build_cnmo2024_dataset(): function build_livecodebench_dataset (line 107) | def build_livecodebench_dataset(): FILE: verl_rl/recipe/r1/main_eval.py function process_item (line 33) | def process_item(config, data_source, response_lst, reward_data): function main (line 41) | def main(config): FILE: verl_rl/recipe/r1/reward_score.py function reward_func (line 16) | def reward_func(data_source, solution_str, ground_truth, extra_info=None): FILE: verl_rl/recipe/r1/tasks/gpqa.py function compute_score (line 21) | def compute_score(solution_str, ground_truth) -> float: FILE: verl_rl/recipe/r1/tasks/livecodebench.py function _temp_run (line 25) | def _temp_run(in_outs, generation, debug, result, metadata_list, timeout): function check_correctness (line 31) | def check_correctness(in_outs, generation, timeout, debug=True): function compute_score (line 55) | def compute_score(completion, test_cases): FILE: verl_rl/recipe/r1/tasks/math.py function compute_score (line 23) | def compute_score(model_output: str, ground_truth: str) -> bool: FILE: verl_rl/recipe/retool/retool.py class CustomSandboxFusionTool (line 29) | class CustomSandboxFusionTool(SandboxFusionTool): method __init__ (line 30) | def __init__(self, config: dict, tool_schema: OpenAIFunctionToolSchema): method execute (line 35) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class CustomRLHFDataset (line 64) | class CustomRLHFDataset(RLHFDataset): method _read_files_and_tokenize (line 67) | def _read_files_and_tokenize(self): method map_fn (line 84) | def map_fn(self, row: dict, *, data_source: str = None): method map_fn2 (line 100) | def map_fn2(self, row: dict): function compute_score (line 107) | def compute_score(data_source, solution_str, ground_truth, extra_info): FILE: verl_rl/recipe/retool/retool_multi_turn_sft_preprocess.py function main (line 25) | def main(): FILE: verl_rl/recipe/retool/retool_sft_preprocess.py function extract_code_message (line 28) | def extract_code_message(content: str) -> tuple[dict[str, Any], str]: function extract_answer_message (line 57) | def extract_answer_message(content: str) -> tuple[dict[str, Any], str]: function extract_interpreter_message (line 73) | def extract_interpreter_message(content: str) -> tuple[dict[str, Any], s... function process (line 89) | def process(row: dict, *, tools: str): FILE: verl_rl/recipe/spin/core_algos.py class AdaptiveKLController (line 21) | class AdaptiveKLController: method __init__ (line 27) | def __init__(self, init_kl_coef, target_kl, horizon): method update (line 32) | def update(self, current_kl, n_steps): class FixedKLController (line 39) | class FixedKLController: method __init__ (line 42) | def __init__(self, kl_coef): method update (line 45) | def update(self, current_kl, n_steps): function get_kl_controller (line 49) | def get_kl_controller(kl_ctrl): function compute_onlinedpo_pref (line 59) | def compute_onlinedpo_pref( function compute_online_dpo_loss (line 131) | def compute_online_dpo_loss( function get_batch_logps (line 161) | def get_batch_logps( FILE: verl_rl/recipe/spin/dp_actor.py class SPINDataParallelPPOActor (line 33) | class SPINDataParallelPPOActor(DataParallelPPOActor): method compute_log_prob (line 34) | def compute_log_prob(self, data: DataProto) -> torch.Tensor: method update_policy_dpo_with_ref (line 92) | def update_policy_dpo_with_ref(self, data: DataProto): FILE: verl_rl/recipe/spin/fsdp_workers.py function create_device_mesh (line 56) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 66) | def get_sharding_strategy(device_mesh): class SPINRolloutRefWorker (line 78) | class SPINRolloutRefWorker(ActorRolloutRefWorker): method init_model (line 80) | def init_model(self): method compute_ref_log_prob (line 173) | def compute_ref_log_prob(self, data: DataProto): method compute_log_prob (line 200) | def compute_log_prob(self, data: DataProto): method update_actor_dpo (line 235) | def update_actor_dpo(self, data: DataProto): class RewardModelWorker (line 300) | class RewardModelWorker(Worker): method __init__ (line 305) | def __init__(self, config): method _build_model (line 337) | def _build_model(self, config): method init_model (line 404) | def init_model(self): method _forward_micro_batch (line 409) | def _forward_micro_batch(self, micro_batch): method _expand_to_token_level (line 464) | def _expand_to_token_level(self, data: DataProto, scores: torch.Tensor): method _switch_chat_template (line 479) | def _switch_chat_template(self, data: DataProto): method compute_rm_score (line 543) | def compute_rm_score(self, data: DataProto): FILE: verl_rl/recipe/spin/main_spin.py function main (line 26) | def main(config): function run_ppo (line 30) | def run_ppo(config) -> None: class TaskRunner (line 47) | class TaskRunner: method run (line 48) | def run(self, config): FILE: verl_rl/recipe/spin/spin_trainer.py class AdvantageEstimator (line 56) | class AdvantageEstimator(str, Enum): class ResourcePoolManager (line 70) | class ResourcePoolManager: method create_resource_pool (line 80) | def create_resource_pool(self): method get_resource_pool (line 93) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 97) | def get_n_gpus(self) -> int: method _check_resource_available (line 101) | def _check_resource_available(self): function _compute_response_info (line 132) | def _compute_response_info(batch: DataProto) -> dict[str, Any]: function compute_dpo_data_metrics (line 179) | def compute_dpo_data_metrics(batch: DataProto) -> dict[str, Any]: function apply_kl_penalty (line 268) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 298) | def compute_response_mask(data: DataProto): function compute_onlineDPO_pref (line 305) | def compute_onlineDPO_pref(data: DataProto): function _timer (line 344) | def _timer(name: str, timing_raw: dict[str, float]): class RaySPINTrainer (line 350) | class RaySPINTrainer: method __init__ (line 357) | def __init__( method _validate_config (line 405) | def _validate_config(self): method _create_dataloader (line 541) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _maybe_log_val_generations (line 613) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _validate (line 637) | def _validate(self): method init_workers (line 760) | def init_workers(self): method _save_checkpoint (line 840) | def _save_checkpoint(self): method _load_checkpoint (line 895) | def _load_checkpoint(self): method _balance_batch (line 952) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method fit_dpo (line 969) | def fit_dpo(self): # Renamed for clarity as standard PPO loop FILE: verl_rl/recipe/sppo/dp_actor.py function compute_sppo_loss (line 34) | def compute_sppo_loss( class DataParallelSPPOActor (line 60) | class DataParallelSPPOActor(DataParallelPPOActor): method update_policy (line 62) | def update_policy(self, data: DataProto): FILE: verl_rl/recipe/sppo/main_sppo.py function main (line 31) | def main(config): function run_ppo (line 35) | def run_ppo(config) -> None: class TaskRunner (line 53) | class TaskRunner: method run (line 54) | def run(self, config): FILE: verl_rl/recipe/sppo/sppo_ray_trainer.py function softmean (line 51) | def softmean(x: torch.Tensor, beta: float, dim: int = -1, keepdim: bool ... function compute_advantage (line 69) | def compute_advantage(data: DataProto, beta=1.0): class RaySPPOTrainer (line 77) | class RaySPPOTrainer(RayPPOTrainer): method __init__ (line 84) | def __init__( method fit (line 130) | def fit(self): FILE: verl_rl/recipe/sppo/sppo_worker.py class SPPOActorRolloutRefWorker (line 33) | class SPPOActorRolloutRefWorker(ActorRolloutRefWorker): method init_model (line 40) | def init_model(self): FILE: verl_rl/scripts/converter_hf_to_mcore.py function _init_args (line 40) | def _init_args(): function test_conversion (line 60) | def test_conversion(megatron_model_provider, tfconfig, output_path, model): function convert_checkpoint_from_transformers_to_megatron (line 109) | def convert_checkpoint_from_transformers_to_megatron( function safe_copy (line 184) | def safe_copy( function convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl (line 198) | def convert_checkpoint_from_transformers_to_megatron_qwen2_5_vl(hfmodel,... function convert_checkpoint_from_transformers_to_megatron_dpskv3 (line 296) | def convert_checkpoint_from_transformers_to_megatron_dpskv3( function noop_context (line 385) | def noop_context() -> Any: function support_distributed_convert (line 389) | def support_distributed_convert(hf_config: AutoConfig) -> bool: function convert_hf_to_mcore (line 396) | def convert_hf_to_mcore(hf_model_path, output_path, use_cpu_initializati... FILE: verl_rl/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: verl_rl/scripts/init_random_model.py function _init_args (line 37) | def _init_args(): function check_output_path (line 46) | def check_output_path(output_path: str): function check_configs (line 55) | def check_configs(original_config: dict[str, Any], new_config: dict[str,... function init_random_model (line 72) | def init_random_model(hf_model_path, new_config_path, output_path): FILE: verl_rl/scripts/legacy_model_merger.py class ModelMergerConfig (line 75) | class ModelMergerConfig: method __post_init__ (line 89) | def __post_init__(self): class BaseModelMerger (line 97) | class BaseModelMerger(ABC): method __init__ (line 98) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 110) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 120) | def patch_model_generation_config(self, model): method save_lora_adapter (line 136) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 193) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 218) | def upload_to_huggingface(self): method merge_and_save (line 226) | def merge_and_save(self): class FSDPModelMerger (line 230) | class FSDPModelMerger(BaseModelMerger): method _get_world_size (line 231) | def _get_world_size(self) -> int: method _load_rank_zero_state_dict (line 241) | def _load_rank_zero_state_dict(self, world_size: int) -> dict: method _extract_device_mesh_info (line 248) | def _extract_device_mesh_info(self, state_dict: dict, world_size: int)... method _calculate_shard_configuration (line 268) | def _calculate_shard_configuration( method _merge_by_placement (line 284) | def _merge_by_placement(self, tensors: list[torch.Tensor], placement: ... method _load_and_merge_state_dicts (line 295) | def _load_and_merge_state_dicts( method merge_and_save (line 358) | def merge_and_save(self): method _test_state_dict (line 381) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): class MegatronModelMerger (line 415) | class MegatronModelMerger(BaseModelMerger): method __init__ (line 416) | def __init__(self, config: ModelMergerConfig): method _get_tp_pp_rank_from_sharded_dir (line 459) | def _get_tp_pp_rank_from_sharded_dir(self, sharded_dir: str) -> tuple[... method _check_megatron_checkpoint_path (line 473) | def _check_megatron_checkpoint_path(self, model_path: str) -> tuple[li... method _merge_across_tp (line 488) | def _merge_across_tp( method _load_state_dicts (line 544) | def _load_state_dicts( method _check_megatron_state_key (line 562) | def _check_megatron_state_key(self, key: str) -> bool: method _merge_state_dicts (line 586) | def _merge_state_dicts( method merge_and_save (line 638) | def merge_and_save(self): method _test_state_dict (line 660) | def _test_state_dict(self, state_dict: dict[str, torch.Tensor]): method _replace_name (line 681) | def _replace_name(self, megatron_name: str, name_mapping: dict[str, st... function main (line 693) | def main(): FILE: verl_rl/scripts/print_cfg.py function main (line 21) | def main(config): FILE: verl_rl/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: verl_rl/tests/experimental/agent_loop/agent_utils.py function init_agent_loop_manager (line 25) | def init_agent_loop_manager(config: DictConfig) -> AgentLoopManager | Ra... FILE: verl_rl/tests/experimental/agent_loop/test_basic_agent_loop.py function init_config (line 32) | def init_config() -> DictConfig: function test_single_turn (line 53) | def test_single_turn(init_config): class WeatherTool (line 101) | class WeatherTool(BaseTool): method get_current_temperature (line 102) | def get_current_temperature(self, location: str, unit: str = "celsius"): method get_openai_tool_schema (line 119) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 123) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class WeatherToolWithData (line 131) | class WeatherToolWithData(BaseTool): method get_openai_tool_schema (line 132) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method get_temperature_date (line 136) | def get_temperature_date(self, location: str, date: str, unit: str = "... method execute (line 155) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_tool_agent (line 163) | def test_tool_agent(init_config): function test_get_trajectory_info (line 272) | async def test_get_trajectory_info(): FILE: verl_rl/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_user_message (line 163) | async def test_generate_response_no_user_message(self): method test_calculate_score_direct_call (line 182) | async def test_calculate_score_direct_call(self): method test_calculate_score_with_kwargs (line 200) | async def test_calculate_score_with_kwargs(self): method test_finalize_interaction (line 218) | async def test_finalize_interaction(self): method test_finalize_interaction_with_kwargs (line 233) | async def test_finalize_interaction_with_kwargs(self): method test_finalize_nonexistent_interaction (line 248) | async def test_finalize_nonexistent_interaction(self): method test_full_interaction_workflow_correct (line 257) | async def test_full_interaction_workflow_correct(self): method test_full_interaction_workflow_incorrect (line 280) | async def test_full_interaction_workflow_incorrect(self): method test_multiple_concurrent_interactions (line 315) | async def test_multiple_concurrent_interactions(self): method test_edge_case_empty_messages (line 348) | async def test_edge_case_empty_messages(self): method test_edge_case_message_without_content (line 368) | async def test_edge_case_message_without_content(self): method test_inheritance_from_base_interaction (line 389) | def test_inheritance_from_base_interaction(self): method test_name_attribute_initialization (line 407) | def test_name_attribute_initialization(self): FILE: verl_rl/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: verl_rl/tests/models/test_transformer.py function test_hf_casual_models (line 39) | def test_hf_casual_models(): function test_hf_value_models (line 109) | def test_hf_value_models(): FILE: verl_rl/tests/models/test_transformers_ulysses.py class SequenceParallelConfig (line 42) | class SequenceParallelConfig: function test_configs (line 48) | def test_configs(): function sync_model_parameters_global (line 72) | def sync_model_parameters_global(layer): function test_hf_casual_fwd_bwd (line 79) | def test_hf_casual_fwd_bwd(test_config): function _hf_casual_fwd (line 92) | def _hf_casual_fwd(config, sp_size, dp_size): function _hf_casual_fwd_bwd (line 171) | def _hf_casual_fwd_bwd(config, sp_size, dp_size): FILE: verl_rl/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: verl_rl/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: verl_rl/tests/single_controller/detached_worker/client.py function compute_position_id_with_mask (line 28) | def compute_position_id_with_mask(mask): FILE: verl_rl/tests/single_controller/detached_worker/server.py class Trainer (line 45) | class Trainer(MegatronWorker): method __init__ (line 46) | def __init__(self): method init_model (line 67) | def init_model(self): method train_model (line 110) | def train_model(self, data: DataProto) -> DataProto: FILE: verl_rl/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: verl_rl/tests/single_controller/test_colocated_workers.py class Actor (line 29) | class Actor(Worker): method __init__ (line 30) | def __init__(self) -> None: method add (line 34) | def add(self, data: DataProto): class Critic (line 40) | class Critic(Worker): method __init__ (line 41) | def __init__(self, config) -> None: method sub (line 46) | async def sub(self, data: DataProto): function test_colocated_workers (line 51) | def test_colocated_workers(): FILE: verl_rl/tests/single_controller/test_colocated_workers_fused.py class Actor (line 29) | class Actor(Worker): method __init__ (line 30) | def __init__(self) -> None: method add (line 34) | def add(self, data: DataProto): class Critic (line 40) | class Critic(Worker): method __init__ (line 41) | def __init__(self, config) -> None: method sub (line 46) | def sub(self, data: DataProto): function test_colocated_workers_fused (line 51) | def test_colocated_workers_fused(): FILE: verl_rl/tests/single_controller/test_data_transfer.py class DummyWorker (line 32) | class DummyWorker(Worker): method __init__ (line 33) | def __init__(self): method do_nothing (line 38) | def do_nothing(self, data): function test_data_transfer (line 46) | def test_data_transfer(): FILE: verl_rl/tests/single_controller/test_decorator_on_cpu.py function ray_init_shutdown (line 31) | def ray_init_shutdown(): class DecoratorTestWorker (line 39) | class DecoratorTestWorker(Worker): method __init__ (line 40) | def __init__(self, initial_value=0): method dp_compute (line 48) | def dp_compute(self, data: DataProto) -> DataProto: method async_dp_compute (line 56) | async def async_dp_compute(self, data: DataProto) -> DataProto: function test_decorator_dp_compute (line 65) | def test_decorator_dp_compute(ray_init_shutdown): function test_decorator_async_function (line 101) | def test_decorator_async_function(ray_init_shutdown): FILE: verl_rl/tests/single_controller/test_driverfunc_to_worker.py class ModelActor (line 31) | class ModelActor(Worker): method __init__ (line 32) | def __init__(self): class HackSelf (line 36) | class HackSelf: method __init__ (line 37) | def __init__(self): function get_aux_metrics (line 41) | def get_aux_metrics(self, test_proto): function test (line 54) | def test(): FILE: verl_rl/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: verl_rl/tests/single_controller/test_high_level_scheduling_api.py class TestActor (line 24) | class TestActor(Worker): method __init__ (line 26) | def __init__(self, cuda_visible_devices=None) -> None: method get_node_id (line 29) | def get_node_id(self): function test (line 33) | def test(): FILE: verl_rl/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: verl_rl/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(): FILE: verl_rl/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: verl_rl/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: verl_rl/tests/single_controller/test_worker_group_basics.py function two_to_all_dispatch_fn (line 26) | def two_to_all_dispatch_fn(worker_group, *args, **kwargs): class TestActor (line 42) | class TestActor(Worker): method __init__ (line 44) | def __init__(self, x) -> None: method foo (line 48) | def foo(self, y): method foo_rank_zero (line 52) | def foo_rank_zero(self, x, y): method foo_one_to_all (line 56) | def foo_one_to_all(self, x, y): method foo_all_to_all (line 60) | def foo_all_to_all(self, x, y): method foo_custom (line 64) | def foo_custom(self, x, y): function remote_call_wg (line 69) | def remote_call_wg(worker_names): function add_one (line 85) | def add_one(data): function test_basics (line 92) | def test_basics(): FILE: verl_rl/tests/single_controller/test_worker_group_torch.py class TestAllGatherActor (line 29) | class TestAllGatherActor(Worker): method __init__ (line 30) | def __init__(self, size) -> None: method init (line 34) | def init(self): method all_gather (line 39) | def all_gather(self): class TestAllGatherActorV2 (line 49) | class TestAllGatherActorV2(Worker): method __init__ (line 50) | def __init__(self, size) -> None: method all_gather (line 58) | def all_gather(self): function test_all_gather_torch (line 67) | def test_all_gather_torch(): function test_all_gather_torch_v2 (line 91) | def test_all_gather_torch_v2(): FILE: verl_rl/tests/special_distributed/test_fsdp_ckpt.py function test_fsdp_ckpt (line 30) | def test_fsdp_ckpt(strategy="fsdp"): FILE: verl_rl/tests/special_distributed/test_tensor_dict.py function test_all_gather_data_proto (line 27) | def test_all_gather_data_proto(): function test_vocab_parallel_entropy (line 58) | def test_vocab_parallel_entropy(): FILE: verl_rl/tests/special_e2e/check_custom_rwd_fn.py function check_congratulations_in_file (line 18) | def check_congratulations_in_file(output_file): FILE: verl_rl/tests/special_e2e/check_results.py function extract_reward_from_line (line 20) | def extract_reward_from_line(line): FILE: verl_rl/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: verl_rl/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: verl_rl/tests/special_e2e/sft/test_sp_loss_match.py function test_trainer_forward_consistency (line 24) | def test_trainer_forward_consistency(trainer: FSDPSFTTrainer, total_step... function create_trainer (line 90) | def create_trainer(config): function main (line 128) | def main(config): function hydra_entry (line 143) | def hydra_entry(cfg: DictConfig) -> None: FILE: verl_rl/tests/special_sanity/check_api_docs.py function iter_submodules (line 54) | def iter_submodules(root: ModuleType) -> Iterable[ModuleType]: function names_missing_doc (line 65) | def names_missing_doc(mod: ModuleType) -> list[str]: function check_module (line 85) | def check_module(qualname: str) -> list[str]: function autodiscover_packages (line 99) | def autodiscover_packages() -> list[str]: function main (line 108) | def main() -> None: FILE: verl_rl/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: verl_rl/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: verl_rl/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: verl_rl/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: verl_rl/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: verl_rl/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 85) | def check_file( function main (line 114) | def main() -> None: FILE: verl_rl/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: verl_rl/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: verl_rl/tests/special_standalone/test_memory_buffers.py function test_memory_buffers (line 26) | def test_memory_buffers(): FILE: verl_rl/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: verl_rl/tests/test_protocol_on_cpu.py function test_union_tensor_dict (line 26) | def test_union_tensor_dict(): function test_tensor_dict_constructor (line 53) | def test_tensor_dict_constructor(): function test_tensor_dict_make_iterator (line 67) | def test_tensor_dict_make_iterator(): function test_reorder (line 96) | def test_reorder(): function test_chunk_concat (line 107) | def test_chunk_concat(): function test_pop (line 131) | def test_pop(): function test_repeat (line 144) | def test_repeat(): function test_dataproto_pad_unpad (line 169) | def test_dataproto_pad_unpad(): function test_dataproto_fold_unfold (line 221) | def test_dataproto_fold_unfold(): function test_torch_save_data_proto (line 244) | def test_torch_save_data_proto(): function test_len (line 260) | def test_len(): function test_dataproto_index (line 280) | def test_dataproto_index(): function test_old_vs_new_from_single_dict (line 344) | def test_old_vs_new_from_single_dict(): function test_dataproto_no_batch (line 381) | def test_dataproto_no_batch(): function test_sample_level_repeat (line 391) | def test_sample_level_repeat(): function test_dataproto_unfold_column_chunks (line 416) | def test_dataproto_unfold_column_chunks(): function test_dataproto_chunk_after_index (line 482) | def test_dataproto_chunk_after_index(): FILE: verl_rl/tests/tools/test_base_tool_on_cpu.py class WeatherToolForTest (line 26) | class WeatherToolForTest(BaseTool): method get_current_temperature (line 27) | def get_current_temperature(self, location: str, unit: str = "celsius"): method get_openai_tool_schema (line 43) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 47) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class WeatherToolWithDataForTest (line 55) | class WeatherToolWithDataForTest(BaseTool): method get_openai_tool_schema (line 56) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method get_temperature_date (line 60) | def get_temperature_date(self, location: str, date: str, unit: str = "... method execute (line 78) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function create_local_tool_config (line 87) | def create_local_tool_config(): function create_fake_tool_config (line 109) | def create_fake_tool_config(): function test_initialize_tools_from_fake_config (line 130) | def test_initialize_tools_from_fake_config(create_fake_tool_config): function test_initialize_tools_from_local_config (line 139) | def test_initialize_tools_from_local_config(create_local_tool_config): FILE: verl_rl/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 93) | def test_default_values(self): method test_get_method_backward_compatibility (line 106) | def test_get_method_backward_compatibility(self): method test_post_init_nested_configs (line 118) | def test_post_init_nested_configs(self): method test_config_init_from_yaml (line 128) | def test_config_init_from_yaml(self): class TestAlgoCompute (line 142) | class TestAlgoCompute(unittest.TestCase): method setUp (line 145) | def setUp(self): method test_advantage_estimator_with_cfg (line 159) | def test_advantage_estimator_with_cfg(self): method test_grpo_advantage_estimator_with_cfg (line 184) | def test_grpo_advantage_estimator_with_cfg(self): FILE: verl_rl/tests/trainer/config/test_critic_config_on_cpu.py class TestCriticConfig (line 25) | class TestCriticConfig: method config_dir (line 29) | def config_dir(self): method test_megatron_critic_config_instantiation_from_yaml (line 33) | def test_megatron_critic_config_instantiation_from_yaml(self, config_d... method test_fsdp_critic_config_instantiation_from_yaml (line 65) | def test_fsdp_critic_config_instantiation_from_yaml(self, config_dir): method test_config_inheritance_hierarchy (line 98) | def test_config_inheritance_hierarchy(self): method test_config_dict_interface (line 113) | def test_config_dict_interface(self): method test_frozen_fields_immutability (line 129) | def test_frozen_fields_immutability(self): method test_batch_size_fields_modifiable (line 152) | def test_batch_size_fields_modifiable(self): FILE: verl_rl/tests/trainer/config/test_legacy_config_on_cpu.py class TestConfigComparison (line 24) | class TestConfigComparison(unittest.TestCase): method _compare_configs_recursively (line 35) | def _compare_configs_recursively( method test_ppo_trainer_config_matches_legacy (line 91) | def test_ppo_trainer_config_matches_legacy(self): method test_ppo_megatron_trainer_config_matches_legacy (line 115) | def test_ppo_megatron_trainer_config_matches_legacy(self): method test_load_component (line 137) | def test_load_component(self): FILE: verl_rl/tests/trainer/ppo/test_core_algos_on_cpu.py function mock_test_fn (line 25) | def mock_test_fn(): class TestRegisterAdvEst (line 29) | class TestRegisterAdvEst(unittest.TestCase): method setUp (line 30) | def setUp(self): method tearDown (line 39) | def tearDown(self) -> None: method test_register_new_function (line 43) | def test_register_new_function(self): method test_register_with_enum (line 53) | def test_register_with_enum(self): method test_duplicate_registration_same_function (line 67) | def test_duplicate_registration_same_function(self): method test_duplicate_registration_different_function (line 74) | def test_duplicate_registration_different_function(self): method test_decorator_preserves_function (line 87) | def test_decorator_preserves_function(self): method test_multiple_registrations (line 96) | def test_multiple_registrations(self): method test_get_adv_estimator_fn_valid_names (line 112) | def test_get_adv_estimator_fn_valid_names(self): method test_get_adv_estimator_fn_invalid_name (line 122) | def test_get_adv_estimator_fn_invalid_name(self): method test_get_adv_estimator_fn_case_sensitive (line 128) | def test_get_adv_estimator_fn_case_sensitive(self): function test_multi_turn_compute_gae_advantage_return (line 134) | def test_multi_turn_compute_gae_advantage_return(): FILE: verl_rl/tests/trainer/ppo/test_metric_utils_on_cpu.py class TestReduceMetrics (line 37) | class TestReduceMetrics(unittest.TestCase): method test_reduce_metrics_basic (line 40) | def test_reduce_metrics_basic(self): method test_reduce_metrics_empty (line 51) | def test_reduce_metrics_empty(self): method test_reduce_metrics_single_value (line 60) | def test_reduce_metrics_single_value(self): class TestComputeDataMetrics (line 70) | class TestComputeDataMetrics(unittest.TestCase): method setUp (line 73) | def setUp(self): method test_compute_data_metrics_with_critic (line 98) | def test_compute_data_metrics_with_critic(self): method test_compute_data_metrics_without_critic (line 116) | def test_compute_data_metrics_without_critic(self): class TestComputeTimingMetrics (line 130) | class TestComputeTimingMetrics(unittest.TestCase): method setUp (line 133) | def setUp(self): method test_compute_timing_metrics (line 155) | def test_compute_timing_metrics(self, mock_compute_response_info): class TestComputeThroughputMetrics (line 181) | class TestComputeThroughputMetrics(unittest.TestCase): method setUp (line 184) | def setUp(self): method test_compute_throughout_metrics (line 192) | def test_compute_throughout_metrics(self): class TestBootstrapMetric (line 213) | class TestBootstrapMetric(unittest.TestCase): method test_bootstrap_metric_basic (line 216) | def test_bootstrap_metric_basic(self): method test_bootstrap_metric_empty (line 240) | def test_bootstrap_metric_empty(self): class TestCalcMajVal (line 246) | class TestCalcMajVal(unittest.TestCase): method test_calc_maj_val_basic (line 249) | def test_calc_maj_val_basic(self): method test_calc_maj_val_tie (line 262) | def test_calc_maj_val_tie(self): class TestProcessValidationMetrics (line 279) | class TestProcessValidationMetrics(unittest.TestCase): method test_process_validation_metrics_basic (line 282) | def test_process_validation_metrics_basic(self): method test_process_validation_metrics_with_pred (line 305) | def test_process_validation_metrics_with_pred(self): FILE: verl_rl/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: verl_rl/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: verl_rl/tests/utils/dataset/test_multiturn_sft_dataset_on_cpu.py function test_multiturn_sft_dataset (line 27) | def test_multiturn_sft_dataset(): FILE: verl_rl/tests/utils/dataset/test_rl_dataset_on_cpu.py function get_gsm8k_data (line 21) | def get_gsm8k_data(): function test_rl_dataset (line 29) | def test_rl_dataset(): function test_image_rl_data (line 69) | def test_image_rl_data(): FILE: verl_rl/tests/utils/dataset/test_sft_dataset_on_cpu.py function get_gsm8k_data (line 20) | def get_gsm8k_data(): function test_sft_cot_dataset (line 27) | def test_sft_cot_dataset(): function test_sft_dataset (line 52) | def test_sft_dataset(): FILE: verl_rl/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: verl_rl/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(): FILE: verl_rl/tests/utils/reward_score/test_sandbox_on_cpu.py function test_parallelism (line 96) | 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 173) | def test_check_correctness(): function test_prime_math (line 181) | def test_prime_math(): FILE: verl_rl/tests/utils/test_activation_offload.py function _fsdp_activation_offloading_test (line 32) | def _fsdp_activation_offloading_test(rank, world_size, rendezvous_file, ... function test_activation_offloading (line 148) | def test_activation_offloading(world_size, strategy, tmp_path): FILE: verl_rl/tests/utils/test_config_on_cpu.py class TestDataclass (line 24) | class TestDataclass: class TestTrainConfig (line 30) | class TestTrainConfig: class TestConfigOnCPU (line 42) | class TestConfigOnCPU(unittest.TestCase): method setUp (line 51) | def setUp(self): method test_omega_conf_to_dataclass (line 54) | def test_omega_conf_to_dataclass(self): method test_nested_omega_conf_to_dataclass (line 61) | def test_nested_omega_conf_to_dataclass(self): class TestPrintCfgCommand (line 70) | class TestPrintCfgCommand(unittest.TestCase): method test_command_with_override (line 73) | def test_command_with_override(self): FILE: verl_rl/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 216) | def test_flops_counter(config_type: str): FILE: verl_rl/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: verl_rl/tests/utils/test_import_utils_on_cpu.py function test_load_extern_type_class (line 25) | def test_load_extern_type_class(): function test_load_extern_type_function (line 42) | def test_load_extern_type_function(): function test_load_extern_type_constant (line 55) | def test_load_extern_type_constant(): function test_load_extern_type_nonexistent_file (line 64) | def test_load_extern_type_nonexistent_file(): function test_load_extern_type_nonexistent_type (line 70) | def test_load_extern_type_nonexistent_type(): function test_load_extern_type_none_path (line 76) | def test_load_extern_type_none_path(): function test_load_extern_type_invalid_module (line 82) | def test_load_extern_type_invalid_module(): FILE: verl_rl/tests/utils/test_linear_cross_entropy.py function run_torch_entropy (line 48) | def run_torch_entropy( function run_verl_original_entropy (line 64) | def run_verl_original_entropy( function run_verl_torch_fused_entropy (line 82) | def run_verl_torch_fused_entropy( class TestLinearCrossEntropy (line 99) | class TestLinearCrossEntropy: method __init__ (line 100) | def __init__(self, test_case_idx: int, temperature: float = 1.5) -> None: method cleanup (line 104) | def cleanup(self): method generate_hyper (line 112) | def generate_hyper(self): method generate_forward_inputs (line 145) | def generate_forward_inputs(self): method generate_backward_inputs (line 159) | def generate_backward_inputs(self): method verify_correctness (line 164) | def verify_correctness(self, iterations=5): method check_storage (line 322) | def check_storage(self, method_name, run_forward): method check_storage_all (line 344) | def check_storage_all(self): FILE: verl_rl/tests/utils/test_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: verl_rl/tests/utils/test_model_on_cpu.py function test_update_model_config (line 30) | def test_update_model_config(override_kwargs): FILE: verl_rl/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 53) | def test_frozen_config(self): class TestNsightSystemsProfiler (line 85) | class TestNsightSystemsProfiler(unittest.TestCase): method setUp (line 96) | def setUp(self): method test_initialization (line 101) | def test_initialization(self): method test_start_stop_profiling (line 106) | def test_start_stop_profiling(self): method test_discrete_profiling (line 118) | def test_discrete_profiling(self): method test_annotate_decorator (line 131) | def test_annotate_decorator(self): method test_annotate_discrete_mode (line 153) | def test_annotate_discrete_mode(self): FILE: verl_rl/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_rollout_trace_with_real_weave_backend (line 135) | async def test_rollout_trace_with_real_weave_backend(): function test_rollout_trace_with_real_mlflow_backend (line 156) | async def test_rollout_trace_with_real_mlflow_backend(): FILE: verl_rl/tests/utils/test_seqlen_balancing.py function test_seqlen_balancing (line 30) | def test_seqlen_balancing(): function test_dynamic_batch (line 49) | def test_dynamic_batch(): function _worker (line 63) | def _worker(rank, world_size, init_method, max_token_len, use_same_dp, m... function test_dataproto_split_uneven (line 127) | def test_dataproto_split_uneven(): function test_seqlen_balancing_distributed_params (line 181) | def test_seqlen_balancing_distributed_params(tmp_path): FILE: verl_rl/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: verl_rl/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: verl_rl/tests/utils/test_torch_functional.py function _worker_mean (line 25) | def _worker_mean(rank: int, world_size: int, rendezvous_file: str): function test_masked_mean (line 63) | def test_masked_mean(value, mask, gt): function test_distributed_mean_max_min_std (line 70) | def test_distributed_mean_max_min_std(world_size, tmp_path): function _worker_mask (line 82) | def _worker_mask(rank: int, world_size: int, rendezvous_file: str): function test_distributed_masked_mean (line 108) | def test_distributed_masked_mean(world_size, tmp_path): FILE: verl_rl/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: verl_rl/tests/workers/rollout/async_rollout_utils.py function init_async_rollout_manager (line 25) | def init_async_rollout_manager(config: DictConfig) -> AsyncLLMServerMana... FILE: verl_rl/tests/workers/rollout/perf/vllm_async_rollout.py function init_config (line 48) | def init_config(n_gpus_per_node) -> DictConfig: function initialize (line 74) | def initialize(config, backend) -> tuple[AgentLoopManager | RayWorkerGro... function perf_rollout (line 104) | def perf_rollout(mode, backend, n_gpus_per_node, num_steps): FILE: verl_rl/tests/workers/rollout/rollout_vllm/run_fsdp_vllm.py function main (line 30) | def main(): FILE: verl_rl/tests/workers/rollout/rollout_vllm/test_vllm_chat_scheduler.py function init_config (line 30) | def init_config() -> DictConfig: function test_vllm_async_rollout_without_tool_calls (line 51) | def test_vllm_async_rollout_without_tool_calls(init_config): class WeatherTool (line 102) | class WeatherTool(BaseTool): method get_current_temperature (line 103) | def get_current_temperature(self, location: str, unit: str = "celsius"): method get_openai_tool_schema (line 119) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method execute (line 123) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... class WeatherToolWithData (line 131) | class WeatherToolWithData(BaseTool): method get_openai_tool_schema (line 132) | def get_openai_tool_schema(self) -> OpenAIFunctionToolSchema: method get_temperature_date (line 136) | def get_temperature_date(self, location: str, date: str, unit: str = "... method execute (line 154) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... function test_vllm_async_rollout_with_tool_calls (line 162) | def test_vllm_async_rollout_with_tool_calls(init_config): FILE: verl_rl/tests/workers/rollout/rollout_vllm/test_vllm_model_rope_scaling.py function test_vllm_rollout_with_yarn_position_embeddings (line 29) | def test_vllm_rollout_with_yarn_position_embeddings(): function prepare_input_dataproto (line 98) | def prepare_input_dataproto(tokenizer, config, validate, do_sample=False): FILE: verl_rl/tests/workers/rollout/rollout_vllm/test_vllm_spmd.py function levenshtein (line 29) | def levenshtein(s1, s2): function are_lists_similar (line 50) | def are_lists_similar(a, b): function test_vllm_spmd (line 72) | def test_vllm_spmd(): FILE: verl_rl/tests/workers/rollout/test_async_sglang_server_on_cpu.py class TestAsyncSglangServer (line 32) | class TestAsyncSglangServer: method server_config (line 34) | def server_config(self): method test_init_engine (line 41) | async def test_init_engine(self, mock_start_fastapi_server, mock_list_... FILE: verl_rl/tests/workers/rollout/test_custom_completion_callback.py function _get_free_port (line 41) | def _get_free_port(): class Sandbox (line 48) | class Sandbox: method __init__ (line 55) | def __init__(self): method code_execution (line 61) | async def code_execution(self, request: Request): method _start_fastapi_server (line 93) | async def _start_fastapi_server(self): method get_server_address (line 111) | async def get_server_address(self) -> str: class CustomCompletionCallback (line 117) | class CustomCompletionCallback(ToolCompletionCallback): method __init__ (line 118) | def __init__(self, config: DictConfig, scheduler: ChatCompletionSchedu... method sandbox_code_execution (line 131) | async def sandbox_code_execution(self, code: str) -> dict[str, Any]: method extra_body (line 149) | def extra_body(self): method __call__ (line 156) | async def __call__(self, messages: list[dict[str, str]], completions: ... FILE: verl_rl/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: verl_rl/tests/workers/rollout/test_sglang_async_rollout_mcp_tools.py function get_search_messages (line 48) | def get_search_messages(): class TestRolloutWithMCPSearchTools (line 116) | class TestRolloutWithMCPSearchTools: method qwen_tokenizer (line 118) | def qwen_tokenizer(self): method qwen_model_config (line 126) | def qwen_model_config(self): method search_data (line 132) | def search_data(self, qwen_tokenizer): method search_rollout_config (line 146) | def search_rollout_config(self): method search_data_proto (line 158) | def search_data_proto(self, search_data, qwen_tokenizer): method mock_rollout (line 192) | def mock_rollout(self, search_rollout_config, qwen_tokenizer, qwen_mod... method test_tools_registration (line 286) | def test_tools_registration(self, mock_rollout): method test_rollout_req_creation (line 295) | def test_rollout_req_creation(self, mock_rollout, search_data_proto): method test_over_size_case (line 301) | def test_over_size_case(self, mock_rollout, search_data_proto, search_... method test_tool_call_basic_case (line 346) | def test_tool_call_basic_case(self, mock_execute, mock_rollout, search... method test_tool_call_batch_case (line 401) | def test_tool_call_batch_case(self, mock_execute, mock_rollout, search... FILE: verl_rl/tests/workers/rollout/test_sglang_async_rollout_multimodal_delta.py function _test_add_tool_response_messages_image_delta (line 28) | def _test_add_tool_response_messages_image_delta(processor, image_list, ... function test_add_tool_response_messages_image_delta (line 151) | def test_add_tool_response_messages_image_delta(): function test_add_tool_response_messages_image_delta_resize_image (line 172) | def test_add_tool_response_messages_image_delta_resize_image(): FILE: verl_rl/tests/workers/rollout/test_sglang_async_rollout_search_tools.py function get_search_messages (line 52) | def get_search_messages(): class TestRolloutWithSearchTools (line 88) | class TestRolloutWithSearchTools: method qwen_tokenizer (line 90) | def qwen_tokenizer(self): method qwen_model_config (line 98) | def qwen_model_config(self): method search_data (line 104) | def search_data(self, qwen_tokenizer): method search_rollout_config (line 118) | def search_rollout_config(self): method search_data_proto (line 130) | def search_data_proto(self, search_data, qwen_tokenizer): method mock_rollout (line 167) | def mock_rollout(self, search_rollout_config, qwen_tokenizer, qwen_mod... method test_tools_registration (line 192) | def test_tools_registration( method test_rollout_req_creation (line 212) | def test_rollout_req_creation( method test_over_size_case (line 254) | def test_over_size_case(self, mock_rollout, search_data_proto, search_... method test_tool_call_basic_case (line 297) | def test_tool_call_basic_case(self, mock_execute, mock_rollout, search... method test_tool_call_batch_case (line 355) | def test_tool_call_batch_case(self, mock_execute, mock_rollout, search... FILE: verl_rl/tests/workers/rollout/test_sglang_async_rollout_sf_tools.py function get_sandbox_fusion_messages (line 47) | def get_sandbox_fusion_messages(): function skip_if_valid_sandbox (line 137) | def skip_if_valid_sandbox(url): class TestRolloutWithTools (line 149) | class TestRolloutWithTools: method qwen_tokenizer (line 151) | def qwen_tokenizer(self): method qwen_model_config (line 159) | def qwen_model_config(self): method sandbox_fusion_data (line 165) | def sandbox_fusion_data(self, qwen_tokenizer): method sandbox_fusion_rollout_config (line 179) | def sandbox_fusion_rollout_config(self): method sandbox_data_proto (line 191) | def sandbox_data_proto(self, sandbox_fusion_data, qwen_tokenizer): method mock_rollout (line 224) | def mock_rollout(self, sandbox_fusion_rollout_config, qwen_tokenizer, ... method test_tools_registration (line 245) | def test_tools_registration(self, mock_rollout): method test_rollout_req_creation (line 254) | def test_rollout_req_creation(self, mock_rollout, sandbox_data_proto): method test_over_size_case (line 281) | def test_over_size_case(self, mock_rollout, sandbox_data_proto, sandbo... method test_tool_call_basic_case (line 327) | def test_tool_call_basic_case(self, mock_rollout, sandbox_data_proto, ... method test_tool_call_batch_case (line 380) | def test_tool_call_batch_case(self, mock_rollout, sandbox_data_proto, ... method test_sampling_params_functionality (line 447) | def test_sampling_params_functionality(self, mock_rollout): class RayMultiProcessTestCase (line 464) | class RayMultiProcessTestCase(MultiProcessTestCase): method setUp (line 465) | def setUp(self): method tearDown (line 471) | def tearDown(self): class TestActor (line 477) | class TestActor: method __init__ (line 478) | def __init__(self, rank, world_size): method record_rank (line 484) | def record_rank(self, rank): method get_rank (line 487) | def get_rank(self): method ping (line 490) | def ping(self): method record_execution_time (line 493) | def record_execution_time(self, time): method get_time (line 496) | def get_time(self, timeout): method verify_rank (line 510) | def verify_rank(self): class TestRayGlobalActorCase (line 528) | class TestRayGlobalActorCase(RayMultiProcessTestCase): method world_size (line 530) | def world_size(self) -> int: method test_basic_multi_process_init (line 534) | def test_basic_multi_process_init(self): class TestSingleNodeRateLimiterCase (line 554) | class TestSingleNodeRateLimiterCase(RayMultiProcessTestCase): method world_size (line 556) | def world_size(self) -> int: method test_rate_limiter (line 559) | def test_rate_limiter(self): method test_rotten_execution (line 591) | def test_rotten_execution(self): class TestMultiNodeRateLimiterCase (line 618) | class TestMultiNodeRateLimiterCase(RayMultiProcessTestCase): method world_size (line 620) | def world_size(self) -> int: method test_rate_limiter (line 623) | def test_rate_limiter(self): FILE: verl_rl/tests/workers/rollout/test_sglang_async_rollout_w_interaction.py function test_async_sglang_rollout_w_interaction (line 42) | def test_async_sglang_rollout_w_interaction(): FILE: verl_rl/tests/workers/rollout/test_sglang_async_rollout_w_tools.py function test_async_sglang_rollout_w_tool (line 42) | def test_async_sglang_rollout_w_tool(): FILE: verl_rl/tests/workers/rollout/test_sglang_multi_interaction.py class MockInteraction (line 37) | class MockInteraction(BaseInteraction): method __init__ (line 40) | def __init__(self, config): method start_interaction (line 44) | async def start_interaction(self, instance_id=None, **kwargs): method generate_response (line 50) | async def generate_response(self, instance_id, messages, **kwargs): function create_mock_config_with_multi_interactions (line 54) | def create_mock_config_with_multi_interactions(): function setup_distributed (line 106) | def setup_distributed(): class TestSGLangMultiInteraction (line 112) | class TestSGLangMultiInteraction: method test_initialize_multiple_interactions (line 113) | def test_initialize_multiple_interactions(self): method test_interaction_selection_by_name (line 171) | def test_interaction_selection_by_name(self): method test_fallback_to_default_interaction (line 244) | def test_fallback_to_default_interaction(self): method test_error_on_missing_interaction (line 324) | def test_error_on_missing_interaction(self): method test_backward_compatibility_no_interaction_config (line 369) | def test_backward_compatibility_no_interaction_config(self): FILE: verl_rl/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: verl_rl/tests/workers/rollout/test_sglang_spmd.py function _pre_process_inputs (line 37) | def _pre_process_inputs(pad_token_id, prompt_token_ids: torch.Tensor): function test_sglang_spmd (line 43) | def test_sglang_spmd(): FILE: verl_rl/tests/workers/rollout/utils_sglang.py function levenshtein (line 26) | def levenshtein(s1, s2): function are_lists_similar (line 40) | def are_lists_similar(a, b, threshold=10): function initialize_global_process_group (line 55) | def initialize_global_process_group(timeout_second=36000, spmd=False): function clean_torchelastic_env (line 82) | def clean_torchelastic_env(): function load_tokenizer_and_model (line 88) | def load_tokenizer_and_model(local_model_path, dtype="bfloat16"): function prepare_inputs (line 95) | def prepare_inputs(tokenizer, prompts, max_prompt_length): function generate_hf_output (line 107) | def generate_hf_output(model, input_ids, attention_mask, tokenizer, max_... function get_rollout_config (line 125) | def get_rollout_config( FILE: verl_rl/verl/base_config.py class BaseConfig (line 26) | class BaseConfig(collections.abc.Mapping): method __setattr__ (line 35) | def __setattr__(self, name: str, value): method get (line 45) | def get(self, key: str, default: Any = None) -> Any: method __getitem__ (line 60) | def __getitem__(self, key: str): method __iter__ (line 75) | def __iter__(self): method __len__ (line 84) | def __len__(self): FILE: verl_rl/verl/experimental/agent_loop/agent_loop.py class AsyncLLMServerManager (line 43) | class AsyncLLMServerManager: method __init__ (line 50) | def __init__(self, config: DictConfig, server_handles: list[ray.actor.... method _choose_server (line 69) | def _choose_server(self, request_id: str) -> ray.actor.ActorHandle: method generate (line 81) | async def generate( class AgentLoopMetrics (line 107) | class AgentLoopMetrics(BaseModel): class AgentLoopOutput (line 114) | class AgentLoopOutput(BaseModel): class _DummyConfig (line 130) | class _DummyConfig: method __init__ (line 131) | def __init__(self, config: DictConfig) -> None: class AgentLoopBase (line 135) | class AgentLoopBase(ABC): method __init__ (line 141) | def __init__( method init_class (line 158) | def init_class(cls, config: DictConfig, tokenizer: AutoTokenizer, **kw... method run (line 171) | async def run(self, messages: list[dict[str, Any]], sampling_params: d... function register (line 192) | def register(agent_name: str): class AgentLoopWorker (line 204) | class AgentLoopWorker: method __init__ (line 207) | def __init__(self, config: DictConfig, server_handles: list[ray.actor.... method generate_sequences (line 237) | async def generate_sequences(self, batch: DataProto) -> DataProto: method _run_agent_loop (line 295) | async def _run_agent_loop( method _postprocess (line 323) | def _postprocess(self, inputs: list[AgentLoopOutput]) -> DataProto: function get_trajectory_info (line 388) | async def get_trajectory_info(step, index, validate): class AgentLoopManager (line 410) | class AgentLoopManager: method __init__ (line 413) | def __init__(self, config: DictConfig, worker_group: RayWorkerGroup): method _initialize_llm_servers (line 429) | def _initialize_llm_servers(self): method _init_agent_loop_workers (line 477) | def _init_agent_loop_workers(self): method generate_sequences (line 486) | def generate_sequences(self, prompts: DataProto) -> DataProto: method _performance_metrics (line 515) | def _performance_metrics(self, metrics: list[list[dict[str, str]]], ou... method wake_up (line 537) | def wake_up(self): method sleep (line 541) | def sleep(self): FILE: verl_rl/verl/experimental/agent_loop/single_turn_agent_loop.py class SingleTurnAgentLoop (line 27) | class SingleTurnAgentLoop(AgentLoopBase): method __init__ (line 30) | def __init__(self, *args, **kwargs): method run (line 35) | async def run(self, messages: list[dict[str, Any]], sampling_params: d... FILE: verl_rl/verl/experimental/agent_loop/tool_agent_loop.py class ToolAgentLoop (line 32) | class ToolAgentLoop(AgentLoopBase): method init_class (line 34) | def init_class(cls, config, tokenizer, **kwargs): method run (line 59) | async def run(self, messages: list[dict[str, Any]], sampling_params: d... method _call_tool (line 136) | async def _call_tool(self, tool_call: FunctionCall) -> dict[str, str]: FILE: verl_rl/verl/experimental/agent_loop/tool_parser.py class FunctionCall (line 29) | class FunctionCall(BaseModel): class ToolParser (line 42) | class ToolParser(ABC): method __init__ (line 45) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 49) | async def extract_tool_calls(self, responses_ids: list[int]) -> tuple[... method get_tool_parser (line 61) | def get_tool_parser(cls, name: str, tokenizer): method register (line 67) | def register(cls, name: str): class HermesToolParser (line 76) | class HermesToolParser(ToolParser): method __init__ (line 79) | def __init__(self, tokenizer) -> None: method extract_tool_calls (line 87) | async def extract_tool_calls(self, responses_ids: list[int]) -> tuple[... FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/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_rl/verl/model_merger/__main__.py function main (line 52) | def main(): FILE: verl_rl/verl/model_merger/base_model_merger.py function parse_args (line 34) | def parse_args(): class ModelMergerConfig (line 84) | class ModelMergerConfig: method __post_init__ (line 119) | def __post_init__(self): function generate_config_from_args (line 127) | def generate_config_from_args(args: argparse.Namespace) -> ModelMergerCo... class BaseModelMerger (line 162) | class BaseModelMerger(ABC): method __init__ (line 184) | def __init__(self, config: ModelMergerConfig): method get_transformers_auto_model_class (line 191) | def get_transformers_auto_model_class(self): method patch_model_generation_config (line 201) | def patch_model_generation_config(self, model): method save_lora_adapter (line 218) | def save_lora_adapter(self, state_dict: dict[str, torch.Tensor]): method save_hf_model_and_tokenizer (line 275) | def save_hf_model_and_tokenizer(self, state_dict: dict[str, torch.Tens... method upload_to_huggingface (line 302) | def upload_to_huggingface(self): method merge_and_save (line 340) | def merge_and_save(self): method cleanup (line 344) | def cleanup(self): FILE: verl_rl/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_rl/verl/model_merger/megatron_model_merger.py function noop_context (line 45) | def noop_context() -> Any: function get_dynamic_pipeline_shards (line 49) | def get_dynamic_pipeline_shards(layer_num: int, pp_size: int) -> list[int]: class MegatronModelMerger (line 93) | class MegatronModelMerger(BaseModelMerger): method __init__ (line 135) | def __init__(self, config: ModelMergerConfig): method _load_state_dicts (line 211) | def _load_state_dicts(self, model_ckpt_path: str) -> dict[str, Any]: method _check_megatron_state_key (line 279) | def _check_megatron_state_key(self, key: str) -> bool: method _split_tensors (line 304) | def _split_tensors( method _merge_state_dicts (line 349) | def _merge_state_dicts(self, model_state_dict_list: list[dict[str, Any... method save_hf_model_and_tokenizer (line 413) | def save_hf_model_and_tokenizer(self, merged_state_dict): method merge_and_save (line 482) | def merge_and_save(self): method _validate_state_dict (line 502) | def _validate_state_dict(self, state_dict: dict[str, torch.Tensor]): method _replace_name (line 524) | def _replace_name(self, megatron_name: str, name_mapping: dict[str, st... method cleanup (line 536) | def cleanup(self): FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/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_rl/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_rl/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_rl/verl/models/llama/megatron/layers/parallel_rmsnorm.py class ParallelLlamaRMSNorm (line 26) | class ParallelLlamaRMSNorm(nn.Module): method __init__ (line 27) | def __init__(self, config: LlamaConfig, megatron_config: ModelParallel... method forward (line 41) | def forward(self, hidden_states): FILE: verl_rl/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_rl/verl/models/mcore/config_converter.py function _get_base_transformer_config (line 29) | def _get_base_transformer_config( function _get_mla_transformer_config (line 96) | def _get_mla_transformer_config( function check_and_disable_incompatible_configs (line 134) | def check_and_disable_incompatible_configs(original_config: dict) -> dict: function hf_to_mcore_config_dense (line 158) | def hf_to_mcore_config_dense( function hf_to_mcore_config_qwen2moe (line 180) | def hf_to_mcore_config_qwen2moe( function hf_to_mcore_config_mixtral (line 216) | def hf_to_mcore_config_mixtral( function hf_to_mcore_config_qwen3moe (line 251) | def hf_to_mcore_config_qwen3moe( function hf_to_mcore_config_dpskv3 (line 285) | 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 388) | def hf_to_mcore_config_llama4( FILE: verl_rl/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_rl/verl/models/mcore/model_forward.py function gptmodel_forward (line 22) | def gptmodel_forward( function gptmodel_forward_qwen2_5_vl (line 78) | def gptmodel_forward_qwen2_5_vl( FILE: verl_rl/verl/models/mcore/model_forward_fused.py function patch_fused_forward (line 38) | def patch_fused_forward(model: torch.nn.Module): function unpatch_fused_forward (line 54) | def unpatch_fused_forward(model: torch.nn.Module): function fused_forward_gptmodel (line 66) | def fused_forward_gptmodel( function fused_forward_qwen2_5_vl (line 110) | def fused_forward_qwen2_5_vl( function _fused_GPTModel_forward (line 162) | def _fused_GPTModel_forward( FILE: verl_rl/verl/models/mcore/model_initializer.py class BaseModelInitializer (line 26) | class BaseModelInitializer(ABC): method __init__ (line 29) | def __init__(self, tfconfig: TransformerConfig, hf_config: PretrainedC... method get_transformer_layer_spec (line 34) | def get_transformer_layer_spec(self): method get_rope_scaling_args (line 39) | def get_rope_scaling_args(self) -> dict: method initialize (line 48) | def initialize( class DenseModel (line 95) | class DenseModel(BaseModelInitializer): method get_transformer_layer_spec (line 98) | def get_transformer_layer_spec(self): class Qwen2MoEModel (line 103) | class Qwen2MoEModel(BaseModelInitializer): method get_transformer_layer_spec (line 106) | def get_transformer_layer_spec(self): method initialize (line 116) | def initialize(self, **kwargs): class MixtralModel (line 126) | class MixtralModel(BaseModelInitializer): method get_transformer_layer_spec (line 129) | def get_transformer_layer_spec(self): method initialize (line 134) | def initialize(self, **kwargs): class Qwen3MoEModel (line 143) | class Qwen3MoEModel(BaseModelInitializer): method get_transformer_layer_spec (line 146) | def get_transformer_layer_spec(self): method initialize (line 151) | def initialize(self, **kwargs): class DeepseekV3Model (line 161) | class DeepseekV3Model(BaseModelInitializer): method get_transformer_layer_spec (line 164) | def get_transformer_layer_spec(self): method get_rope_scaling_args (line 168) | def get_rope_scaling_args(self) -> dict: method initialize (line 173) | def initialize( class Qwen25VLModel (line 194) | class Qwen25VLModel(BaseModelInitializer): method get_transformer_layer_spec (line 197) | def get_transformer_layer_spec(self): method initialize (line 201) | def initialize( FILE: verl_rl/verl/models/mcore/patch_v012.py function apply_patch (line 20) | def apply_patch(): FILE: verl_rl/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_rl/verl/models/mcore/qwen2_5_vl/model.py class Qwen2_5VLModel (line 35) | class Qwen2_5VLModel(MegatronModule): method __init__ (line 74) | def __init__( method shared_embedding_or_output_weight (line 152) | def shared_embedding_or_output_weight(self): method set_input_tensor (line 159) | def set_input_tensor(self, input_tensor) -> None: method freeze (line 171) | def freeze(self, freeze_language_model: bool, freeze_vision_model: boo... method forward (line 193) | def forward( FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/verl/models/mcore/registry.py class SupportedModel (line 63) | class SupportedModel(Enum): function get_supported_model (line 146) | def get_supported_model(model_type: str) -> SupportedModel: function hf_to_mcore_config (line 156) | def hf_to_mcore_config( function init_mcore_model (line 174) | def init_mcore_model( function get_mcore_forward_fn (line 212) | def get_mcore_forward_fn(hf_config: PretrainedConfig) -> Callable: function get_mcore_forward_fused_fn (line 221) | def get_mcore_forward_fused_fn(hf_config: PretrainedConfig) -> Callable: function get_mcore_weight_converter (line 230) | def get_mcore_weight_converter(hf_config: PretrainedConfig, dtype: torch... FILE: verl_rl/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_rl/verl/models/mcore/util.py function preprocess_packed_seqs (line 23) | def preprocess_packed_seqs( function postprocess_packed_seqs (line 90) | def postprocess_packed_seqs( function remove_left_padding (line 145) | def remove_left_padding( function recover_left_padding (line 186) | def recover_left_padding( function postprocess_packed_seqs_for_dict_output (line 208) | def postprocess_packed_seqs_for_dict_output( FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/verl/models/qwen2/megatron/layers/parallel_attention.py class Qwen2RotaryEmbedding (line 42) | class Qwen2RotaryEmbedding(nn.Module): method __init__ (line 43) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 57) | def _set_cos_sin_cache(self, seq_len, device, dtype): method forward (line 67) | def forward(self, x, seq_len=None): class Qwen2LinearScalingRotaryEmbedding (line 78) | class Qwen2LinearScalingRotaryEmbedding(Qwen2RotaryEmbedding): method __init__ (line 81) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 85) | def _set_cos_sin_cache(self, seq_len, device, dtype): class Qwen2DynamicNTKScalingRotaryEmbedding (line 97) | class Qwen2DynamicNTKScalingRotaryEmbedding(Qwen2RotaryEmbedding): method __init__ (line 100) | def __init__(self, dim, max_position_embeddings=2048, base=10000, devi... method _set_cos_sin_cache (line 104) | def _set_cos_sin_cache(self, seq_len, device, dtype): function rotate_half (line 123) | def rotate_half(x): function apply_rotary_pos_emb (line 130) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids): function repeat_kv (line 138) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: class ParallelQwen2Attention (line 150) | class ParallelQwen2Attention(nn.Module): method __init__ (line 153) | def __init__(self, config: Qwen2Config, megatron_config: ModelParallel... method _init_rope (line 223) | def _init_rope(self): method _shape (line 230) | def _shape(self, tensor: torch.Tensor, seq_len: int, bsz: int): method forward (line 233) | def forward( function apply_rotary_pos_emb_rmpad (line 292) | def apply_rotary_pos_emb_rmpad(q, k, cos, sin, position_ids, indices, se... function apply_rotary_pos_emb_rmpad_flash (line 310) | def apply_rotary_pos_emb_rmpad_flash(q, k, cos, sin, cu_seqlens, max_seq... class ParallelQwen2AttentionRmPad (line 320) | class ParallelQwen2AttentionRmPad(ParallelQwen2Attention): method forward (line 321) | def forward( FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/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_rl/verl/models/registry.py class ModelRegistry (line 39) | class ModelRegistry: method load_model_cls (line 41) | def load_model_cls(model_arch: str, value=False) -> Optional[type[nn.M... method get_supported_archs (line 57) | def get_supported_archs() -> list[str]: FILE: verl_rl/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_rl/verl/models/transformers/kimi_vl.py function rotate_half (line 31) | def rotate_half(x): function apply_rotary_pos_emb (line 39) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids, unsqueeze_dim=1): function repeat_kv (line 75) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function _ulysses_flash_attn_forward (line 87) | def _ulysses_flash_attn_forward( FILE: verl_rl/verl/models/transformers/llama.py function llama_flash_attn_forward (line 40) | def llama_flash_attn_forward( function llama_attn_forward (line 168) | def llama_attn_forward( FILE: verl_rl/verl/models/transformers/monkey_patch.py function repeat_kv (line 38) | def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor: function _ulysses_flash_attention_forward (line 50) | def _ulysses_flash_attention_forward( function patch_vlm_for_ulysses_input_slicing (line 113) | def patch_vlm_for_ulysses_input_slicing(model_class: type): function patch_forward_with_backends (line 148) | def patch_forward_with_backends( function apply_monkey_patch (line 195) | def apply_monkey_patch( function is_transformers_version_in_range (line 323) | def is_transformers_version_in_range(min_version: Optional[str] = None, ... FILE: verl_rl/verl/models/transformers/npu_patch.py function apply_rotary_pos_emb_flashatt_npu (line 28) | def apply_rotary_pos_emb_flashatt_npu( function rms_norm_forward (line 45) | def rms_norm_forward(self, x): FILE: verl_rl/verl/models/transformers/qwen2.py function qwen2_flash_attn_forward (line 33) | def qwen2_flash_attn_forward( function qwen2_attn_forward (line 157) | def qwen2_attn_forward( FILE: verl_rl/verl/models/transformers/qwen2_5_vl.py class Qwen2_5_VLCausalLMOutputForPPO (line 26) | class Qwen2_5_VLCausalLMOutputForPPO(Qwen2_5_VLCausalLMOutputWithPast): function forward_base_model (line 31) | def forward_base_model( function forward_with_torch_backend (line 141) | def forward_with_torch_backend( function forward_with_triton_backend (line 216) | def forward_with_triton_backend( FILE: verl_rl/verl/models/transformers/qwen2_vl.py function get_rope_index (line 43) | def get_rope_index( function prepare_fa2_from_position_ids (line 143) | def prepare_fa2_from_position_ids( function flash_attention_forward (line 161) | def flash_attention_forward( function ulysses_flash_attn_forward (line 228) | def ulysses_flash_attn_forward( class Qwen2VLCausalLMOutputForPPO (line 308) | class Qwen2VLCausalLMOutputForPPO(Qwen2VLCausalLMOutputWithPast): function forward_base_model (line 313) | def forward_base_model( function forward_with_torch_backend (line 416) | def forward_with_torch_backend( function forward_with_triton_backend (line 489) | def forward_with_triton_backend( FILE: verl_rl/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_rl/verl/protocol.py class _DataProtoConfigMeta (line 47) | class _DataProtoConfigMeta(type): method auto_padding (line 53) | def auto_padding(cls): method auto_padding (line 58) | def auto_padding(cls, enabled: bool): class DataProtoConfig (line 63) | class DataProtoConfig(metaclass=_DataProtoConfigMeta): function pad_dataproto_to_divisor (line 70) | def pad_dataproto_to_divisor(data: "DataProto", size_divisor: int): function unpad_dataproto (line 98) | def unpad_dataproto(data: "DataProto", pad_size): function union_tensor_dict (line 105) | def union_tensor_dict(tensor_dict1: TensorDict, tensor_dict2: TensorDict... function union_numpy_dict (line 121) | def union_numpy_dict(tensor_dict1: dict[str, np.ndarray], tensor_dict2: ... function list_of_dict_to_dict_of_list (line 135) | def list_of_dict_to_dict_of_list(list_of_dict: list[dict]): function fold_batch_dim (line 147) | def fold_batch_dim(data: "DataProto", new_batch_size): function unfold_batch_dim (line 167) | def unfold_batch_dim(data: "DataProto", batch_dims=2): function collate_fn (line 186) | def collate_fn(x: list["DataProtoItem"]): class DataProtoItem (line 200) | class DataProtoItem: class DataProto (line 208) | class DataProto: method __post_init__ (line 220) | def __post_init__(self): method __len__ (line 224) | def __len__(self): method __getitem__ (line 233) | def __getitem__(self, item): method __getstate__ (line 267) | def __getstate__(self): method __setstate__ (line 278) | def __setstate__(self, data): method save_to_disk (line 292) | def save_to_disk(self, filepath): method load_from_disk (line 297) | def load_from_disk(filepath) -> "DataProto": method print_size (line 302) | def print_size(self, prefix=""): method check_consistency (line 320) | def check_consistency(self): method from_single_dict (line 346) | def from_single_dict(cls, data: dict[str, torch.Tensor | np.ndarray], ... method from_dict (line 362) | def from_dict( method to (line 411) | def to(self, device) -> "DataProto": method select (line 425) | def select(self, batch_keys=None, non_tensor_batch_keys=None, meta_inf... method select_idxs (line 460) | def select_idxs(self, idxs): method slice (line 500) | def slice(self, start=None, end=None, step=None): method pop (line 546) | def pop(self, batch_keys=None, non_tensor_batch_keys=None, meta_info_k... method rename (line 579) | def rename(self, old_keys=None, new_keys=None) -> "DataProto": method union (line 606) | def union(self, other: "DataProto") -> "DataProto": method make_iterator (line 625) | def make_iterator(self, mini_batch_size, epochs, seed=None, dataloader... method is_padding_enabled (line 665) | def is_padding_enabled(self): method padding (line 674) | def padding(self, padding_size, padding_candidate=""): method chunk (line 689) | def chunk(self, chunks: int) -> list["DataProto"]: method split (line 730) | def split(self, split_size: int) -> list["DataProto"]: method concat (line 742) | def concat(data: list["DataProto"]) -> "DataProto": method reorder (line 764) | def reorder(self, indices): method repeat (line 772) | def repeat(self, repeat_times=2, interleave=True): method unfold_column_chunks (line 816) | def unfold_column_chunks(self, n_split: int, split_keys: Optional[list... method sample_level_repeat (line 855) | def sample_level_repeat(self, repeat_times): class DataProtoFuture (line 905) | class DataProtoFuture: method concat (line 924) | def concat(data: list[ray.ObjectRef]) -> "DataProtoFuture": method chunk (line 928) | def chunk(self, chunks: int) -> list["DataProtoFuture"]: method get (line 943) | def get(self): function all_gather_data_proto (line 953) | def all_gather_data_proto(data: DataProto, process_group): FILE: verl_rl/verl/single_controller/base/decorator.py class Dispatch (line 26) | class Dispatch(DynamicEnum): function init_predefined_dispatch_mode (line 38) | def init_predefined_dispatch_mode(): class Execute (line 55) | class Execute(DynamicEnum): function init_predefined_execute_mode (line 66) | def init_predefined_execute_mode(): function _split_args_kwargs_data_proto (line 76) | def _split_args_kwargs_data_proto(chunks, *args, **kwargs): function _split_args_kwargs_data_proto_with_auto_padding (line 92) | def _split_args_kwargs_data_proto_with_auto_padding(chunks, *args, **kwa... function dispatch_one_to_all (line 121) | def dispatch_one_to_all(worker_group, *args, **kwargs): function dummy_direct_rollout_call (line 127) | def dummy_direct_rollout_call(worker_group, *args, **kwargs): function dispatch_all_to_all (line 131) | def dispatch_all_to_all(worker_group, *args, **kwargs): function collect_all_to_all (line 135) | def collect_all_to_all(worker_group, output): function dispatch_megatron_compute (line 139) | def dispatch_megatron_compute(worker_group, *args, **kwargs): function collect_megatron_compute (line 169) | def collect_megatron_compute(worker_group, output): function dispatch_megatron_compute_data_proto (line 185) | def dispatch_megatron_compute_data_proto(worker_group, *args, **kwargs): function _concat_data_proto_or_future (line 197) | def _concat_data_proto_or_future(output: list): function collect_megatron_compute_data_proto (line 216) | def collect_megatron_compute_data_proto(worker_group, output): function dispatch_megatron_pp_as_dp (line 231) | def dispatch_megatron_pp_as_dp(worker_group, *args, **kwargs): function collect_megatron_pp_as_dp (line 272) | def collect_megatron_pp_as_dp(worker_group, output): function collect_megatron_pp_only (line 287) | def collect_megatron_pp_only(worker_group, output): function dispatch_megatron_pp_as_dp_data_proto (line 302) | def dispatch_megatron_pp_as_dp_data_proto(worker_group, *args, **kwargs): function collect_megatron_pp_as_dp_data_proto (line 313) | def collect_megatron_pp_as_dp_data_proto(worker_group, output): function dispatch_dp_compute (line 322) | def dispatch_dp_compute(worker_group, *args, **kwargs): function collect_dp_compute (line 333) | def collect_dp_compute(worker_group, output): function dispatch_dp_compute_data_proto (line 341) | def dispatch_dp_compute_data_proto(worker_group, *args, **kwargs): function dispatch_dp_compute_data_proto_with_func (line 354) | def dispatch_dp_compute_data_proto_with_func(worker_group, *args, **kwar... function collect_dp_compute_data_proto (line 365) | def collect_dp_compute_data_proto(worker_group, output): function get_predefined_dispatch_fn (line 421) | def get_predefined_dispatch_fn(dispatch_mode): function register_dispatch_mode (line 425) | def register_dispatch_mode(dispatch_mode_name, dispatch_fn, collect_fn): function update_dispatch_mode (line 435) | def update_dispatch_mode(dispatch_mode, dispatch_fn, collect_fn): function get_predefined_execute_fn (line 444) | def get_predefined_execute_fn(execute_mode): function _check_dispatch_mode (line 456) | def _check_dispatch_mode(dispatch_mode): function _check_execute_mode (line 466) | def _check_execute_mode(execute_mode): function _materialize_futures (line 470) | def _materialize_futures(*args, **kwargs): function register (line 485) | def register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL... FILE: verl_rl/verl/single_controller/base/megatron/worker.py class MegatronWorker (line 18) | class MegatronWorker(Worker): method __init__ (line 19) | def __init__(self, cuda_visible_devices=None) -> None: method get_megatron_global_info (line 22) | def get_megatron_global_info(self): method get_megatron_rank_info (line 32) | def get_megatron_rank_info(self): method _init_hf_config_and_tf_config (line 42) | def _init_hf_config_and_tf_config( FILE: verl_rl/verl/single_controller/base/megatron/worker_group.py class MegatronWorkerGroup (line 21) | class MegatronWorkerGroup(WorkerGroup): method __init__ (line 22) | def __init__(self, resource_pool: ResourcePool, **kwargs): method init_megatron (line 27) | def init_megatron(self, default_megatron_kwargs: dict = None): method get_megatron_rank_info (line 30) | def get_megatron_rank_info(self, rank: int) -> DistRankInfo: method tp_size (line 35) | def tp_size(self): method dp_size (line 40) | def dp_size(self): method pp_size (line 45) | def pp_size(self): method cp_size (line 50) | def cp_size(self): method get_megatron_global_info (line 54) | def get_megatron_global_info(self): FILE: verl_rl/verl/single_controller/base/register_center/ray.py class WorkerGroupRegisterCenter (line 20) | class WorkerGroupRegisterCenter: method __init__ (line 21) | def __init__(self, rank_zero_info): method get_rank_zero_info (line 26) | def get_rank_zero_info(self): method set_worker_info (line 29) | def set_worker_info(self, rank, node_id) -> None: method get_worker_info (line 32) | def get_worker_info(self) -> dict[int, str]: function create_worker_group_register_center (line 36) | def create_worker_group_register_center(name, info): FILE: verl_rl/verl/single_controller/base/worker.py class DistRankInfo (line 30) | class DistRankInfo: class DistGlobalInfo (line 38) | class DistGlobalInfo: class WorkerHelper (line 45) | class WorkerHelper: method _get_node_ip (line 47) | def _get_node_ip(): method _get_free_port (line 54) | def _get_free_port(): method get_availale_master_addr_port (line 59) | def get_availale_master_addr_port(self): class Worker (line 64) | class Worker(WorkerHelper): method __new__ (line 74) | def __new__(cls, *args, **kwargs): method _configure_before_init (line 92) | def _configure_before_init(self, register_center_name: str, rank: int): method env_keys (line 125) | def env_keys(cls): method __init__ (line 137) | def __init__(self, cuda_visible_devices=None) -> None: method get_fused_worker_by_name (line 176) | def get_fused_worker_by_name(self, worker_name: str): method _setup_env_cuda_visible_devices (line 185) | def _setup_env_cuda_visible_devices(self): method _configure_with_store (line 236) | def _configure_with_store(self, store: dict): method get_master_addr_port (line 252) | def get_master_addr_port(self): method get_cuda_visible_devices (line 256) | def get_cuda_visible_devices(self): method world_size (line 264) | def world_size(self): method rank (line 269) | def rank(self): method execute_with_func_generator (line 274) | def execute_with_func_generator(self, func, *args, **kwargs): method execute_func_rank_zero (line 289) | def execute_func_rank_zero(self, func, *args, **kwargs): FILE: verl_rl/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 150) | def _is_worker_alive(self, worker): method _block_until_all_workers_alive (line 154) | def _block_until_all_workers_alive(self) -> None: method start_worker_aliveness_check (line 163) | def start_worker_aliveness_check(self, every_n_seconds=1) -> None: method world_size (line 178) | def world_size(self): method _bind_worker_method (line 182) | def _bind_worker_method(self, user_defined_cls, func_generator): FILE: verl_rl/verl/single_controller/ray/base.py function get_random_string (line 35) | def get_random_string(length: int) -> str: function func_generator (line 43) | def func_generator(self, method_name, dispatch_fn, collect_fn, execute_f... function sort_placement_group_by_node_ip (line 64) | def sort_placement_group_by_node_ip(pgs: list[PlacementGroup]) -> list[P... class RayResourcePool (line 84) | class RayResourcePool(ResourcePool): method __init__ (line 85) | def __init__( method get_placement_groups (line 102) | def get_placement_groups(self, strategy="STRICT_PACK", name=None, devi... function extract_pg_from_exist (line 135) | def extract_pg_from_exist( function merge_resource_pool (line 161) | def merge_resource_pool(rp1: RayResourcePool, rp2: RayResourcePool) -> R... class RayClassWithInitArgs (line 175) | class RayClassWithInitArgs(ClassWithInitArgs): method __init__ (line 183) | def __init__(self, cls, *args, **kwargs) -> None: method set_additional_resource (line 189) | def set_additional_resource(self, additional_resource): method update_options (line 197) | def update_options(self, options: dict): method __call__ (line 205) | def __call__( class RayWorkerGroup (line 255) | class RayWorkerGroup(WorkerGroup): method __init__ (line 263) | def __init__( method _is_worker_alive (line 319) | def _is_worker_alive(self, worker: ray.actor.ActorHandle): method _init_with_detached_workers (line 331) | def _init_with_detached_workers(self, worker_names, worker_handles): method _init_with_resource_pool (line 340) | def _init_with_resource_pool(self, resource_pool, ray_cls_with_init, b... method worker_names (line 452) | def worker_names(self): method from_detached (line 456) | def from_detached( method spawn (line 484) | def spawn(self, prefix_set): method spawn_fused (line 519) | def spawn_fused(self, prefix_set): method fuse (line 536) | def fuse(self, prefix_set): method _execute_remote_single_worker (line 548) | def _execute_remote_single_worker(self, worker, method_name: str, *arg... method execute_rank_zero_sync (line 567) | def execute_rank_zero_sync(self, method_name: str, *args, **kwargs): method execute_rank_zero_async (line 580) | def execute_rank_zero_async(self, method_name: str, *args, **kwargs): method execute_rank_zero (line 593) | def execute_rank_zero(self, method_name: str, *args, **kwargs): method execute_all (line 606) | def execute_all(self, method_name: str, *args, **kwargs): method execute_all_sync (line 619) | def execute_all_sync(self, method_name: str, *args, **kwargs): method execute_all_async (line 632) | def execute_all_async(self, method_name: str, *args, **kwargs): method master_address (line 663) | def master_address(self): method master_port (line 667) | def master_port(self): method workers (line 671) | def workers(self): method world_size (line 675) | def world_size(self): function _bind_workers_method_to_parent (line 686) | def _bind_workers_method_to_parent(cls, key, user_defined_cls): function _unwrap_ray_remote (line 734) | def _unwrap_ray_remote(cls): function _determine_fsdp_megatron_base_class (line 740) | def _determine_fsdp_megatron_base_class(mros: list): function create_colocated_worker_cls (line 754) | def create_colocated_worker_cls(class_dict: dict[str, RayClassWithInitAr... function create_colocated_worker_raw_cls (line 801) | def create_colocated_worker_raw_cls(class_dict: dict[str, RayClassWithIn... function create_colocated_worker_cls_fused (line 873) | def create_colocated_worker_cls_fused(class_dict: dict[str, RayClassWith... FILE: verl_rl/verl/single_controller/ray/megatron.py class NVMegatronRayWorkerGroup (line 26) | class NVMegatronRayWorkerGroup(RayWorkerGroup, MegatronWorkerGroup): method __init__ (line 32) | def __init__(self, resource_pool: RayResourcePool, ray_cls_with_init: ... class MegatronRayWorkerGroup (line 48) | class MegatronRayWorkerGroup(RayWorkerGroup, MegatronWorkerGroup): method __init__ (line 54) | def __init__( method init_megatron (line 73) | def init_megatron(self, default_megatron_kwargs: Optional[dict] = None): FILE: verl_rl/verl/third_party/sglang/parallel_state.py function initialize_parallel_state (line 38) | def initialize_parallel_state( function ensure_model_parallel_initialized (line 77) | def ensure_model_parallel_initialized( function model_parallel_is_initialized (line 105) | def model_parallel_is_initialized(): function initialize_model_parallel_for_sglang (line 111) | def initialize_model_parallel_for_sglang( function initialize_model_parallel (line 204) | def initialize_model_parallel( function get_device_mesh (line 292) | def get_device_mesh(): function get_tensor_model_parallel_group (line 306) | def get_tensor_model_parallel_group(): function get_tensor_model_parallel_world_size (line 313) | def get_tensor_model_parallel_world_size(): function get_tensor_model_parallel_rank (line 318) | def get_tensor_model_parallel_rank(): function get_tensor_model_parallel_src_rank (line 323) | def get_tensor_model_parallel_src_rank(): FILE: verl_rl/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_rl/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_rl/verl/third_party/vllm/__init__.py function get_version (line 22) | def get_version(pkg): FILE: verl_rl/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 61) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 75) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 86) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_rl/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(self, instance_id: Optional[str] = None, ground_truth... method execute (line 78) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 90) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 98) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_rl/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(self, instance_id: Optional[str] = None, ground_truth... method execute (line 78) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 96) | async def calc_reward(self, instance_id: str, **kwargs) -> float: method release (line 105) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_rl/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 63) | async def _call_tool(self, instance_id, parameters) -> tuple[str, dict]: method execute (line 80) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 107) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 110) | async def release(self, instance_id: str, **kwargs) -> None: method _parse_tool_result (line 114) | def _parse_tool_result(self, content: list) -> tuple[str, dict]: FILE: verl_rl/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_rl/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(self, instance_id: Optional[str] = None, ground_truth... method execute (line 166) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method execute_code (line 177) | def execute_code(self, instance_id, code, timeout=30, language="python"): method calc_reward (line 189) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 192) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_rl/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 46) | class OpenAIFunctionToolSchema(BaseModel): class OpenAIFunctionParsedSchema (line 53) | class OpenAIFunctionParsedSchema(BaseModel): class OpenAIFunctionCallSchema (line 60) | class OpenAIFunctionCallSchema(BaseModel): method from_openai_function_parsed_schema (line 67) | def from_openai_function_parsed_schema( class OpenAIFunctionToolCall (line 84) | class OpenAIFunctionToolCall(BaseModel): FILE: verl_rl/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 205) | def execute_search(self, instance_id: str, query_list: list, retrieval... method execute (line 229) | async def execute(self, instance_id: str, parameters: dict[str, Any], ... method calc_reward (line 273) | async def calc_reward(self, instance_id: str, **kwargs) -> str: method release (line 276) | async def release(self, instance_id: str, **kwargs) -> None: FILE: verl_rl/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_rl/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_rl/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_rl/verl/tools/utils/tool_registry.py class ToolType (line 30) | class ToolType(Enum): function initialize_mcp_tool (line 35) | async def initialize_mcp_tool(tool_cls, tool_config) -> list: function get_tool_class (line 67) | def get_tool_class(cls_name): function initialize_tools_from_config (line 81) | def initialize_tools_from_config(tools_config_file): FILE: verl_rl/verl/trainer/config/algorithm.py class KLControlConfig (line 22) | class KLControlConfig(BaseConfig): class PFPPOConfig (line 42) | class PFPPOConfig(BaseConfig): class FilterGroupsConfig (line 58) | class FilterGroupsConfig(BaseConfig): class AlgoConfig (line 77) | class AlgoConfig(BaseConfig): FILE: verl_rl/verl/trainer/config/config.py class CriticConfig (line 22) | class CriticConfig(BaseConfig): class MegatronCriticConfig (line 79) | class MegatronCriticConfig(CriticConfig): class FSDPCriticConfig (line 105) | class FSDPCriticConfig(CriticConfig): FILE: verl_rl/verl/trainer/constants_ppo.py function get_ppo_ray_runtime_env (line 30) | def get_ppo_ray_runtime_env(): FILE: verl_rl/verl/trainer/fsdp_sft_trainer.py function extract_step (line 85) | def extract_step(path): class FSDPSFTTrainer (line 92) | class FSDPSFTTrainer: method __init__ (line 93) | def __init__( method _normalize_config_bsz (line 137) | def _normalize_config_bsz(self): method _build_dataloader (line 150) | def _build_dataloader(self, train_dataset, val_dataset): method _build_model_optimizer (line 195) | def _build_model_optimizer(self): method _compute_loss_and_backward (line 349) | def _compute_loss_and_backward(self, batch, do_backward=True): method training_step (line 448) | def training_step(self, batch: TensorDict): method validation_step (line 497) | def validation_step(self, batch: TensorDict): method save_checkpoint (line 508) | def save_checkpoint(self, step): method _init_checkpoint_manager (line 551) | def _init_checkpoint_manager(self): method load_checkpoint (line 578) | def load_checkpoint(self): method _load_dataloader_state (line 612) | def _load_dataloader_state(self, checkpoint_path: str): method _determine_resume_path (line 637) | def _determine_resume_path(self): method _find_latest_checkpoint (line 662) | def _find_latest_checkpoint(self): method fit (line 677) | def fit(self): function run_sft (line 766) | def run_sft(config): function main (line 800) | def main(config): function create_sft_dataset (line 804) | def create_sft_dataset(data_paths, data_config, tokenizer): FILE: verl_rl/verl/trainer/main_eval.py function process_item (line 33) | def process_item(reward_fn, data_source, response_lst, reward_data): function main (line 40) | def main(config): FILE: verl_rl/verl/trainer/main_generation.py function main (line 44) | def main(config): function run_generation (line 48) | def run_generation(config) -> None: function main_task (line 60) | def main_task(config): FILE: verl_rl/verl/trainer/main_ppo.py function main (line 34) | def main(config): function run_ppo (line 44) | def run_ppo(config) -> None: class TaskRunner (line 84) | class TaskRunner: method run (line 91) | def run(self, config): function create_rl_dataset (line 244) | def create_rl_dataset(data_paths, data_config, tokenizer, processor, is_... function create_rl_sampler (line 294) | def create_rl_sampler(data_config, dataset): FILE: verl_rl/verl/trainer/ppo/core_algos.py function register_policy_loss (line 36) | def register_policy_loss(name): function get_policy_loss_fn (line 53) | def get_policy_loss_fn(name): function register_adv_est (line 74) | def register_adv_est(name_or_enum): function get_adv_estimator_fn (line 95) | def get_adv_estimator_fn(name_or_enum): class AdvantageEstimator (line 111) | class AdvantageEstimator(str, Enum): class AdaptiveKLController (line 131) | class AdaptiveKLController: method __init__ (line 137) | def __init__(self, init_kl_coef, target_kl, horizon): method update (line 142) | def update(self, current_kl, n_steps): class FixedKLController (line 155) | class FixedKLController: method __init__ (line 158) | def __init__(self, kl_coef): method update (line 161) | def update(self, current_kl, n_steps): function get_kl_controller (line 171) | def get_kl_controller(kl_ctrl): function compute_gae_advantage_return (line 194) | def compute_gae_advantage_return( function compute_grpo_outcome_advantage (line 246) | def compute_grpo_outcome_advantage( function compute_grpo_passk_outcome_advantage (line 312) | def compute_grpo_passk_outcome_advantage( function compute_reinforce_plus_plus_baseline_outcome_advantage (line 376) | def compute_reinforce_plus_plus_baseline_outcome_advantage( function compute_rloo_outcome_advantage (line 428) | def compute_rloo_outcome_advantage( function compute_opo_outcome_advantage (line 480) | def compute_opo_outcome_advantage( function compute_reinforce_plus_plus_outcome_advantage (line 534) | def compute_reinforce_plus_plus_outcome_advantage( function compute_remax_outcome_advantage (line 573) | def compute_remax_outcome_advantage( function compute_gpg_outcome_advantage (line 609) | def compute_gpg_outcome_advantage( function compute_rewards (line 670) | def compute_rewards(token_level_scores, old_log_prob, ref_log_prob, kl_r... function agg_loss (line 686) | def agg_loss(loss_mat: torch.Tensor, loss_mask: torch.Tensor, loss_agg_m... function compute_policy_loss_gspo (line 722) | def compute_policy_loss_gspo( function compute_policy_loss (line 768) | def compute_policy_loss( function compute_policy_loss_gpg (line 844) | def compute_policy_loss_gpg(old_log_prob, log_prob, advantages, response... function compute_policy_loss_clip_cov (line 865) | def compute_policy_loss_clip_cov( function compute_policy_loss_kl_cov (line 955) | def compute_policy_loss_kl_cov( function compute_entropy_loss (line 1021) | def compute_entropy_loss(logits, response_mask, loss_agg_mode: str = "to... function compute_value_loss (line 1038) | def compute_value_loss( function kl_penalty (line 1080) | def kl_penalty(logprob: torch.FloatTensor, ref_logprob: torch.FloatTenso... function compute_pf_ppo_reweight_data (line 1118) | def compute_pf_ppo_reweight_data( FILE: verl_rl/verl/trainer/ppo/metric_utils.py function reduce_metrics (line 30) | def reduce_metrics(metrics: dict[str, list[Any]]) -> dict[str, Any]: function _compute_response_info (line 50) | def _compute_response_info(batch: DataProto) -> dict[str, Any]: function compute_data_metrics (line 80) | def compute_data_metrics(batch: DataProto, use_critic: bool = True) -> d... function compute_timing_metrics (line 183) | def compute_timing_metrics(batch: DataProto, timing_raw: dict[str, float... function compute_throughout_metrics (line 225) | def compute_throughout_metrics(batch: DataProto, timing_raw: dict[str, f... function bootstrap_metric (line 261) | def bootstrap_metric( function calc_maj_val (line 302) | def calc_maj_val(data: list[dict[str, Any]], vote_key: str, val_key: str... function process_validation_metrics (line 338) | def process_validation_metrics( FILE: verl_rl/verl/trainer/ppo/ray_trainer.py class Role (line 68) | class Role(Enum): class ResourcePoolManager (line 83) | class ResourcePoolManager: method create_resource_pool (line 92) | def create_resource_pool(self): method get_resource_pool (line 112) | def get_resource_pool(self, role: Role) -> RayResourcePool: method get_n_gpus (line 116) | def get_n_gpus(self) -> int: method _check_resource_available (line 120) | def _check_resource_available(self): function apply_kl_penalty (line 154) | def apply_kl_penalty(data: DataProto, kl_ctrl: core_algos.AdaptiveKLCont... function compute_response_mask (line 197) | def compute_response_mask(data: DataProto): function compute_advantage (line 215) | def compute_advantage( class RayPPOTrainer (line 295) | class RayPPOTrainer: method __init__ (line 305) | def __init__( method _validate_config (line 392) | def _validate_config(self): method _create_dataloader (line 559) | def _create_dataloader(self, train_dataset, val_dataset, collate_fn, t... method _dump_generations (line 633) | def _dump_generations(self, inputs, outputs, scores, reward_extra_info... method _maybe_log_val_generations (line 663) | def _maybe_log_val_generations(self, inputs, outputs, scores): method _validate (line 687) | def _validate(self): method init_workers (line 836) | def init_workers(self): method _save_checkpoint (line 940) | def _save_checkpoint(self): method _load_checkpoint (line 998) | def _load_checkpoint(self): method _start_profiling (line 1055) | def _start_profiling(self, do_profile: bool) -> None: method _stop_profiling (line 1066) | def _stop_profiling(self, do_profile: bool) -> None: method _balance_batch (line 1077) | def _balance_batch(self, batch: DataProto, metrics, logging_prefix="gl... method fit (line 1094) | def fit(self): FILE: verl_rl/verl/trainer/ppo/reward.py function _call_with_kwargs (line 25) | def _call_with_kwargs(raw_fn, extra_kwargs, *args, **kwargs): function get_custom_reward_fn (line 34) | def get_custom_reward_fn(config): function load_reward_manager (line 84) | def load_reward_manager(config, tokenizer, num_examine, **reward_kwargs): function compute_reward (line 141) | def compute_reward(data: DataProto, reward_fn): function compute_reward_async (line 163) | def compute_reward_async(data: DataProto, config=None, tokenizer=None, r... FILE: verl_rl/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_rl/verl/utils/checkpoint/checkpoint_manager.py class BaseCheckpointManager (line 28) | 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 get_rng_state (line 145) | def get_rng_state(): method load_rng_state (line 158) | def load_rng_state(rng_state): function find_latest_ckpt_path (line 167) | def find_latest_ckpt_path(path, directory_format="global_step_{}"): function get_checkpoint_tracker_filename (line 199) | def get_checkpoint_tracker_filename(root_path: str): function should_save_ckpt_esi (line 206) | def should_save_ckpt_esi(max_steps_duration: float, save_ckpt_duration: ... FILE: verl_rl/verl/utils/checkpoint/fsdp_checkpoint_manager.py class FSDPConfig (line 43) | class FSDPConfig: class FSDPCheckpointManager (line 55) | class FSDPCheckpointManager(BaseCheckpointManager): method __init__ (line 74) | def __init__( method load_checkpoint (line 98) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 180) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl_rl/verl/utils/checkpoint/megatron_checkpoint_manager.py class MegatronCheckpointManager (line 48) | class MegatronCheckpointManager(BaseCheckpointManager): method __init__ (line 102) | def __init__( method get_rng_state (line 151) | def get_rng_state(self, use_dist_ckpt: bool = True, data_parallel_rand... method get_checkpoint_name (line 185) | def get_checkpoint_name( method generate_state_dict (line 231) | def generate_state_dict(self): method load_rng_states (line 266) | def load_rng_states(self, rng_states, data_parallel_random_init=False,... method load_checkpoint (line 284) | def load_checkpoint(self, local_path: str, hdfs_path: str = None, del_... method save_checkpoint (line 363) | def save_checkpoint(self, local_path: str, hdfs_path: str = None, glob... FILE: verl_rl/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 62) | def update_dict_with_config(dictionary: dict, config: DictConfig): FILE: verl_rl/verl/utils/dataset/multiturn_sft_dataset.py function convert_nested_value_to_list_recursive (line 32) | def convert_nested_value_to_list_recursive(data_item): class MultiTurnSFTDataset (line 45) | class MultiTurnSFTDataset(Dataset): method __init__ (line 50) | def __init__(self, parquet_files: str | list[str], tokenizer, config=N... method _download (line 73) | def _download(self): method _read_files_and_process (line 77) | def _read_files_and_process(self): method __len__ (line 106) | def __len__(self): method _process_message_tokens (line 109) | def _process_message_tokens( method _validate_and_convert_tokens (line 184) | def _validate_and_convert_tokens( method __getitem__ (line 226) | def __getitem__(self, item): FILE: verl_rl/verl/utils/dataset/rl_dataset.py function collate_fn (line 37) | def collate_fn(data_list: list[dict]) -> dict: class RLHFDataset (line 68) | class RLHFDataset(Dataset): method __init__ (line 85) | def __init__( method _download (line 123) | def _download(self, use_origin_parquet=False): method _read_files_and_tokenize (line 130) | def _read_files_and_tokenize(self): method maybe_filter_out_long_prompts (line 142) | def maybe_filter_out_long_prompts(self, dataframe: datasets.Dataset = ... method resume_dataset_state (line 178) | def resume_dataset_state(self): method __len__ (line 187) | def __len__(self): method _build_messages (line 190) | def _build_messages(self, example: dict): method __getitem__ (line 211) | def __getitem__(self, item): method __getstate__ (line 330) | def __getstate__(self): FILE: verl_rl/verl/utils/dataset/rm_dataset.py function download_files_distributed (line 24) | def download_files_distributed(download_fn): class RMDataset (line 38) | class RMDataset(Dataset): method __init__ (line 39) | def __init__( method _download (line 69) | def _download(self): method _read_files_and_tokenize (line 84) | def _read_files_and_tokenize(self): method __len__ (line 95) | def __len__(self): method _pad_to_length (line 98) | def _pad_to_length(self, input_ids, attention_mask): method __getitem__ (line 114) | def __getitem__(self, item): FILE: verl_rl/verl/utils/dataset/sft_dataset.py class SFTDataset (line 32) | class SFTDataset(Dataset): method __init__ (line 40) | def __init__(self, parquet_files: str | ListConfig, tokenizer, config): method _download (line 71) | def _download(self): method _read_files_and_tokenize (line 75) | def _read_files_and_tokenize(self): method __len__ (line 114) | def __len__(self): method __getitem__ (line 117) | def __getitem__(self, item): FILE: verl_rl/verl/utils/dataset/vision_utils.py function process_image (line 23) | def process_image(image: dict | Image.Image) -> Image.Image: function process_video (line 62) | def process_video( function process_multi_modal_inputs_for_minicpmo (line 95) | def process_multi_modal_inputs_for_minicpmo(input_ids, attention_mask, p... FILE: verl_rl/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_rl/verl/utils/device.py function is_torch_npu_available (line 18) | def is_torch_npu_available() -> bool: function get_visible_devices_keyword (line 32) | def get_visible_devices_keyword() -> str: function get_device_name (line 40) | def get_device_name() -> str: function get_torch_device (line 55) | def get_torch_device() -> any: function get_device_id (line 68) | def get_device_id() -> int: function get_nccl_backend (line 76) | def get_nccl_backend() -> str: FILE: verl_rl/verl/utils/distributed.py function initialize_global_process_group (line 23) | def initialize_global_process_group(timeout_second=36000): function destroy_global_process_group (line 40) | def destroy_global_process_group(): FILE: verl_rl/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_rl/verl/utils/flops_counter.py function get_device_flops (line 34) | def get_device_flops(unit="T"): class FlopsCounter (line 68) | class FlopsCounter: method __init__ (line 78) | def __init__(self, config: PretrainedConfig): method _estimate_unknown_flops (line 101) | def _estimate_unknown_flops(self, tokens_sum, batch_seqlens, delta_time): method _estimate_qwen2_flops (line 104) | def _estimate_qwen2_flops(self, tokens_sum, batch_seqlens, delta_time): method _estimate_deepseek_v3_flops (line 138) | def _estimate_deepseek_v3_flops(self, tokens_sum, batch_seqlens, delta... method _estimate_qwen2_moe_flops (line 192) | def _estimate_qwen2_moe_flops(self, tokens_sum, batch_seqlens, delta_t... method _estimate_gemma3_flops (line 228) | def _estimate_gemma3_flops(self, tokens_sum, batch_seqlens, delta_time): method estimate_flops (line 295) | def estimate_flops(self, batch_seqlens, delta_time): FILE: verl_rl/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 219) | def copy_local_path_from_hdfs( function local_mkdir_safe (line 264) | def local_mkdir_safe(path): FILE: verl_rl/verl/utils/fsdp_utils.py function init_fn (line 43) | def init_fn(x: torch.nn.Module): function get_init_weight_context_manager (line 50) | def get_init_weight_context_manager(use_meta_tensor=True, mesh: DeviceMe... function get_fsdp_wrap_policy (line 66) | def get_fsdp_wrap_policy(module, config=None, is_lora=False): function offload_fsdp_model_to_cpu (line 137) | def offload_fsdp_model_to_cpu(model: FSDP, empty_cache: bool = True): function offload_fsdp2_model_to_cpu (line 164) | def offload_fsdp2_model_to_cpu(model, empty_cache: bool = True): function load_fsdp_model_to_gpu (line 172) | def load_fsdp_model_to_gpu(model: FSDP): function load_fsdp2_model_to_gpu (line 192) | def load_fsdp2_model_to_gpu(model): function offload_fsdp_optimizer (line 199) | def offload_fsdp_optimizer(optimizer): function load_fsdp_optimizer (line 211) | def load_fsdp_optimizer(optimizer, device_id): function meta_device_init (line 223) | def meta_device_init(): function parallel_load_safetensors (line 254) | def parallel_load_safetensors(filepath): function parallel_init_module_fn (line 310) | def parallel_init_module_fn(module: torch.nn.Module, shard_states: dict[... function fsdp_version (line 394) | def fsdp_version(model): function get_fsdp_state_ctx (line 403) | def get_fsdp_state_ctx(model, state_type, state_cfg, optim_cfg): function get_fsdp_full_state_dict (line 410) | def get_fsdp_full_state_dict(model: torch.nn.Module, offload_to_cpu: boo... function fsdp2_load_full_state_dict (line 446) | def fsdp2_load_full_state_dict(model: torch.nn.Module, full_state: dict,... function apply_fsdp2 (line 483) | def apply_fsdp2(model, fsdp_kwargs, config): function fsdp2_clip_grad_norm_ (line 509) | def fsdp2_clip_grad_norm_(parameters, max_norm, norm_type=2.0, error_if_... function layered_summon_lora_params (line 525) | def layered_summon_lora_params(fsdp_module) -> OrderedDict: FILE: verl_rl/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_rl/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_extern_type (line 83) | def load_extern_type(file_path: Optional[str], type_name: Optional[str])... function _get_qualified_name (line 117) | def _get_qualified_name(func): function deprecated (line 124) | def deprecated(replacement: str = ""): FILE: verl_rl/verl/utils/kernel/kernels.py class EntropyReductionEnum (line 47) | class EntropyReductionEnum: function get_entropy_reduction_enum_number (line 57) | def get_entropy_reduction_enum_number(reduction: str) -> int: function get_entropy_reduction_enum (line 73) | def get_entropy_reduction_enum(ce_reduction: int) -> EntropyReductionEnum: class BackwardEnum (line 90) | class BackwardEnum: class Config (line 104) | class Config: function set_backward_method (line 119) | def set_backward_method(backward_method: BackwardEnum): function efficient_entropy_kernel_general_mainloop (line 132) | def efficient_entropy_kernel_general_mainloop( function efficient_entropy_triton_kernel_epilogue (line 266) | def efficient_entropy_triton_kernel_epilogue( function efficient_entropy_triton_kernel_epilogue_tp (line 358) | def efficient_entropy_triton_kernel_epilogue_tp( function efficient_entropy_triton_epilogue_tp_update (line 434) | def efficient_entropy_triton_epilogue_tp_update( function efficient_entropy_forward (line 481) | def efficient_entropy_forward( function efficient_entropy_backward_kernel_general_mainloop_MN (line 685) | def efficient_entropy_backward_kernel_general_mainloop_MN( function efficient_entropy_backward_kernel_d_hidden (line 862) | def efficient_entropy_backward_kernel_d_hidden( function efficient_entropy_backward_kernel_d_weight (line 989) | def efficient_entropy_backward_kernel_d_weight( function efficient_entropy_backward_kernel_general_d_logits (line 1109) | def efficient_entropy_backward_kernel_general_d_logits( function efficient_entropy_backward_kernel_general_d_logits_split_N (line 1248) | def efficient_entropy_backward_kernel_general_d_logits_split_N( function efficient_entropy_backward (line 1352) | def efficient_entropy_backward( FILE: verl_rl/verl/utils/kernel/linear_cross_entropy.py class LinearCrossEntropy (line 40) | class LinearCrossEntropy(torch.autograd.Function): method forward (line 42) | def forward( method backward (line 90) | def backward(ctx, dlogprobs: torch.Tensor, dentropy: torch.Tensor) -> ... FILE: verl_rl/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_rl/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_rl/verl/utils/megatron/dist_checkpointing.py function save_dist_checkpointing (line 26) | def save_dist_checkpointing(sharded_state_dict, ckpt_path, async_save=Fa... function load_dist_checkpointing (line 46) | def load_dist_checkpointing(sharded_state_dict, ckpt_dir): FILE: verl_rl/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_rl/verl/utils/megatron/optimizer.py function get_megatron_optimizer (line 21) | def get_megatron_optimizer( function get_megatron_optimizer_param_scheduler (line 38) | def get_megatron_optimizer_param_scheduler( function get_megatron_last_lr (line 76) | def get_megatron_last_lr(optimizer): FILE: verl_rl/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_rl/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_rl/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_rl/verl/utils/megatron_utils.py function get_model_config (line 43) | def get_model_config(model): function get_model (line 47) | def get_model( function unwrap_model (line 161) | def unwrap_model(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES): function convert_config (line 176) | def convert_config(hf_config: PretrainedConfig, megatron_config) -> Tran... function init_megatron_optim_config (line 221) | def init_megatron_optim_config(optim_config: dict) -> OptimizerConfig: function mcore_model_parallel_config (line 235) | def mcore_model_parallel_config( function offload_megatron_model_to_cpu (line 262) | def offload_megatron_model_to_cpu(models): function load_megatron_model_to_gpu (line 298) | def load_megatron_model_to_gpu(models, load_grad=True): function offload_megatron_copy_params (line 325) | def offload_megatron_copy_params(optimizers): function load_megatron_copy_params (line 366) | def load_megatron_copy_params(optimizers): function offload_megatron_optimizer (line 407) | def offload_megatron_optimizer(optimizers): function load_megatron_optimizer (line 426) | def load_megatron_optimizer(optimizers): function get_dist_checkpoint_path (line 444) | def get_dist_checkpoint_path(checkpoint_path): function get_hf_model_checkpoint_path (line 450) | def get_hf_model_checkpoint_path(checkpoint_path): function get_transformer_config_checkpoint_path (line 456) | def get_transformer_config_checkpoint_path(checkpoint_path): function convert_megatron_model_to_transformers_model (line 461) | def convert_megatron_model_to_transformers_model( function broadcast_from_megatron_pp (line 601) | def broadcast_from_megatron_pp(tensor: torch.Tensor): function broadcast_str_from_megatron_pp (line 638) | def broadcast_str_from_megatron_pp(obj: Any): function default_tp_concat_fn (line 664) | def default_tp_concat_fn( function per_tensor_generator (line 746) | def per_tensor_generator( function get_transformer_layer_offset (line 891) | def get_transformer_layer_offset(pipeline_rank, vp_rank, config: Transfo... FILE: verl_rl/verl/utils/memory_buffer.py class MemoryBuffer (line 26) | class MemoryBuffer: method __init__ (line 32) | def __init__(self, numel: int, numel_padded: int, dtype: torch.dtype, ... method zero (line 41) | def zero(self): method get (line 45) | def get(self, shape, start_index): function calc_padded_numel (line 55) | def calc_padded_numel(shape: torch.Size, dtype: torch.dtype): function get_weight_buffer_meta_from_module (line 62) | def get_weight_buffer_meta_from_module(module: nn.Module) -> dict[str, d... function build_memory_buffer (line 72) | def build_memory_buffer(weight_buffer_meta: dict[str, dict]) -> dict[tor... function build_memory_reference_from_module (line 101) | def build_memory_reference_from_module( function build_memory_reference (line 117) | def build_memory_reference(weight_buffer_meta: dict[str, dict], memory_b... class MemoryBufferModuleWrapper (line 144) | class MemoryBufferModuleWrapper: method __init__ (line 150) | def __init__(self, module: nn.Module): method get_memory_buffers (line 157) | def get_memory_buffers(self): method get_weight_buffer_meta (line 160) | def get_weight_buffer_meta(self): class MegatronMemoryBufferForRollout (line 164) | class MegatronMemoryBufferForRollout: method __init__ (line 179) | def __init__(self, transform_memory_param_fn): method initialize_weight_buffer (line 185) | def initialize_weight_buffer(self, weight_buffer_meta_pp: list[dict[st... method build_memory_reference (line 203) | def build_memory_reference(self): method named_parameters (line 209) | def named_parameters(self): method weight_buffers (line 213) | def weight_buffers(self): method memory_buffers (line 217) | def memory_buffers(self): FILE: verl_rl/verl/utils/metric/utils.py function reduce_metrics (line 23) | def reduce_metrics(metrics: dict[str, list[Any]]) -> dict[str, Any]: FILE: verl_rl/verl/utils/model.py class LambdaLayer (line 41) | class LambdaLayer(nn.Module): method __init__ (line 42) | def __init__(self, fn): method forward (line 46) | def forward(self, *args, **kwargs): function squeeze (line 50) | def squeeze(x): function update_model_config (line 54) | def update_model_config(module_config, override_config_kwargs): function get_huggingface_actor_config (line 67) | def get_huggingface_actor_config(model_name: str, override_config_kwargs... function get_generation_config (line 79) | def get_generation_config( function create_huggingface_actor (line 96) | def create_huggingface_actor(model_name: str, override_config_kwargs=Non... function create_huggingface_critic (line 120) | def create_huggingface_critic(model_name: str, override_config_kwargs=No... function get_model_size (line 142) | def get_model_size(model: nn.Module, scale="auto"): function print_model_size (line 169) | def print_model_size(model: nn.Module, name: str = None): function create_random_mask (line 176) | def create_random_mask( function compute_position_id_with_mask (line 219) | def compute_position_id_with_mask(mask): function convert_weight_keys (line 223) | def convert_weight_keys(state_dict: dict[str, torch.Tensor], model: PreT... function check_exclude_modules (line 244) | def check_exclude_modules(config, key: str) -> bool: function check_target_modules (line 267) | def check_target_modules(config, key: str) -> bool: function normalize_model_name (line 318) | def normalize_model_name(name, pp_rank, vpp_rank, transformer_config, la... function normalize_pp_vpp_params (line 342) | def normalize_pp_vpp_params(params, num_hidden_layers, layer_name="layer... function get_parallel_model_from_config (line 363) | def get_parallel_model_from_config( function _get_parallel_model_architecture_from_config (line 381) | def _get_parallel_model_architecture_from_config(config: PretrainedConfi... function _load_hf_model (line 394) | def _load_hf_model(config, model_config, is_value_model, local_cache_path): function get_hf_model_path (line 448) | def get_hf_model_path(config, local_cache_path="~/.cache/verl/rlhf"): function load_megatron_model_weights (line 461) | def load_megatron_model_weights( function load_megatron_gptmodel_weights (line 486) | def load_megatron_gptmodel_weights( function pad_packed_inputs (line 505) | def pad_packed_inputs(unpad_tokens: torch.Tensor, cu_seqlens, max_seqlen... function load_mcore_dist_weights (line 538) | def load_mcore_dist_weights(parallel_model, dist_weight_path, is_value_m... function get_parallel_gptmodel_from_config (line 557) | def get_parallel_gptmodel_from_config( function patch_valuehead_model (line 593) | def patch_valuehead_model(model) -> None: function load_valuehead_model (line 623) | def load_valuehead_model(local_path, torch_dtype, model_config, trust_re... class CausalLMOutputForPPO (line 662) | class CausalLMOutputForPPO(CausalLMOutputWithPast): FILE: verl_rl/verl/utils/net_utils.py function is_ipv4 (line 30) | def is_ipv4(ip_str: str) -> bool: function is_ipv6 (line 47) | def is_ipv6(ip_str: str) -> bool: FILE: verl_rl/verl/utils/profiler/config.py class ProfilerConfig (line 22) | class ProfilerConfig(BaseConfig): method union (line 43) | def union(self, other: "ProfilerConfig") -> "ProfilerConfig": method intersect (line 50) | def intersect(self, other: "ProfilerConfig") -> "ProfilerConfig": method __post_init__ (line 57) | def __post_init__(self) -> None: FILE: verl_rl/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_rl/verl/utils/profiler/mstx_profile.py function mark_start_range (line 29) | def mark_start_range(message: Optional[str] = None) -> None: function mark_end_range (line 39) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 49) | def mark_annotate(message: Optional[str] = None) -> Callable: function marked_timer (line 65) | def marked_timer(name: str, timing_raw: dict[str, float], *args: Any, **... function get_npu_profiler (line 89) | def get_npu_profiler(option: DictConfig, role: Optional[str] = None, pro... class NPUProfiler (line 143) | class NPUProfiler(DistProfiler): method __init__ (line 150) | def __init__(self, rank: int, config: ProfilerConfig, **kwargs): method start (line 169) | def start(self, **kwargs): method stop (line 179) | def stop(self): method annotate (line 188) | def annotate(message: Optional[str] = None, role: Optional[str] = None... FILE: verl_rl/verl/utils/profiler/nvtx_profile.py function mark_start_range (line 26) | def mark_start_range( function mark_end_range (line 47) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 57) | def mark_annotate( function marked_timer (line 84) | def marked_timer( class NsightSystemsProfiler (line 113) | class NsightSystemsProfiler(DistProfiler): method __init__ (line 116) | def __init__(self, rank: int, config: Optional[ProfilerConfig], **kwar... method start (line 134) | def start(self, **kwargs): method stop (line 140) | def stop(self): method annotate (line 147) | def annotate( FILE: verl_rl/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 47) | def log_gpu_memory_usage(head: str, logger: logging.Logger = None, level... class GPUMemoryLogger (line 69) | class GPUMemoryLogger(DecoratorLoggerBase): method __init__ (line 80) | def __init__(self, role: str, logger: logging.Logger = None, level=log... method __call__ (line 87) | def __call__(self, decorated_function: callable): method log (line 93) | def log(self, func, *args, **kwargs): function log_print (line 114) | def log_print(ctn: Any): function _timer (line 124) | def _timer(name: str, timing_raw: dict[str, float]): function simple_timer (line 139) | def simple_timer(name: str, timing_raw: dict[str, float]): function marked_timer (line 156) | def marked_timer( function reduce_timing (line 182) | def reduce_timing(timing_raw: dict[str, float]) -> dict[str, float]: FILE: verl_rl/verl/utils/profiler/profile.py class Profiler (line 24) | class Profiler: method __init__ (line 41) | def __init__(self, config): method _validate (line 68) | def _validate(self): method check (line 79) | def check(self): method start (line 82) | def start(self): method step (line 87) | def step(self): method stop (line 91) | def stop(self): method save (line 96) | def save(self): method stop_and_save (line 106) | def stop_and_save(self): method stop_trace (line 111) | def stop_trace(self): function mark_start_range (line 117) | def mark_start_range( function mark_end_range (line 134) | def mark_end_range(range_id: str) -> None: function mark_annotate (line 143) | def mark_annotate( class DistProfiler (line 167) | class DistProfiler: method __init__ (line 179) | def __init__(self, rank: int, config: Optional[ProfilerConfig] = None,... method start (line 182) | def start(self, **kwargs): method stop (line 185) | def stop(self): method annotate (line 189) | def annotate( class DistProfilerExtension (line 202) | class DistProfilerExtension: method __init__ (line 214) | def __init__(self, profiler: DistProfiler): method start_profile (line 220) | def start_profile(self, **kwargs) -> None: method stop_profile (line 225) | def stop_profile(self) -> None: FILE: verl_rl/verl/utils/py_functional.py function _mp_target_wrapper (line 31) | def _mp_target_wrapper(target_func: Callable, mp_queue: multiprocessing.... function timeout_limit (line 52) | def timeout_limit(seconds: float, use_signals: bool = False): function union_two_dict (line 147) | def union_two_dict(dict1: dict, dict2: dict): function append_to_dict (line 165) | def append_to_dict(data: dict, new_data: dict): class NestedNamespace (line 184) | class NestedNamespace(SimpleNamespace): method __init__ (line 200) | def __init__(self, dictionary, **kwargs): class DynamicEnumMeta (line 209) | class DynamicEnumMeta(type): method __iter__ (line 210) | def __iter__(cls) -> Iterator[Any]: method __contains__ (line 213) | def __contains__(cls, item: Any) -> bool: method __getitem__ (line 219) | def __getitem__(cls, name: str) -> Any: method __reduce_ex__ (line 222) | def __reduce_ex__(cls, protocol): method names (line 226) | def names(cls): method values (line 229) | def values(cls): class DynamicEnum (line 233) | class DynamicEnum(metaclass=DynamicEnumMeta): method __init__ (line 237) | def __init__(self, name: str, value: int): method __repr__ (line 241) | def __repr__(self): method __reduce_ex__ (line 244) | def __reduce_ex__(self, protocol): method register (line 254) | def register(cls, name: str) -> "DynamicEnum": method remove (line 265) | def remove(cls, name: str): method from_name (line 272) | def from_name(cls, name: str) -> Optional["DynamicEnum"]: function temp_env_var (line 277) | def temp_env_var(key: str, value: str): function convert_to_regular_types (line 307) | def convert_to_regular_types(obj): FILE: verl_rl/verl/utils/ray_utils.py function ray_noset_visible_devices (line 25) | def ray_noset_visible_devices(env_vars=os.environ): function parallel_put (line 48) | def parallel_put(data_list: list[Any], max_workers: Optional[int] = None): FILE: verl_rl/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_rl/verl/utils/reward_score/__init__.py function default_compute_score (line 19) | def default_compute_score( function _default_compute_score (line 117) | def _default_compute_score( FILE: verl_rl/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_rl/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_rl/verl/utils/reward_score/math.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_rl/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_rl/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_rl/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_rl/verl/utils/reward_score/prime_code/__init__.py function compute_score (line 21) | def compute_score(completion, test_cases, continuous=False): FILE: verl_rl/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_rl/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_rl/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_rl/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_rl/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_rl/verl/utils/reward_score/sandbox_fusion/__init__.py function compute_score (line 28) | def compute_score( FILE: verl_rl/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_rl/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_rl/verl/utils/rollout_trace.py class RolloutTraceConfig (line 23) | class RolloutTraceConfig: method __new__ (line 45) | def __new__(cls, *args, **kwargs): method get_instance (line 52) | def get_instance(cls) -> "RolloutTraceConfig": method init (line 58) | def init(cls, project_name: str, experiment_name: str, backend: str, t... method get_backend (line 88) | def get_backend(cls) -> Optional[str]: method get_client (line 92) | def get_client(cls) -> Optional[object]: method enable_token2text (line 96) | def enable_token2text(cls) -> Optional[bool]: method reset (line 100) | def reset(cls): function rollout_trace_attr (line 105) | def rollout_trace_attr(sample_index=None, step=None, rollout_n=None, nam... function rollout_trace_op (line 140) | def rollout_trace_op(func): FILE: verl_rl/verl/utils/seqlen_balancing.py function karmarkar_karp (line 26) | def karmarkar_karp(seqlen_list: list[int], k_partitions: int, equal_size... function greedy_partition (line 130) | def greedy_partition(seqlen_list: list[int], k_partitions: int, equal_si... function get_seqlen_balanced_partitions (line 150) | def get_seqlen_balanced_partitions(seqlen_list: list[int], k_partitions:... function log_seqlen_unbalance (line 194) | def log_seqlen_unbalance(seqlen_list: list[int], partitions: list[list[i... function ceildiv (line 242) | def ceildiv(a, b): function roundup_divisible (line 246) | def roundup_divisible(a, b): function rearrange_micro_batches (line 250) | def rearrange_micro_batches( function get_reverse_idx (line 322) | def get_reverse_idx(idx_map): function prepare_dynamic_batch (line 340) | def prepare_dynamic_batch(data: DataProto, max_token_len: int) -> tuple[... function restore_dynamic_batch (line 362) | def restore_dynamic_batch(data: torch.Tensor, batch_idx_list: list[list[... FILE: verl_rl/verl/utils/tokenizer.py function set_pad_token_id (line 21) | def set_pad_token_id(tokenizer): function hf_tokenizer (line 36) | def hf_tokenizer(name_or_path, correct_pad_token=True, correct_gemma2=Tr... function hf_processor (line 66) | def hf_processor(name_or_path, **kwargs): FILE: verl_rl/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_rl/verl/utils/torch_functional.py function gather_from_labels (line 49) | def gather_from_labels(data, label): function logprobs_from_logits (line 64) | def logprobs_from_logits(logits, labels, inplace_backward=True): function logprobs_from_logits_flash_attn (line 95) | def logprobs_from_logits_flash_attn(logits, labels, inplace_backward=True): function logprobs_from_logits_torch_npu (line 103) | def logprobs_from_logits_torch_npu(logits, labels): function logprobs_from_logits_naive (line 110) | def logprobs_from_logits_naive(logits, labels): function logprobs_from_logits_v2 (line 116) | def logprobs_from_logits_v2(logits: torch.FloatTensor, labels): function clip_by_value (line 136) | def clip_by_value(x, tensor_min, tensor_max): function entropy_from_logits (line 145) | def entropy_from_logits(logits: torch.Tensor): function entropy_from_logits_with_chunking (line 152) | def entropy_from_logits_with_chunking(logits: torch.Tensor, chunk_size: ... function masked_sum (line 163) | def masked_sum(values, mask, axis=None): function masked_mean (line 171) | def masked_mean(values, mask, axis=None): function masked_var (line 188) | def masked_var(values, mask, unbiased=True): function masked_whiten (line 206) | def masked_whiten(values, mask, shift_mean=True): function get_response_mask (line 226) | def get_response_mask(response_id: torch.Tensor, eos_token: int | list[i... function compute_grad_norm (line 249) | def compute_grad_norm(model: nn.Module): function broadcast_dict_tensor (line 257) | def broadcast_dict_tensor(tensors: dict[str, torch.Tensor] | TensorDict,... function allgather_dict_tensors (line 266) | def allgather_dict_tensors(tensors: dict[str, torch.Tensor] | TensorDict... function split_dict_tensor_into_batches (line 300) | def split_dict_tensor_into_batches(tensors: TensorDict, batch_size) -> l... function pad_2d_list_to_length (line 307) | def pad_2d_list_to_length(response, pad_token_id, max_length=None): function pad_sequence_to_length (line 318) | def pad_sequence_to_length(tensors, max_seq_len, pad_token_id, left_pad=... function postprocess_data (line 331) | def postprocess_data( function tokenize_and_postprocess_data (line 384) | def tokenize_and_postprocess_data( function remove_pad_token (line 407) | def remove_pad_token(input_ids: torch.Tensor, attention_mask: torch.Tens... function log_probs_from_logits_response (line 422) | def log_probs_from_logits_response(input_ids, logits, response_length): function log_probs_from_logits_response_rmpad (line 438) | def log_probs_from_logits_response_rmpad(input_ids, attention_mask, logi... function log_probs_from_logits_all_rmpad (line 465) | def log_probs_from_logits_all_rmpad(input_ids_rmpad, logits_rmpad, indic... function post_process_logits (line 493) | def post_process_logits(input_ids, logits, temperature, top_k, top_p): function get_cosine_schedule_with_warmup (line 509) | def get_cosine_schedule_with_warmup( function get_constant_schedule_with_warmup (line 553) | def get_constant_schedule_with_warmup( function prepare_decoder_attention_mask (line 578) | def prepare_decoder_attention_mask(attention_mask, input_shape, inputs_e... function _make_causal_mask (line 602) | def _make_causal_mask(input_ids_shape: torch.Size, dtype: torch.dtype, d... function _expand_mask (line 615) | def _expand_mask(mask: torch.Tensor, dtype: torch.dtype, tgt_len: Option... function get_unpad_data (line 629) | def get_unpad_data(attention_mask): function get_wsd_schedule_with_warmup (line 641) | def get_wsd_schedule_with_warmup( function check_device_is_available (line 697) | def check_device_is_available(): function distributed_mean_max_min_std (line 709) | def distributed_mean_max_min_std(local_tensor, compute_max=True, compute... function distributed_masked_mean (line 752) | def distributed_masked_mean(local_tensor, local_mask): FILE: verl_rl/verl/utils/tracking.py class Tracking (line 26) | class Tracking: method __init__ (line 39) | def __init__(self, project_name, experiment_name, default_backend: str... method log (line 130) | def log(self, data, step, backend=None): method __del__ (line 135) | def __del__(self): class ClearMLLogger (line 149) | class ClearMLLogger: method __init__ (line 150) | def __init__(self, project_name: str, experiment_name: str, config): method _get_logger (line 165) | def _get_logger(self): method log (line 168) | def log(self, data, step): method finish (line 197) | def finish(self): class _TensorboardAdapter (line 201) | class _TensorboardAdapter: method __init__ (line 202) | def __init__(self, project_name, experiment_name): method log (line 212) | def log(self, data, step): method finish (line 216) | def finish(self): class _MlflowLoggingAdapter (line 220) | class _MlflowLoggingAdapter: method log (line 221) | def log(self, data, step): function _compute_mlflow_params_from_objects (line 228) | def _compute_mlflow_params_from_objects(params) -> dict[str, Any]: function _transform_params_to_json_serializable (line 235) | def _transform_params_to_json_serializable(x, convert_list_to_dict: bool): function _flatten_dict (line 255) | def _flatten_dict(raw: dict[str, Any], *, sep: str) -> dict[str, Any]: class ValidationGenerationsLogger (line 264) | class ValidationGenerationsLogger: method log (line 268) | def log(self, loggers, samples, step): method log_generations_to_vemlp_wandb (line 284) | def log_generations_to_vemlp_wandb(self, samples, step): method log_generations_to_wandb (line 289) | def log_generations_to_wandb(self, samples, step): method _log_generations_to_wandb (line 294) | def _log_generations_to_wandb(self, samples, step, wandb): method log_generations_to_swanlab (line 322) | def log_generations_to_swanlab(self, samples, step): method log_generations_to_mlflow (line 337) | def log_generations_to_mlflow(self, samples, step): method log_generations_to_clearml (line 359) | def log_generations_to_clearml(self, samples, step): method log_generations_to_tensorboard (line 387) | def log_generations_to_tensorboard(self, samples, step): FILE: verl_rl/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(input_ids_rmpad: torch.Tensor, position_ids_rmpad: Optio... function ulysses_pad_and_slice_inputs (line 296) | def ulysses_pad_and_slice_inputs( function validate_ulysses_config (line 324) | def validate_ulysses_config(num_heads, ulysses_sequence_size): FILE: verl_rl/verl/utils/vllm_utils.py function patch_vllm_moe_model_weight_loader (line 66) | def patch_vllm_moe_model_weight_loader(model): class TensorLoRARequest (line 107) | class TensorLoRARequest(LoRARequest): class VLLMHijack (line 112) | class VLLMHijack: method hijack (line 114) | def hijack(): function is_version_ge (line 201) | def is_version_ge(pkg: str = "vllm", minver: str = "0.7.3"): FILE: verl_rl/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_rl/verl/workers/actor/dp_actor.py class DataParallelPPOActor (line 51) | class DataParallelPPOActor(BasePPOActor): method __init__ (line 52) | def __init__(self, config, actor_module: nn.Module, actor_optimizer: t... method _forward_micro_batch (line 80) | def _forward_micro_batch( method _optimizer_step (line 272) | def _optimizer_step(self): method compute_log_prob (line 291) | def compute_log_prob(self, data: DataProto, calculate_entropy=False) -... method update_policy (line 352) | def update_policy(self, data: DataProto): FILE: verl_rl/verl/workers/actor/megatron_actor.py class MegatronPPOActor (line 58) | class MegatronPPOActor(BasePPOActor): method __init__ (line 59) | def __init__( method _validate_config (line 151) | def _validate_config(self, config) -> None: method compute_log_prob (line 162) | def compute_log_prob(self, data: DataProto, calculate_entropy=False) -... method make_minibatch_iterator (line 272) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 321) | def forward_backward_batch( method update_policy (line 601) | def update_policy(self, dataloader: Iterable[DataProto]) -> dict: FILE: verl_rl/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_rl/verl/workers/critic/dp_critic.py class DataParallelPPOCritic (line 46) | class DataParallelPPOCritic(BasePPOCritic): method __init__ (line 47) | def __init__(self, config, critic_module: nn.Module, critic_optimizer:... method _forward_micro_batch (line 57) | def _forward_micro_batch(self, micro_batch): method _optimizer_step (line 139) | def _optimizer_step(self): method compute_values (line 158) | def compute_values(self, data: DataProto) -> torch.Tensor: method update_critic (line 190) | def update_critic(self, data: DataProto): FILE: verl_rl/verl/workers/critic/megatron_critic.py class MegatronPPOCritic (line 46) | class MegatronPPOCritic(BasePPOCritic): method __init__ (line 47) | def __init__( method _validate_config (line 82) | def _validate_config(self, config) -> None: method compute_values (line 93) | def compute_values(self, data: DataProto) -> DataProto: method make_minibatch_iterator (line 147) | def make_minibatch_iterator(self, data: DataProto) -> Iterable[DataPro... method forward_backward_batch (line 157) | def forward_backward_batch( method update_critic (line 295) | def update_critic(self, dataloader: Iterable[DataProto]): FILE: verl_rl/verl/workers/engine/base.py class BaseEngine (line 25) | class BaseEngine: method __init__ (line 32) | def __init__(self, config): method init_model (line 41) | def init_model(self): method train_mode (line 49) | def train_mode(self): method eval_mode (line 59) | def eval_mode(self): method infer_batch (line 69) | def infer_batch( method train_batch (line 87) | def train_batch( method optimizer_zero_grad (line 104) | def optimizer_zero_grad(self): method optimizer_step (line 110) | def optimizer_step(self): method lr_scheduler_step (line 119) | def lr_scheduler_step(self): method shard_data (line 128) | def shard_data(self, data): method unshard_data (line 140) | def unshard_data(self, data): method to (line 152) | def to(self, device: str, model: bool = True, optimizer: bool = True): method save_checkpoint (line 163) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 175) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class EngineRegistry (line 187) | class EngineRegistry: method register (line 199) | def register(cls, key): method new (line 220) | def new(cls, key, *args, **kwargs): FILE: verl_rl/verl/workers/engine/fsdp/engine_impl.py class FSDPEngine (line 83) | class FSDPEngine(BaseEngine): method __init__ (line 90) | def __init__(self, config): method init_model (line 147) | def init_model(self): method _build_model_optimizer (line 175) | def _build_model_optimizer(self, config): method train_mode (line 368) | def train_mode(self): method eval_mode (line 376) | def eval_mode(self): method shard_data (line 384) | def shard_data(self, data): method unshard_data (line 390) | def unshard_data(self, data): method get_default_ctx (line 396) | def get_default_ctx(self): method _forward_micro_batch (line 404) | def _forward_micro_batch(self, micro_batch): method infer_batch (line 482) | def infer_batch( method train_batch (line 546) | def train_batch( method optimizer_zero_grad (line 592) | def optimizer_zero_grad(self): method optimizer_step (line 598) | def optimizer_step(self): method lr_scheduler_step (line 622) | def lr_scheduler_step(self): method to (line 630) | def to(self, device: str, model: bool = True, optimizer: bool = True): method save_checkpoint (line 651) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 666) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class EngineEvalModeCtx (line 687) | class EngineEvalModeCtx: method __init__ (line 688) | def __init__(self, engine): method __enter__ (line 691) | def __enter__(self): method __exit__ (line 699) | def __exit__(self, exc_type, exc_value, traceback): class EngineTrainModeCtx (line 706) | class EngineTrainModeCtx: method __init__ (line 707) | def __init__(self, engine): method __enter__ (line 710) | def __enter__(self): method __exit__ (line 720) | def __exit__(self, exc_type, exc_value, traceback): FILE: verl_rl/verl/workers/engine/fsdp/utils.py function create_device_mesh (line 19) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 40) | def get_sharding_strategy(device_mesh): FILE: verl_rl/verl/workers/engine/megatron/engine_impl.py class MegatronEngine (line 24) | class MegatronEngine(BaseEngine): method __init__ (line 25) | def __init__(self, config): method init_model (line 28) | def init_model(self): method train_mode (line 31) | def train_mode(self): method eval_mode (line 41) | def eval_mode(self): method infer_batch (line 51) | def infer_batch( method train_batch (line 69) | def train_batch( method optimizer_zero_grad (line 86) | def optimizer_zero_grad(self): method optimizer_step (line 92) | def optimizer_step(self): method lr_scheduler_step (line 101) | def lr_scheduler_step(self): method shard_data (line 110) | def shard_data(self, data): method unshard_data (line 122) | def unshard_data(self, data): method to (line 134) | def to(self, device: str, model: bool = True, optimizer: bool = True): method save_checkpoint (line 145) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 157) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... FILE: verl_rl/verl/workers/fsdp_workers.py function create_device_mesh (line 83) | def create_device_mesh(world_size, fsdp_size): function get_sharding_strategy (line 93) | def get_sharding_strategy(device_mesh): class ActorRolloutRefWorker (line 105) | class ActorRolloutRefWorker(Worker, DistProfilerExtension): method __init__ (line 111) | def __init__(self, config: DictConfig, role: str, **kwargs): method _build_model_optimizer (line 209) | def _build_model_optimizer( method _build_rollout (line 459) | def _build_rollout(self, trust_remote_code=False): method init_model (line 563) | def init_model(self): method update_actor (line 674) | def update_actor(self, data: DataProto): method generate_sequences (line 720) | def generate_sequences(self, prompts: DataProto): method compute_log_prob (line 760) | def compute_log_prob(self, data: DataProto): method compute_ref_log_prob (line 804) | def compute_ref_log_prob(self, data: DataProto): method save_checkpoint (line 839) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 888) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... method start_profile (line 908) | def start_profile(self, **kwargs) -> None: method stop_profile (line 913) | def stop_profile(self) -> None: class CriticWorker (line 918) | class CriticWorker(Worker, DistProfilerExtension): method __init__ (line 919) | def __init__(self, config): method _build_critic_model_optimizer (line 977) | def _build_critic_model_optimizer(self, config): method init_model (line 1175) | def init_model(self): method compute_values (line 1207) | def compute_values(self, data: DataProto): method update_critic (line 1231) | def update_critic(self, data: DataProto): method save_checkpoint (line 1267) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 1282) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... class RewardModelWorker (line 1301) | class RewardModelWorker(Worker, DistProfilerExtension): method __init__ (line 1306) | def __init__(self, config): method _build_model (line 1344) | def _build_model(self, config): method init_model (line 1425) | def init_model(self): method _forward_micro_batch (line 1430) | def _forward_micro_batch(self, micro_batch): method _expand_to_token_level (line 1502) | def _expand_to_token_level(self, data: DataProto, scores: torch.Tensor): method _switch_chat_template (line 1519) | def _switch_chat_template(self, data: DataProto): method compute_rm_score (line 1584) | def compute_rm_score(self, data: DataProto): class AsyncActorRolloutRefWorker (line 1645) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method _build_rollout (line 1646) | def _build_rollout(self, trust_remote_code=False): method generate_sequences (line 1662) | def generate_sequences(self, prompts: DataProto): method execute_method (line 1668) | def execute_method(self, method: str | bytes, *args, **kwargs): method get_zeromq_address (line 1673) | def get_zeromq_address(self): method chat_completion (line 1679) | async def chat_completion(self, json_request): method generate (line 1684) | async def generate(self, prompt_ids: list[int], sampling_params: dict[... method wake_up (line 1689) | async def wake_up(self): method sleep (line 1696) | async def sleep(self): FILE: verl_rl/verl/workers/megatron_workers.py function set_random_seed (line 63) | def set_random_seed(seed): class ActorRolloutRefWorker (line 82) | class ActorRolloutRefWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 88) | def __init__(self, config: DictConfig, role: str, **kwargs): method _build_model_optimizer (line 161) | def _build_model_optimizer(self, model_path, optim_config, override_mo... method _build_rollout (line 271) | def _build_rollout(self, trust_remote_code=False): method init_model (line 384) | def init_model(self): method update_actor (line 499) | def update_actor(self, data: DataProto): method generate_sequences (line 543) | def generate_sequences(self, prompts: DataProto): method compute_ref_log_prob (line 580) | def compute_ref_log_prob(self, data: DataProto): method compute_log_prob (line 603) | def compute_log_prob(self, data: DataProto): method load_checkpoint (line 628) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method load_pretrained_model (line 640) | def load_pretrained_model(self, checkpoint_path, del_local_after_load=... method save_checkpoint (line 644) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... class AsyncActorRolloutRefWorker (line 655) | class AsyncActorRolloutRefWorker(ActorRolloutRefWorker): method _build_rollout (line 656) | def _build_rollout(self, trust_remote_code=False): method execute_method (line 674) | def execute_method(self, method: str | bytes, *args, **kwargs): method get_zeromq_address (line 684) | def get_zeromq_address(self): method chat_completion (line 690) | async def chat_completion(self, json_request): method generate (line 695) | async def generate(self, prompt_ids: list[int], sampling_params: dict[... method wake_up (line 700) | async def wake_up(self): method sleep (line 707) | async def sleep(self): class CriticWorker (line 714) | class CriticWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 715) | def __init__(self, config): method _build_critic_model_optimizer (line 764) | def _build_critic_model_optimizer( method init_model (line 854) | def init_model(self): method compute_values (line 919) | def compute_values(self, data: DataProto): method update_critic (line 936) | def update_critic(self, data: DataProto): method load_checkpoint (line 966) | def load_checkpoint(self, checkpoint_path, hdfs_path=None, del_local_a... method save_checkpoint (line 978) | def save_checkpoint(self, checkpoint_path, hdfs_path=None, global_step... class RewardModelWorker (line 988) | class RewardModelWorker(MegatronWorker, DistProfilerExtension): method __init__ (line 993) | def __init__(self, config): method _build_rm_model (line 1034) | def _build_rm_model(self, model_path, tokenizer, override_model_config... method init_model (line 1101) | def init_model(self): method compute_rm_score (line 1152) | def compute_rm_score(self, data: DataProto): FILE: verl_rl/verl/workers/reward_manager/batch.py class BatchRewardManager (line 24) | class BatchRewardManager: method __init__ (line 36) | def __init__(self, tokenizer, num_examine, compute_score, reward_fn_ke... method verify (line 43) | def verify(self, data): method __call__ (line 72) | def __call__(self, data: DataProto, return_dict=False): FILE: verl_rl/verl/workers/reward_manager/dapo.py class DAPORewardManager (line 25) | class DAPORewardManager: method __init__ (line 28) | def __init__( method __call__ (line 52) | def __call__(self, data: DataProto, return_dict: bool = False): FILE: verl_rl/verl/workers/reward_manager/naive.py class NaiveRewardManager (line 25) | class NaiveRewardManager: method __init__ (line 28) | def __init__(self, tokenizer, num_examine, compute_score=None, reward_... method __call__ (line 44) | def __call__(self, data: DataProto, return_dict=False): FILE: verl_rl/verl/workers/reward_manager/prime.py function single_compute_score (line 29) | async def single_compute_score(evaluation_func, completion, reference, t... function parallel_compute_score_async (line 43) | async def parallel_compute_score_async( function run_reward_scoring (line 89) | def run_reward_scoring(evaluation_func, completions, references, tasks, ... class PrimeRewardManager (line 101) | class PrimeRewardManager: method __init__ (line 106) | def __init__( method verify (line 118) | def verify(self, data): method __call__ (line 150) | def __call__(self, data: DataProto, return_dict: bool = False): FILE: verl_rl/verl/workers/reward_manager/registry.py function register (line 20) | def register(name): function get_reward_manager_cls (line 39) | def get_reward_manager_cls(name): FILE: verl_rl/verl/workers/reward_model/base.py class BasePPORewardModel (line 23) | class BasePPORewardModel(ABC): method __init__ (line 24) | def __init__(self, config): method compute_reward (line 28) | def compute_reward(self, data: DataProto) -> DataProto: FILE: verl_rl/verl/workers/reward_model/megatron/reward_model.py class MegatronRewardModel (line 34) | class MegatronRewardModel(BasePPORewardModel): method __init__ (line 35) | def __init__( method re_encode_by_rm_tokenizer (line 60) | def re_encode_by_rm_tokenizer(self, data: DataProto) -> DataProto: method compute_reward (line 132) | def compute_reward(self, data: DataProto) -> DataProto: method forward_batch (line 215) | def forward_batch(self, data: DataProto, use_dynamic_bsz=False, micro_... method offload_params_to_cpu (line 337) | def offload_params_to_cpu(self): method load_params_to_cuda (line 345) | def load_params_to_cuda(self): FILE: verl_rl/verl/workers/roles/actor.py class ActorWorker (line 20) | class ActorWorker(Worker): method __init__ (line 26) | def __init__(self, config): method init_model (line 30) | def init_model(self): method update_actor (line 34) | def update_actor(self, data: DataProto): method compute_log_prob (line 38) | def compute_log_prob(self, data: DataProto): method compute_ref_log_prob (line 42) | def compute_ref_log_prob(self, data: DataProto): method save_checkpoint (line 46) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 50) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... FILE: verl_rl/verl/workers/roles/critic.py class CriticWorker (line 42) | class CriticWorker(Worker, DistProfilerExtension): method __init__ (line 43) | def __init__(self, config): method init_model (line 56) | def init_model(self): method _post_fn_values (line 59) | def _post_fn_values(self, micro_batch, preds): method compute_values (line 71) | def compute_values(self, data: DataProto): method loss_fn (line 90) | def loss_fn( method update_critic (line 125) | def update_critic(self, data: DataProto): method save_checkpoint (line 178) | def save_checkpoint(self, local_path, hdfs_path=None, global_step=0, m... method load_checkpoint (line 182) | def load_checkpoint(self, local_path, hdfs_path=None, del_local_after_... FILE: verl_rl/verl/workers/rollout/async_server.py function _get_free_port (line 37) | def _get_free_port(): class AsyncServerBase (line 43) | class AsyncServerBase(ABC): method __init__ (line 46) | def __init__(self): method _start_fastapi_server (line 52) | async def _start_fastapi_server(self): method get_server_address (line 72) | async def get_server_address(self) -> tuple[str, int]: method chat_completion (line 78) | async def chat_completion(self, raw_request: Request) -> JSONResponse: method generate (line 92) | async def generate(self, prompt_ids: list[int], sampling_params: dict[... method init_engine (line 106) | async def init_engine(self): method wake_up (line 111) | async def wake_up(self): method sleep (line 116) | async def sleep(self): class AsyncLLMServerManager (line 121) | class AsyncLLMServerManager: method __init__ (line 124) | def __init__(self, config: DictConfig, worker_group: RayWorkerGroup): method _init_chat_scheduler (line 191) | def _init_chat_scheduler(self): method wake_up (line 207) | def wake_up(self): method sleep (line 212) | def sleep(self): method submit_chat_completions (line 217) | def submit_chat_completions( method generate_sequences (line 238) | def generate_sequences(self, prompts: DataProto, **sampling_params) ->... function async_server_class (line 248) | def async_server_class( FILE: verl_rl/verl/workers/rollout/base.py class BaseRollout (line 22) | class BaseRollout(ABC): method generate_sequences (line 26) | def generate_sequences(self, prompts: DataProto) -> DataProto: FILE: verl_rl/verl/workers/rollout/chat_scheduler.py class CompletionCallback (line 43) | class CompletionCallback(ABC): method __init__ (line 44) | def __init__(self, config: DictConfig, scheduler: "ChatCompletionSched... method tool_schemas (line 60) | def tool_schemas(self): method extra_body (line 65) | def extra_body(self) -> dict[str, Any]: method __call__ (line 70) | async def __call__(self, messages: list[dict[str, str]], completions: ... method postprocess (line 81) | def postprocess(self, batch: DataProto, batch_conversations: list[list... class ToolCompletionCallback (line 98) | class ToolCompletionCallback(CompletionCallback): method __init__ (line 99) | def __init__(self, config: DictConfig, scheduler: "ChatCompletionSched... method __call__ (line 104) | async def __call__(self, messages: list[dict[str, str]], completions: ... method _call_tool (line 139) | async def _call_tool(self, tool_call) -> dict[str, str]: method postprocess (line 160) | def postprocess(self, batch: DataProto, batch_conversations: list[list... method _mask_out_tools_calling_tokens (line 221) | def _mask_out_tools_calling_tokens( class ChatCompletionScheduler (line 273) | class ChatCompletionScheduler: method __init__ (line 274) | def __init__( method submit_chat_completions (line 306) | def submit_chat_completions(self, *, messages: list[dict[str, str]], r... method _submit_chat_completions_and_callback (line 321) | async def _submit_chat_completions_and_callback( method _chat_completions_openai (line 370) | async def _chat_completions_openai(self, address: str, **chat_complete... method _chat_completions_aiohttp (line 374) | async def _chat_completions_aiohttp(self, address: str, **chat_complet... method generate_sequences (line 391) | async def generate_sequences(self, batch: DataProto) -> DataProto: method _submit_chat_completions_semaphore (line 430) | async def _submit_chat_completions_semaphore( FILE: verl_rl/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_rl/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_rl/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 123) | def initialize_request(cls, values): method _handle_apply_chat_template (line 220) | def _handle_apply_chat_template( method _get_position_ids (line 256) | def _get_position_ids( method _update_input_ids (line 294) | def _update_input_ids( method _update_multi_modal_inputs (line 331) | def _update_multi_modal_inputs(self, new_multi_modal_inputs: dict[str,... method get_generation_prompt_ids (line 343) | def get_generation_prompt_ids( method add_user_message (line 374) | def add_user_message( method add_assistant_message (line 390) | def add_assistant_message( method add_tool_response_messages (line 408) | def add_tool_response_messages( method update_metrics (line 485) | def update_metrics(self, metrics: Any, tool_id: str) -> None: method _get_prompt_diffs (line 493) | def _get_prompt_diffs( method finalize (line 550) | def finalize( method truncate_output_ids (line 661) | def truncate_output_ids( FILE: verl_rl/verl/workers/rollout/sglang_rollout/async_sglang_server.py class AsyncSGLangServer (line 30) | class AsyncSGLangServer(AsyncServerBase): method __init__ (line 31) | def __init__(self, config: DictConfig, dp_size: int, dp_rank: int, wg_... method init_engine (line 41) | async def init_engine(self): method chat_completion (line 70) | async def chat_completion(self, raw_request: Request): method generate (line 78) | async def generate(self, prompt_ids: list[int], sampling_params: dict[... method wake_up (line 81) | async def wake_up(self): method sleep (line 89) | async def sleep(self): FILE: verl_rl/verl/workers/rollout/sglang_rollout/sglang_rollout.py function _set_envs_and_config (line 90) | def _set_envs_and_config(server_args: ServerArgs): class AsyncEngine (line 134) | class AsyncEngine(sglang.srt.entrypoints.engine.Engine): method __init__ (line 135) | def __init__(self, **kwargs): method release_memory_occupation (line 140) | async def release_memory_occupation(self, tags: Optional[list[str]] = ... method resume_memory_occupation (line 148) | async def resume_memory_occupation(self, tags: Optional[list[str]] = N... method update_weights_from_tensor (line 163) | async def update_weights_from_tensor( method flush_cache (line 180) | async def flush_cache(self): function _pre_process_inputs (line 186) | def _pre_process_inputs( function _post_process_outputs (line 196) | def _post_process_outputs(processing_class, output): function get_tool_call_parser_type (line 227) | def get_tool_call_parser_type( class SGLangRollout (line 251) | class SGLangRollout(BaseRollout): method __init__ (line 252) | def __init__( method _init_distributed_env (line 326) | def _init_distributed_env(self, device_mesh_cpu, **kwargs): method _verify_config (line 371) | def _verify_config(self, model_hf_config): method _init_inference_engine (line 415) | def _init_inference_engine(self, trust_remote_code, actor_module, port): method _init_sampling_params (line 474) | def _init_sampling_params(self, **kwargs): method _initialize_tools (line 489) | def _initialize_tools(self, config, processing_class): method _initialize_interactions (line 537) | def _initialize_interactions(self, config): method generate_sequences (line 554) | def generate_sequences(self, prompts: DataProto, **kwargs) -> DataProto: method _batch_level_generate_sequences (line 581) | def _batch_level_generate_sequences(self, prompts: DataProto, **kwargs... method _async_rollout_a_request (line 789) | async def _async_rollout_a_request( method _handle_engine_call (line 997) | async def _handle_engine_call( method _handle_engine_generate (line 1003) | async def _handle_engine_generate( method _handle_pending_state (line 1018) | async def _handle_pending_state(self, _req: AsyncRolloutRequest) -> As... method generate_sequences_with_tools (line 1041) | def generate_sequences_with_tools(self, prompts: DataProto, **kwargs) ... method _req_level_generate_sequences (line 1051) | def _req_level_generate_sequences(self, prompts: DataProto, **kwargs) ... method _preprocess_prompt_to_async_rollout_requests (line 1238) | def _preprocess_prompt_to_async_rollout_requests(self, prompts: DataPr... method chat_completion (line 1308) | async def chat_completion(self, json_request): method generate (line 1383) | async def generate( method wake_up (line 1391) | async def wake_up(self): method sleep (line 1398) | async def sleep(self): FILE: verl_rl/verl/workers/rollout/sglang_rollout/utils.py function broadcast_pyobj (line 26) | def broadcast_pyobj( function get_named_tensor_buckets (line 71) | def get_named_tensor_buckets( FILE: verl_rl/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_rl/verl/workers/rollout/vllm_rollout/__init__.py function get_version (line 20) | def get_version(pkg): FILE: verl_rl/verl/workers/rollout/vllm_rollout/vllm_async_server.py function _get_model_runner_workers (line 42) | def _get_model_runner_workers(vllm_config, init_ray: bool = True): class ExternalRayDistributedExecutor (line 81) | class ExternalRayDistributedExecutor(Executor): method _init_executor (line 86) | def _init_executor(self) -> None: method collective_rpc (line 101) | def collective_rpc( method check_health (line 121) | def check_health(self): class ExternalZeroMQDistributedExecutor (line 125) | class ExternalZeroMQDistributedExecutor(Executor): method _init_executor (line 130) | def _init_executor(self) -> None: method collective_rpc (line 150) | def collective_rpc( method check_health (line 172) | def check_health(self): class AsyncvLLMServer (line 177) | class AsyncvLLMServer(AsyncServerBase): method __init__ (line 193) | def __init__(self, config: DictConfig, vllm_dp_size: int, vllm_dp_rank... method init_engine (line 209) | async def init_engine(self): method _create_engine_config (line 285) | def _create_engine_config(self, engine_args: AsyncEngineArgs): method chat_completion (line 299) | async def chat_completion(self, raw_request: Request): method generate (line 316) | async def generate(self, prompt_ids: list[int], sampling_params: dict[... method wake_up (line 330) | async def wake_up(self): method sleep (line 334) | async def sleep(self): FILE: verl_rl/verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py function _pre_process_inputs (line 68) | def _pre_process_inputs(pad_token_id, prompt_token_ids: torch.Tensor) ->... class vLLMRollout (line 77) | class vLLMRollout(BaseRollout): method __init__ (line 78) | def __init__(self, model_path: str, config: DictConfig, tokenizer, mod... method update_sampling_params (line 210) | def update_sampling_params(self, **kwargs): method generate_sequences (line 227) | def generate_sequences(self, prompts: DataProto, **kwargs) -> DataProto: function _monkey_patch_compute_logits (line 388) | def _monkey_patch_compute_logits(model, vocab_size: int): class vLLMAsyncRollout (line 403) | class vLLMAsyncRollout: method __init__ (line 408) | def __init__(self, model_path: str, config: DictConfig, tokenizer, mod... method _init_zeromq (line 418) | def _init_zeromq(self) -> str: method _get_free_port (line 442) | def _get_free_port(self): method _loop_forever (line 449) | def _loop_forever(self): method get_zeromq_address (line 456) | def get_zeromq_address(self): method init_worker (line 459) | def init_worker(self, all_kwargs: list[dict[str, Any]]): method load_model (line 468) | def load_model(self, *args, **kwargs): method sleep (line 477) | def sleep(self, *args, **kwargs): method wake_up (line 484) | def wake_up(self, *args, **kwargs): method execute_method (line 491) | def execute_method(self, method: str | bytes, *args, **kwargs): FILE: verl_rl/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_rl/verl/workers/sharding_manager/fsdp_sglang.py function _preprocess_tensor_for_update_weights (line 51) | def _preprocess_tensor_for_update_weights(tensor: torch.Tensor): class FSDPSGLangShardingManager (line 57) | class FSDPSGLangShardingManager(BaseShardingManager): method __init__ (line 59) | def __init__( method __enter__ (line 106) | def __enter__(self): method __exit__ (line 113) | def __exit__(self, exc_type, exc_value, traceback): method update_weights (line 117) | async def update_weights(self, params): method release_memory (line 178) | async def release_memory(self): method wake_up (line 183) | async def wake_up(self): method sleep (line 231) | async def sleep(self): method preprocess_data (line 247) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 258) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_rl/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_rl/verl/workers/sharding_manager/fsdp_vllm.py class FSDPVLLMShardingManager (line 55) | class FSDPVLLMShardingManager(BaseShardingManager): method __init__ (line 64) | def __init__( method __enter__ (line 127) | def __enter__(self): method __exit__ (line 238) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 253) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 265) | def postprocess_data(self, data: DataProto) -> DataProto: method update_params (line 272) | def update_params(self, updated_params, peft_config=None): FILE: verl_rl/verl/workers/sharding_manager/megatron_sglang.py class MegatronSGLangShardingManager (line 63) | class MegatronSGLangShardingManager(BaseShardingManager): method __init__ (line 85) | def __init__( method __enter__ (line 126) | def __enter__(self): method __exit__ (line 133) | def __exit__(self, exc_type, exc_value, traceback): method update_weights (line 137) | async def update_weights(self, params): method release_memory (line 209) | async def release_memory(self): method wake_up (line 214) | async def wake_up(self): method sleep (line 237) | async def sleep(self): method preprocess_data (line 254) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 262) | def postprocess_data(self, data: DataProto) -> DataProto: FILE: verl_rl/verl/workers/sharding_manager/megatron_vllm.py class MegatronVLLMShardingManager (line 57) | class MegatronVLLMShardingManager(BaseShardingManager): method __init__ (line 83) | def __init__( method __enter__ (line 143) | def __enter__(self): method __exit__ (line 189) | def __exit__(self, exc_type, exc_value, traceback): method preprocess_data (line 203) | def preprocess_data(self, data: DataProto) -> DataProto: method postprocess_data (line 215) | def postprocess_data(self, data: DataProto) -> DataProto: