MCPcopy Create free account

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

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

↓ 8 callersMethod_safe_create_task
(self, coro)
openclaw-tinker/api_server.py:465
↓ 8 callersFunction_test_domain_module_imports
(module, subdomains: list)
Megatron-LM/tests/unit_tests/test_imports.py:63
↓ 8 callersMethodadd_message
(self, role: str, content: str, **kwargs)
swe-rl/mini-swe-agent/src/minisweagent/agents/default.py:70
↓ 8 callersMethodallocate_memory_blocks
Allocate memory blocks if available, else return None. Args: num_blocks (int): Number of blocks to allocate. Return:
Megatron-LM/megatron/core/inference/contexts/dynamic_block_allocator.py:82
↓ 8 callersFunctionapp
(static_inference_engine)
Megatron-LM/tests/unit_tests/test_inference.py:49
↓ 8 callersFunctionbackward_step
Backward step through passed-in output tensor. If last stage, output_tensor_grad is None, otherwise gradient of loss with respect to stage's
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:440
↓ 8 callersFunctionbuild_tokenizer
Initialize tokenizer.
Megatron-LM/megatron/training/tokenizer/tokenizer.py:21
↓ 8 callersFunctioncompute_vqa_accuracy
Compute VQA accuracy.
Megatron-LM/examples/multimodal/evaluation/evaluate_vqav2.py:94
↓ 8 callersFunctionconfigure_logger
(prefix: str = "")
slime/slime/utils/logging_utils.py:12
↓ 8 callersFunctiondeterministic_mode
Context manager that sets up a deterministic environment for reproducible testing. This function: 1. Sets environment variables to ensur
Megatron-LM/tests/unit_tests/a2a_overlap/utils.py:60
↓ 8 callersMethoddetokenize
(self, inp, skip_special_tokens=False)
Megatron-LM/tests/unit_tests/inference/text_generation_controllers/test_simple_text_generation_controller.py:186
↓ 8 callersMethoddiscard_output_and_register_recompute
Release the output tensor storages and register the recompute function as a grad hook of the hook_tensor. Note: the caller s
Megatron-LM/megatron/core/tensor_parallel/random.py:680
↓ 8 callersFunctionexec_command
(cmd: str, capture_output: bool = False)
slime/slime/utils/misc.py:37
↓ 8 callersMethodfinish
Completes the stream by adding a sentinel value
Megatron-LM/megatron/core/inference/async_stream.py:41
↓ 8 callersMethodforward
Forward pass of RoPE embedding. Args: max_seq_len (int): Maximum size of sequence offset (int, optional): RoPE offset
Megatron-LM/megatron/core/models/common/embeddings/rotary_pos_embedding.py:179
↓ 8 callersFunctionforward_step
Forward step for passed-in model. If it is the first stage, the input tensor is obtained from the data_iterator. Otherwise, the passed-in inp
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:305
↓ 8 callersMethodforward_with_scores
Forward pass for DSA Indexer that returns both index scores and top-k indices. This is used when KL loss is enabled to compare index
Megatron-LM/megatron/core/transformer/experimental_attention_variant/dsa.py:518
↓ 8 callersFunctionget_batch_on_this_cp_rank
Slice batch input along sequence dimension into multiple chunks, which are parallelized across GPUs in a context parallel group. Args:
Megatron-LM/megatron/core/utils.py:1958
↓ 8 callersFunctionget_global_memory_buffer
Return the global GlobalMemoryBuffer object
Megatron-LM/megatron/core/parallel_state.py:1985
↓ 8 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
Megatron-LM/megatron/training/utils.py:330
↓ 8 callersFunctionget_megatron_muon_optimizer
This function is used to get the muon optimizer for the model chunks. It is used to get the muon optimizer for the model chunks. Args:
Megatron-LM/megatron/core/optimizer/muon.py:164
↓ 8 callersFunctionget_model_class
Select the best model class. If a model_class is provided (as shortcut name, or as full import path, e.g., "anthropic" or "minisweagent.model
swe-rl/mini-swe-agent/src/minisweagent/models/__init__.py:82
↓ 8 callersMethodget_query_key_value_tensors
This method needs to be implemented based on whether the derived class is "self-attn" or "cross-attn".
Megatron-LM/megatron/core/transformer/attention.py:505
↓ 8 callersFunctionget_responses
Yield response-aligned `(logits_chunk, tokens_chunk)` pairs per sample. After squeezing batch dimension and applying temperature scaling, this
slime/slime/backends/megatron_utils/loss.py:65
↓ 8 callersMethodinit_data
Allocate a buffer Tensor to persistently store the data for this (shard of) the buffer.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:894
↓ 8 callersFunctioninit_num_microbatches_calculator
Initialize number of microbatches calculator. Supporting backward compatibility. Args: rank (int): Rank of the GPU, only rank
Megatron-LM/megatron/core/num_microbatches_calculator.py:64
↓ 8 callersFunctioninitialize_expert_layer
(seed, glu=True, expert_type='sequential', fp8=False, **config_kwargs)
Megatron-LM/tests/unit_tests/dist_checkpointing/models/test_moe_experts.py:34
↓ 8 callersFunctionisfile
(filename)
Megatron-LM/megatron/training/checkpointing.py:123
↓ 8 callersFunctionjson_payload
Safely parse JSON body from a FastAPI request. Returns an empty dict if parsing fails or the payload is not a JSON object.
terminal-rl/request_utils.py:8
↓ 8 callersMethodlocal_chunk_offset_in_global
Offset of a local chunk in a global array of chunks. Returns: Tuple[int, ...]: the offset of the whole local chunk in a global ar
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:223
↓ 8 callersMethodmerge
Merge requests into a single suspend-agnostic request object. Args: tokenizer (MegatronTokenizer): The tokenizer. Return
Megatron-LM/megatron/core/inference/inference_request.py:456
↓ 8 callersMethodnew_router
Create a new router with updated configuration. Args: **kwargs: Configuration parameters to update in the default config.
Megatron-LM/tests/unit_tests/transformer/moe/test_aux_loss.py:200
↓ 8 callersFunctionprint_datetime
Note that this call will sync across all ranks.
Megatron-LM/megatron/training/training.py:161
↓ 8 callersMethodread
(self, path, byte_range)
Megatron-LM/tests/unit_tests/data/test_bin_reader.py:132
↓ 8 callersMethodrename_input_layer_names_to_trtllm_layer_names
Helper function to rename model layer names to TRTLLM Layer names We go through each layer (keys) in the model state dict, and map it
Megatron-LM/megatron/core/export/trtllm/trtllm_layers.py:80
↓ 8 callersFunctionreplace_prefix_for_sharding
Replaces the given prefix in *all* sharded keys in a given state dict. Errors out if some key does not begin with a given prefix. Args:
Megatron-LM/megatron/core/dist_checkpointing/utils.py:184
↓ 8 callersFunctionroll_tensor
Roll the tensor input along the sequence dimension with Context Parallelism (CP) support. This function extends the original roll_tensor to suppo
Megatron-LM/megatron/core/transformer/multi_token_prediction.py:130
↓ 8 callersMethodsave_pretrained
Saves HF tokenizer files. Args: path (str): path where to save tokenizer files.
Megatron-LM/megatron/core/tokenizers/text/text_tokenizer.py:115
↓ 8 callersMethodset_input_tensor
See megatron.legacy.model.transformer.set_input_tensor()
Megatron-LM/megatron/legacy/model/t5_model.py:112
↓ 8 callersFunctionsetup_moe_model_and_optimizer
( seed, tp, pp, ep, initialize_fn=initialize_moe_model, bf16=True, dist_opt=True,
Megatron-LM/tests/unit_tests/dist_checkpointing/utils.py:253
↓ 8 callersFunctionskip_if_mamba_sequence_packing_not_available
(model_provider: str)
Megatron-LM/tests/unit_tests/inference/engines/test_dynamic_engine.py:59
↓ 8 callersMethodstate_dict
(self)
slime/slime/backends/fsdp_utils/checkpoint.py:24
↓ 8 callersMethodstep
(self, rollout_id: int)
slime/slime/utils/profile_utils.py:30
↓ 8 callersFunctionstructure_check_by_ssim
Check if two images are approximately the same by SSIM
gui-rl/desktop_env/evaluators/metrics/gimp.py:232
↓ 8 callersMethodtrain
(self, mode=True)
Megatron-LM/tests/unit_tests/test_rl_utils.py:42
↓ 8 callersMethodupdate_requests
Update context state after calling engine.step(). This method is responsible for: - Update prefill requests to decode requests.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:1595
↓ 8 callersMethodusing_cuda_graph_this_step
Returns True if cuda graphs are being used for this step.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:738
↓ 8 callersMethodvalidate_metadata_integrity
Codifies the constraints on metadata attributes.
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:43
↓ 8 callersFunctionverify_checkpoint_and_load_strategy
Verifies if checkpoint metadata exists and matches given strategies. If no strategies are passed, they are determined based on the checkpoint met
Megatron-LM/megatron/core/dist_checkpointing/validation.py:206
↓ 8 callersFunctionzero
(len: int)
slime/slime/backends/megatron_utils/cp_utils.py:142
↓ 7 callersMethod__init__
( self, input_size: int, output_size: int, *, parallel_mode: Optional[
Megatron-LM/megatron/core/extensions/kitchen.py:192
↓ 7 callersMethod_add_to_trtllm_model_weights
(self, val: torch.Tensor, layer_name: str)
Megatron-LM/megatron/core/export/trtllm/trtllm_weights_converter/distributed_trtllm_model_weights_converter.py:82
↓ 7 callersMethod_build_b1ss_attention_mask
Build an attention-mask having shape (bs, 1, q_len, kv_len) from source_block and target_block Args: source_block (torch.
Megatron-LM/megatron/core/datasets/t5_dataset.py:96
↓ 7 callersMethod_build_state_dict
(self, random=False)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_flattened_resharding.py:163
↓ 7 callersFunction_coalescing_manager
(group, async_ops=False)
Megatron-LM/megatron/core/distributed/param_and_grad_buffer.py:33
↓ 7 callersMethod_complete_input
Internal method to complete the input process.
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:176
↓ 7 callersMethod_execute_command
(command: list)
gui-rl/desktop_env/providers/virtualbox/provider.py:18
↓ 7 callersMethod_get_base_state_dict
(self)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_serialization.py:837
↓ 7 callersMethod_get_total_seq_length
Calculate expected sequence length given text tokens length and number of tiles.
Megatron-LM/examples/multimodal/dataset_helpers.py:195
↓ 7 callersFunction_init_distributed
(world, rank)
Megatron-LM/tests/unit_tests/test_utils.py:116
↓ 7 callersFunction_load_base_checkpoint
Load the base state_dict from the given directory If rank0 is true, just loads rank 0 checkpoint, ignoring arguments.
Megatron-LM/megatron/training/checkpointing.py:1095
↓ 7 callersFunction_messages_to_steps
Group messages into "pages" as shown by the UI.
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:111
↓ 7 callersMethod_run_test
(cls, **test_config_kwargs)
Megatron-LM/tests/unit_tests/inference/test_data_parallel_inference_coordinator.py:186
↓ 7 callersMethod_send_signal_to_engines
Sends a generic control signal to the inference coordinator. Args: signal: The signal to send, typically a value from th
Megatron-LM/megatron/core/inference/inference_client.py:183
↓ 7 callersFunction_sharded_tensor_shard_id
Unique id of the sharded tensor data. Should yield the same value for same data replicated on different ranks. Args: sharded_tensor
Megatron-LM/megatron/core/dist_checkpointing/utils.py:37
↓ 7 callersMethod_touch_run_slot
(run_slot: RunSlot)
terminal-rl/remote/pool_server.py:112
↓ 7 callersMethodadd
Add a model call with its cost, checking limits.
swe-rl/mini-swe-agent/src/minisweagent/models/__init__.py:25
↓ 7 callersMethodadd_request
Submits a new inference request to the coordinator. This method sends the prompt and sampling parameters to the inference co
Megatron-LM/megatron/core/inference/inference_client.py:86
↓ 7 callersMethodalign_embeddings_by_token_positions
Align embeddings from different modalities based on special token positions in input_ids. Args: modality_embeddings: Dictionary m
Megatron-LM/megatron/core/models/mimo/model/base.py:66
↓ 7 callersFunctionall_to_all
Wrapper for autograd function
Megatron-LM/megatron/core/tensor_parallel/mappings.py:535
↓ 7 callersMethodbackup
(self, tag: str)
slime/slime/utils/tensor_backper.py:31
↓ 7 callersFunctioncall_openclaw_rl
Call the OpenClaw-RL training server (port 30000).
openclaw-rl/oel/eval/gsm8k_personal_agent.py:129
↓ 7 callersFunctioncheck_message
(msg)
Megatron-LM/tools/checkpoint/saver_legacy.py:62
↓ 7 callersMethodcheck_message
Check that a field exists on queue message if necessary.
Megatron-LM/tools/checkpoint/saver_base.py:200
↓ 7 callersFunctioncompare_captures
Compares two capture dictionaries to check if they contain the same values. Args: capture_ref: Reference capture dictionary.
Megatron-LM/tests/unit_tests/a2a_overlap/utils.py:126
↓ 7 callersFunctioncompute_approx_kl
Compute the approximate KL divergence between two distributions. Schulman blog: http://joschu.net/blog/kl-approx.html Args: log_
slime/slime/utils/ppo_utils.py:12
↓ 7 callersFunctioncompute_policy_loss
( ppo_kl: torch.Tensor, advantages: torch.Tensor, eps_clip: float, eps_clip_high: float, e
slime/slime/utils/ppo_utils.py:125
↓ 7 callersMethodconfig_attention_mask
Config attention-mask for encoder_mask, decoder_mask, encoder_decoder_mask conditioned on transformer-implementation (e.g. TE vs local), TE ve
Megatron-LM/megatron/core/datasets/t5_dataset.py:128
↓ 7 callersMethodconvert_tokens_to_ids
Convert tokens to IDs.
Megatron-LM/megatron/training/tokenizer/sft_tokenizer.py:151
↓ 7 callersFunctiondeallocate_output_tensor
Pseudo-deallocate (i.e., set to scalar) the output tensor's '.data' field. This method should be called right after the output tensor has been
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:148
↓ 7 callersFunctiondetermine_global_metadata
Exchanges local metadata with `all_gather_object` to determine global metadata. Args: sharded_state_dict (ShardedStateDict): local sharde
Megatron-LM/megatron/core/dist_checkpointing/validation.py:545
↓ 7 callersMethodexecute
(self, command: str, cwd: str = "")
swe-rl/mini-swe-agent/src/minisweagent/__init__.py:58
↓ 7 callersMethodfinalize
Clean up and write the index (.idx) file Args: idx_path (str): The path to the index file
Megatron-LM/megatron/core/datasets/indexed_dataset.py:921
↓ 7 callersFunctionfully_shard
Fully shard the model and the optimizer for Megatron-FSDP. Wraps the model as an Megatron-FSDP module, and modifies the optimizer to be
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/fully_shard.py:328
↓ 7 callersMethodfuse_layernorm_and_linear
Does the backend choose a single module for layernorm and linear
Megatron-LM/megatron/core/models/backends.py:96
↓ 7 callersFunctionget_blocks_by_rank
Divide existing and missing blocks evenly across all ranks. See 'get_blocks()' above for description. The returned lists of existing and miss
Megatron-LM/megatron/core/datasets/retro/utils.py:217
↓ 7 callersFunctionget_data_iterator
Create iterators and a micro-batch schedule for a rollout step. - If `use_dynamic_batch_size` is False, splits into fixed-size contiguous
slime/slime/backends/megatron_utils/data.py:318
↓ 7 callersFunctionget_default_load_sharded_strategy
Get default load sharded strategy.
Megatron-LM/megatron/core/dist_checkpointing/serialization.py:452
↓ 7 callersMethodget_fsdp_group
Get the FSDP process group.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:603
↓ 7 callersFunctionget_idx_path
Get the path to the index file from the prefix Args: path_prefix (str): The prefix Returns: str: The path to the index file
Megatron-LM/megatron/core/datasets/indexed_dataset.py:932
↓ 7 callersFunctionget_language_model
Build language model and return along with the key to save.
Megatron-LM/megatron/legacy/model/language_model.py:52
↓ 7 callersFunctionget_model_name
Get a model name from any kind of user input or settings.
swe-rl/mini-swe-agent/src/minisweagent/models/__init__.py:61
↓ 7 callersFunctionget_num_image_embeddings
Get the number of image embeddings per image tile.
Megatron-LM/megatron/core/models/vision/clip_vit_model.py:205
↓ 7 callersMethodget_parameters
Get list of parameters wrapped in optimizer.
Megatron-LM/megatron/core/optimizer/optimizer.py:125
↓ 7 callersMethodget_request
Get most recent request from a request record. Args: request_id (int): Request id. Returns: (DynamicInferenc
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:636
↓ 7 callersMethodget_reward_value
(self, args)
slime/slime/utils/types.py:142
↓ 7 callersMethodget_shard_from_local_buffer
Get the shard or virtual shard of the bucket stored in this buffer.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:1193
↓ 7 callersFunctionget_te_version
Get TE version from __version__; if not available use pip's. Use caching.
Megatron-LM/megatron/core/utils.py:314
↓ 7 callersMethodget_tensor
Returns (potentially) a sub-tensor from the self.buffer for the given shape.
Megatron-LM/megatron/core/utils.py:611
↓ 7 callersFunctionget_tensor_model_parallel_world_size
Return world size for the tensor-model-parallel group.
Megatron-LM/megatron/core/parallel_state.py:1537
← previousnext →401–500 of 10,561, ranked by callers