MCPcopy Create free account

hub / github.com/Gen-Verse/OpenClaw-RL / functions

Functions10,561 in github.com/Gen-Verse/OpenClaw-RL

↓ 2 callersMethodclip_grad_norm
Compute and return grad norm, also clip grads.
Megatron-LM/megatron/core/optimizer/optimizer.py:203
↓ 2 callersMethodclose
(self, lease_id: str)
terminal-rl/env_client.py:99
↓ 2 callersFunctioncoco_captioning_eval
Run COCO captioning evaluation.
Megatron-LM/examples/multimodal/evaluation/evaluate_coco.py:40
↓ 2 callersFunctioncollect_stream
(prompt, request_id, stream_generator)
Megatron-LM/tools/run_inference_performance_test.py:156
↓ 2 callersFunctioncombine
(input_files, module_prefixes, output_files)
Megatron-LM/examples/multimodal/combine_state_dicts.py:15
↓ 2 callersMethodcombine_postprocess
Performs local processing after token combine. This method handles post-communication tasks like unpermuting and reshaping to restore
Megatron-LM/megatron/core/transformer/moe/token_dispatcher.py:185
↓ 2 callersMethodcombine_preprocess
Prepares expert outputs for the combine step. This method performs local computations on expert outputs before the communication step
Megatron-LM/megatron/core/transformer/moe/token_dispatcher.py:150
↓ 2 callersFunctioncommon_test_simple_sharded_state_dict_save_load
Simple save and load sanity check, without any equality tests.
Megatron-LM/tests/unit_tests/dist_checkpointing/models/common.py:22
↓ 2 callersFunctioncommon_test_state_dict_comparison
(initialize_model_fn, tmp_path_dist_ckpt)
Megatron-LM/tests/unit_tests/dist_checkpointing/models/common.py:144
↓ 2 callersFunctioncommon_test_vocab_size_padding_change
Test model loading with different vocab size (caused by TP padding).
Megatron-LM/tests/unit_tests/dist_checkpointing/models/common.py:176
↓ 2 callersFunctioncompute_advantages_and_returns
Compute advantages and returns in-place based on `args.advantage_estimator`. This function extracts rewards, log-probs, values, and masks from
slime/slime/backends/megatron_utils/loss.py:549
↓ 2 callersFunctioncompute_gspo_kl
Compute GSPO-style per-sequence KL divergence. Args: full_log_probs: Current policy log-probs per sample (full or CP-local). full
slime/slime/utils/ppo_utils.py:95
↓ 2 callersFunctioncompute_log_probs
(logits: torch.Tensor, tokens: torch.Tensor, process_group: dist.ProcessGroup | None)
slime/slime/utils/ppo_utils.py:151
↓ 2 callersFunctioncompute_log_ratio
(raw_log_diff: torch.Tensor, mask: torch.Tensor, level: str)
slime/examples/train_infer_mismatch_helper/mis.py:192
↓ 2 callersFunctioncompute_metrics_from_samples
(args, samples)
slime/slime/ray/rollout.py:1233
↓ 2 callersFunctioncompute_mis_weights
Compute the importance sampling (IS) weights and metrics between the inference and training engine. Args: train_log_probs: List of lo
slime/examples/train_infer_mismatch_helper/mis.py:150
↓ 2 callersFunctioncompute_opsm_mask
Compute Off-Policy Sequence Masking (OPSM) mask. Args: args: Configuration containing `opsm_delta` threshold. full_log_probs: Cur
slime/slime/utils/ppo_utils.py:54
↓ 2 callersFunctioncompute_pass_rate
( flat_rewards: list[float], group_size: int, num_groups: int | None = None, )
slime/slime/utils/metric_utils.py:14
↓ 2 callersFunctioncompute_perf_metrics_from_samples
(args, samples, rollout_time)
slime/slime/ray/rollout.py:1245
↓ 2 callersFunctioncompute_statistics
(values: list[float])
slime/slime/utils/metric_utils.py:59
↓ 2 callersFunctioncondition
(model, attr)
Megatron-LM/megatron/core/utils.py:566
↓ 2 callersMethodconfigure
This method is called to configure the Singleton instance It should be called once per instantiation per process. Note:
Megatron-LM/megatron/core/utils.py:1372
↓ 2 callersFunctionconnect_rollout_engines_from_distributed
Create NCCL group: training rank 0 + all engine GPUs. Blocks until joined.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:244
↓ 2 callersMethodcontext
(self, name)
slime/slime/utils/timer.py:47
↓ 2 callersMethodconv1d_channels
Returns the number of convolution channels on the current context parallel rank
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:206
↓ 2 callersFunctionconversion_helper
Apply conversion to val. Recursively apply conversion if `val` #is a nested tuple/list structure.
Megatron-LM/megatron/legacy/model/module.py:127
↓ 2 callersFunctionconversion_helper
Recursively applies a conversion function to values in nested data structures. Args: val: A single value or a nested structure (tuple/lis
Megatron-LM/megatron/core/transformer/module.py:322
↓ 2 callersFunctionconvert
(arg)
slime/slime/utils/reloadable_process_group.py:92
↓ 2 callersFunctionconvert_qwen3_5_to_hf
(args, name, param)
slime/slime/backends/megatron_utils/megatron_to_hf/qwen3_5.py:150
↓ 2 callersFunctionconvert_qwen3_next_to_hf
Convert Qwen3 Next model parameters from Megatron to HuggingFace format.
slime/slime/backends/megatron_utils/megatron_to_hf/qwen3_next.py:44
↓ 2 callersFunctionconvert_split_vector_to_split_matrix
Build the split matrix from one or optionally two contributing split vectors. Ex. a standard conversion: [0.99, 0.01, 0.0] -> [(0, 0.99), (0
Megatron-LM/megatron/core/datasets/blended_megatron_dataset_config.py:154
↓ 2 callersFunctionconvert_to_mmmu_format
Convert input files to MMMU compatible format.
Megatron-LM/examples/multimodal/evaluation/evaluate_mmmu.py:54
↓ 2 callersMethodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
Megatron-LM/megatron/training/tokenizer/bert_tokenization.py:185
↓ 2 callersMethodcopy_main_weights_to_model_weights
Update the model weights from the main weights.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:2600
↓ 2 callersFunctioncopy_tensor_model_parallel_attributes
Copy model parallel attributes from one tensor to another.
Megatron-LM/megatron/core/tensor_parallel/layers.py:123
↓ 2 callersFunctioncopy_to_tensor_model_parallel_region
Wrapper for autograd function: forward: copy, backward allreduce
Megatron-LM/megatron/core/tensor_parallel/mappings.py:469
↓ 2 callersFunctioncopy_weights_to_tp_mlp
Copy weights from reference MLP to tensor-parallel MLP. Args: ref_mlp: Reference MLP with full weights (nn.Sequential) tp_mlp: Te
Megatron-LM/tests/unit_tests/transformer/test_transformer_block_custom_pgs.py:123
↓ 2 callersMethodcore_attention
Which module to use for attention
Megatron-LM/megatron/core/models/backends.py:169
↓ 2 callersFunctioncreateApi
(hooks: Record<string, Function>)
extensions/rl-training-headers/index.test.ts:60
↓ 2 callersMethodcreate_bwd_graph
Create a bwd cudagraph for this runner. Should be called inside 'create_cudagraphs()'.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:750
↓ 2 callersMethodcreate_global_plan
Merges MCore data for all plans.
Megatron-LM/megatron/core/dist_checkpointing/strategies/torch.py:539
↓ 2 callersFunctioncreate_hierarchical_groups
Create hierarchical groups for a set of ranks. Taking a group size of 16 as example, so we have a total of 16 GPUs denoted by g0 ... g15. If t
Megatron-LM/megatron/core/parallel_state.py:355
↓ 2 callersFunctioncreate_mock_smart_input_container
Create SmartInputContainer with proper mocking to avoid type issues.
swe-rl/mini-swe-agent/tests/agents/test_interactive_textual.py:545
↓ 2 callersFunctioncreate_sglang_client
( tokenizer: Any, client_template_kwargs: Dict[str, Any], max_total_tokens: int, sampling_para
terminal-rl/inference_client.py:119
↓ 2 callersFunctioncreate_test_args
(tp, grouped_gemm, swiglu, squared_relu, use_te)
Megatron-LM/tests/unit_tests/transformer/moe/test_upcycling.py:90
↓ 2 callersMethodcreate_tp_model_and_optimizer
Create model with TP and optimizer. Args: mode: Muon optimizer mode Returns: tuple: (model, optimizer, pg_co
Megatron-LM/tests/unit_tests/test_muon_optimizer.py:350
↓ 2 callersFunctioncreate_updated_function_signature
Given a function, create a new version of the function with extended keyword-only arguments or parameters. Used to patch or extend method
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:694
↓ 2 callersMethodcu_kv_lengths
Cumulative key/value sequence lengths.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:753
↓ 2 callersMethodcurrent_input_and_position_ids
Flattened input and position IDs for forward pass. Args: num_warmup_tokens (Optional[int]): Number of tokens to return for
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:1347
↓ 2 callersMethoddays_since
Calculate days since given date.
Megatron-LM/tests/test_utils/python_scripts/auto_reminder_github.py:129
↓ 2 callersMethoddecode_lease
(global_lease: str)
terminal-rl/router_server.py:78
↓ 2 callersMethoddecoder
(self)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:814
↓ 2 callersFunctiondecompose
This function solve the math problem below: There is an equation: index = sum(idx[i] * stride[i]) And
Megatron-LM/megatron/core/parallel_state.py:309
↓ 2 callersFunctiondelete_cuda_graphs
Delete all CUDA graphs.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:370
↓ 2 callersFunctiondequantize_fp8_tensor
Dequantize a fp8 tensor to a higher precision tensor.
Megatron-LM/megatron/core/fp8_utils.py:113
↓ 2 callersFunctiondestroy_device_mesh
(device_mesh)
Megatron-LM/tests/unit_tests/distributed/fsdp/test_mfsdp_fully_shard.py:39
↓ 2 callersFunctiondestroy_model_parallel
Set the groups to none.
Megatron-LM/megatron/core/parallel_state.py:2010
↓ 2 callersFunctiondetectCurrent
()
slime/docs/_static/js/lang-toggle.js:5
↓ 2 callersMethoddetokenize_generations
Detokenize the generated tokens. Args: tokens_gpu_tensor (torch.Tensor): Tensor containing the tokens lengths_gpu_ten
Megatron-LM/megatron/core/inference/text_generation_controllers/text_generation_controller.py:168
↓ 2 callersFunctiondict_list_map_outplace
Maps dicts and lists *out-of-place* with a given function.
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:210
↓ 2 callersFunctiondisconnect_rollout_engines_from_distributed
Destroy NCCL on training and engines.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:278
↓ 2 callersMethoddispatch_postprocess
Performs local processing after token dispatch communication. This method handles post-communication tasks like token reordering and
Megatron-LM/megatron/core/transformer/moe/token_dispatcher.py:128
↓ 2 callersMethoddispatch_preprocess
Prepares tokens for dispatch without inter-device communication. This method should handle all local computations like tensor rearrangement a
Megatron-LM/megatron/core/transformer/moe/token_dispatcher.py:88
↓ 2 callersMethoddispatcher_capacity_test
(self)
Megatron-LM/tests/unit_tests/transformer/moe/test_token_dispatcher.py:161
↓ 2 callersMethoddispatcher_router_padding_for_fp8_test
Test if the routing map is padded correctly for FP8 training. The test runs the forward flow twice: 1. First with moe_router_padding_
Megatron-LM/tests/unit_tests/transformer/moe/test_token_dispatcher.py:279
↓ 2 callersFunctiondistribute_main_replicas_with_precomputed_distribution
Applies the save distribution computed with `determine_main_replica_uniform_distribution`. Based on rank assignment, sets replica ids of the shar
Megatron-LM/megatron/core/dist_checkpointing/strategies/fully_parallel.py:408
↓ 2 callersFunctiondo_test_preprocess_data
(temp_dir, extra_args=[])
Megatron-LM/tests/unit_tests/data/test_preprocess_data.py:71
↓ 2 callersFunctiondownload_and_extract_asset
Download and extract an asset to the assets directory. Args: asset_url: URL to download the asset from asset_name: Name of t
Megatron-LM/tests/test_utils/python_scripts/download_unit_tests_dataset.py:32
↓ 2 callersMethoddownload_file
Download the file from S3 to the local file system
Megatron-LM/megatron/core/datasets/object_storage_utils.py:49
↓ 2 callersFunctiondraw_point
(image: Image.Image, point: list)
gui-rl/agents/utils/qwen_vl_utils.py:238
↓ 2 callersMethoddtype_from_code
Get the dtype from the code Args: value (int): The code Returns: Type[numpy.number]: The dtype
Megatron-LM/megatron/core/datasets/indexed_dataset.py:74
↓ 2 callersFunctiondtype_tols
(dtype)
Megatron-LM/tests/unit_tests/fusions/test_mla_yarn_rope_apply.py:21
↓ 2 callersFunctionedit
Edit the global config file.
swe-rl/mini-swe-agent/src/minisweagent/run/extra/config.py:106
↓ 2 callersMethodembed_text_dataset_block
Embed a range of a text dataset. Args: embedder (Embedder): Embedder used for embedding a text dataset. text_dataset
Megatron-LM/megatron/core/datasets/retro/index/index.py:135
↓ 2 callersMethodempty_from_unique_key
Instantiates a ShardedObject from a unique key. Args: unique_key: a string of the form <key>/shard_<global_offset
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:588
↓ 2 callersFunctionenable_forward_pre_hook
Enable forward pre-hooks for provided DDP-wrapped model chunks. Args: model_chunks (Sequence[DDP]): Sequence of DDP modules to enable hoo
slime/slime/backends/megatron_utils/model.py:129
↓ 2 callersMethodencode_any_single_turn_vqa
Encode MultiChoiceVQA or VQA sample.
Megatron-LM/examples/multimodal/dataset_helpers.py:581
↓ 2 callersMethodencode_block
Encode sub-dataset block, to be later added to index. Encode the data subset, generally in blocks of 1M vectors each. For each block,
Megatron-LM/megatron/core/datasets/retro/index/indexes/faiss_par_add.py:66
↓ 2 callersMethodencode_llava_sft
Encode SFT sample.
Megatron-LM/examples/multimodal/dataset_helpers.py:347
↓ 2 callersMethodend_document
Finalize the document, for use with IndexedDatasetBuilder.add_item
Megatron-LM/megatron/core/datasets/indexed_dataset.py:891
↓ 2 callersFunctionequal_
(a, b)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_replication.py:40
↓ 2 callersFunctionescape_str
(s)
Megatron-LM/examples/inference/gpt/gpt_dynamic_inference.py:509
↓ 2 callersMethodevaluate
(self, lease_id: str)
gui-rl/env_client.py:70
↓ 2 callersFunctionexchange_by_distribution
Exchange tensors loaded by different ranks using the specified exchange_algo. Args: loaded_tensors (Dict[_ShardId, torch.Tensor]): mappin
Megatron-LM/megatron/core/dist_checkpointing/exchange_utils.py:541
↓ 2 callersFunctionexecute
(mode: str = "")
slime/tests/test_qwen3_4B_ckpt.py:31
↓ 2 callersMethodexecute
Execute a command in the environment and return the raw output.
swe-rl/mini-swe-agent/src/minisweagent/environments/extra/swerex_docker.py:27
↓ 2 callersMethodexecute_action
Executes an action on the server computer.
gui-rl/desktop_env/controllers/python.py:241
↓ 2 callersFunctionexecute_train
( train_args: str, num_gpus_per_node: int, megatron_model_type: str | None, train_script: str
slime/slime/utils/external_utils/command_utils.py:93
↓ 2 callersFunctionexpand_pattern
(pattern)
Megatron-LM/tests/unit_tests/find_test_cases.py:33
↓ 2 callersFunctionextra_processing
Extra processing.
Megatron-LM/examples/multimodal/evaluation/evaluate_mathvista.py:36
↓ 2 callersFunctionextract_highlighted_text
(file_path)
gui-rl/desktop_env/evaluators/metrics/docs.py:1026
↓ 2 callersFunctionextract_images
(doc)
gui-rl/desktop_env/evaluators/metrics/docs.py:351
↓ 2 callersFunctionextract_images_from_pdf
(pdf_path)
gui-rl/desktop_env/evaluators/metrics/chrome.py:242
↓ 2 callersFunctionextract_text_from_pdf
(content)
gui-rl/desktop_env/evaluators/metrics/vscode.py:115
↓ 2 callersFunctionextract_text_from_pdf
Extract text from each page of the PDF.
gui-rl/desktop_env/evaluators/metrics/chrome.py:205
↓ 2 callersMethodfilter
(self, record: LogRecord)
Megatron-LM/megatron/training/log_handler.py:18
↓ 2 callersFunctionfilter_out_empty_flatten_tensor
Filter out ShardedTensors with empty flatten_range. These tensors can cause the PyTorch check in failure. Args: sharded_state_di
Megatron-LM/megatron/core/dist_checkpointing/state_dict_utils.py:96
↓ 2 callersFunctionfind_available_port
(base_port: int)
slime/slime/utils/http_utils.py:17
↓ 2 callersFunctionfind_checkpoint_rank_0
Finds the checkpoint for rank 0 without knowing if we are using pipeline parallelism/expert parallelism or not. Since the checkpoint naming s
Megatron-LM/megatron/training/checkpointing.py:205
↓ 2 callersFunctionfind_modules_with_attrs
(module)
Megatron-LM/megatron/core/transformer/utils.py:294
← previousnext →1,801–1,900 of 10,561, ranked by callers