MCPcopy Create free account

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

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

↓ 3 callersMethodembed_text
Embed a batch of tokens using the model
Megatron-LM/megatron/legacy/model/biencoder_model.py:136
↓ 3 callersMethodembed_text_dataset
Embed a text dataset.
Megatron-LM/tools/bert_embedding/embed.py:188
↓ 3 callersMethodencode
Encode text dataset, to be later added to index. Args: config (RetroPreprocessingConfig): Retro preprocessing config.
Megatron-LM/megatron/core/datasets/retro/index/indexes/faiss_par_add.py:111
↓ 3 callersMethodeos_id
Returns id of end of sentence token.
Megatron-LM/megatron/core/tokenizers/text/text_tokenizer.py:196
↓ 3 callersMethodevaluate
(self, response_text: str, next_state_text: str, next_state_role: str = "user",
openclaw-tinker/scorers.py:297
↓ 3 callersFunctionextract_boxed_answer
Extract the answer from inside a LaTeX \\boxed{} command
slime/slime/rollout/rm_hub/math_utils.py:417
↓ 3 callersFunctionextract_content
Extract text content from response, stripping <think> blocks.
openclaw-rl/oel/eval/gsm8k_personal_agent.py:171
↓ 3 callersFunctionextract_feature
(dataset, model, output_dir, idx_start, idx_end)
Megatron-LM/examples/post_training/modelopt/offline_feature_extract.py:32
↓ 3 callersFunctionextract_nonpersistent
Extract a dict consisting of only LocalNonpersistentObjects from a given state dict. Args: sharded_state_dict: state dict possibly contai
Megatron-LM/megatron/core/dist_checkpointing/utils.py:145
↓ 3 callersFunctionextract_sharded_base
Extract a dict consisting of only ShardedBase from a given state dict with any objects. Args: sharded_state_dict: state dict possibly con
Megatron-LM/megatron/core/dist_checkpointing/utils.py:129
↓ 3 callersFunctionextract_sharded_tensors_and_factories
Extract a dict consisting of only ShardedTensor and ShardedTensorFactory objects from a given state dict with any objects. Args: shar
Megatron-LM/megatron/core/dist_checkpointing/utils.py:86
↓ 3 callersMethodfake_initialize_model_parallel
Used for layer-wise UT as a proxy for NeMo-style intialization.
Megatron-LM/tests/unit_tests/test_utilities.py:121
↓ 3 callersFunctionfine_grained_offloading_reset
Reset the chunk handler, called at the start of a training iteration.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:573
↓ 3 callersFunctionflatten_state_dict
Recursively flattens a nested state dict into a single-level dict with keys
Megatron-LM/megatron/core/transformer/fsdp_dtensor_checkpoint.py:352
↓ 3 callersMethodflops
(self)
Megatron-LM/megatron/legacy/model/vision/swin_backbone.py:414
↓ 3 callersMethodforward
( self, worker_url: str, path: str, payload: dict[str, Any], timeout:
terminal-rl/router_server.py:145
↓ 3 callersMethodforward
forward pass
Megatron-LM/megatron/core/fusions/fused_softmax.py:168
↓ 3 callersMethodforward_model
Forward pass data, and gather parallel output tensors.
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:351
↓ 3 callersFunctionforward_step_func
Forward step function that computes model output and returns loss function. Args: data_iterator: Iterator providing training batches
Megatron-LM/examples/run_simple_mcore_train_loop.py:114
↓ 3 callersFunctionforward_torch_softmax
(input, mask, scale)
Megatron-LM/megatron/legacy/fused_kernels/tests/test_fused_kernels.py:287
↓ 3 callersFunctionfp8_get_raw_data
Get the underlying raw storage of a FP8 tensor.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/mixed_precision.py:225
↓ 3 callersFunctionfp8_set_raw_data
Set the raw data of a Transformer Engine Float8Tensor.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/mixed_precision.py:207
↓ 3 callersMethodfrom_config
Initialize context from a config.
Megatron-LM/megatron/core/inference/contexts/static_context.py:31
↓ 3 callersMethodfrom_config_dict
Loads recipe from dict configuration.
Megatron-LM/megatron/core/quantization/quant_config.py:180
↓ 3 callersMethodfrom_state_dict
Constructs a TensorAwareStateDict from a sharded state dictionary. This method preprocesses the input `sharded_state_dict`, validate
Megatron-LM/megatron/core/dist_checkpointing/tensor_aware_state_dict.py:101
↓ 3 callersFunctiongather_and_compute_chunk_metadata
Gather chunk metadata for a DTensor across all ranks and compute the offsets and sizes of each chunk. This is necessary for handling uneven
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/uneven_dtensor.py:31
↓ 3 callersFunctiongather_log_data
Gather per-rank metrics, reduce by mean on the DP source rank, and log. Expects `log_dict` to contain plain scalars. The DP source rank prin
slime/slime/backends/megatron_utils/data.py:207
↓ 3 callersMethodgen_multi_turn_loss_mask_qwen3
( self, messages: list[dict], tools: list[dict] = None )
slime/slime/utils/mask_utils.py:76
↓ 3 callersMethodgenerate
( self, *, messages: List[dict[str, Any]], tools: List[dict[str, Any]] | None,
terminal-rl/inference_client.py:211
↓ 3 callersFunctiongenerate_and_rm
( args: Namespace, sample: Sample | list[Sample], sampling_params: dict[str, Any], evaluation:
slime/slime/rollout/sglang_rollout.py:196
↓ 3 callersMethodget_A_log
Returns a slice of A_log relevant to the current context parallel rank
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:226
↓ 3 callersMethodget_accessibility_tree
Gets the accessibility tree from the server. None -> no accessibility tree or unexpected error.
gui-rl/desktop_env/controllers/python.py:70
↓ 3 callersFunctionget_all_rng_states
Returns all generator states used by the current `CudaRNGStatesTracker`.
Megatron-LM/megatron/core/tensor_parallel/random.py:356
↓ 3 callersFunctionget_bool_env_var
(name: str, default: str = "false")
slime/slime/utils/external_utils/command_utils.py:235
↓ 3 callersMethodget_buffer_length
(self)
slime/slime/rollout/data_source.py:210
↓ 3 callersFunctionget_checkpoint_version
()
Megatron-LM/megatron/training/checkpointing.py:78
↓ 3 callersFunctionget_client
Return (client, model_name) tuple compatible with OpenAI API. Args: model_name: Model to use. Falls back to OPENAI_MODEL env var, then "g
openclaw-rl/oel/eval/openai_api.py:17
↓ 3 callersMethodget_cos_sin
Cosine and sine values for RoPE are precomputed for all positions up to the maximum sequence length
Megatron-LM/megatron/core/models/common/embeddings/rotary_pos_embedding.py:142
↓ 3 callersMethodget_cudagraph_runner
Returns a valid cudagraph runner for the current forward call. For single mempool mode, we create a cudagraph for each call, if the module is
Megatron-LM/megatron/core/transformer/cuda_graphs.py:1159
↓ 3 callersFunctionget_data_parallel_group_if_dtensor
Gets the data parallel group of the given tensor if it is a DTensor.
Megatron-LM/megatron/core/utils.py:1033
↓ 3 callersFunctionget_data_parallel_rng_tracker_name
Get the data parallel rng tracker name
Megatron-LM/megatron/core/tensor_parallel/random.py:155
↓ 3 callersFunctionget_days_in_stage
Get the latest time when each review label was added.
Megatron-LM/tests/test_utils/python_scripts/auto_reminder.py:127
↓ 3 callersMethodget_db_dataset
(cls)
Megatron-LM/tools/retro/cli/cli.py:106
↓ 3 callersFunctionget_db_dir
Sub-directory for DB data. Args: project_dir (str): Path to Retro project dir. Returns: Path of the DB sub-directory within
Megatron-LM/megatron/core/datasets/retro/db/utils.py:26
↓ 3 callersMethodget_dt_bias
Returns a slice of dt_bias relevant to the current context parallel rank
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:222
↓ 3 callersMethodget_empty_index
Get empty index (i.e., trained, but unpopulated). Args: config (RetroPreprocessingConfig): Retro preprocessing config. R
Megatron-LM/megatron/core/datasets/retro/index/index.py:75
↓ 3 callersFunctionget_energy_monitor
Return energy monitor.
Megatron-LM/megatron/training/global_vars.py:67
↓ 3 callersFunctionget_expert_data_parallel_group
Get expert data parallel group.
Megatron-LM/megatron/core/parallel_state.py:1893
↓ 3 callersFunctionget_expert_model_parallel_rank
Return caller's rank in the expert-model-parallel group.
Megatron-LM/megatron/core/parallel_state.py:1797
↓ 3 callersFunctionget_expert_tensor_and_model_parallel_group
Get the expert-tensor and expert-model group the caller rank belongs to.
Megatron-LM/megatron/core/parallel_state.py:1858
↓ 3 callersFunctionget_fp4_recipe
Return fp4 recipe.
Megatron-LM/megatron/core/fp4_utils.py:84
↓ 3 callersFunctionget_gitlab_handle
Get GitLab handle with retry logic.
Megatron-LM/tests/test_utils/python_scripts/auto_reminder.py:75
↓ 3 callersFunctionget_gitlab_handle
()
Megatron-LM/tests/test_utils/python_scripts/wait_for_resources.py:23
↓ 3 callersFunctionget_gpt_data_dir
Get project-relative directory of GPT bin/idx datasets.
Megatron-LM/megatron/core/models/retro/utils.py:13
↓ 3 callersFunctionget_gpt_heterogeneous_layer_spec
Returns a list of ModuleSpec objects for the transformer layers in the heterogeneous model. Args: config (HeterogeneousTransformerCo
Megatron-LM/megatron/core/models/gpt/heterogeneous/heterogeneous_layer_specs.py:168
↓ 3 callersMethodget_grad_stats_parallel_group
Process group for reducing gradient statistics (num_zeros & norm). The two most common cases are: - Non-distributed optimizer (defaul
Megatron-LM/megatron/core/optimizer/optimizer.py:164
↓ 3 callersFunctionget_hf_model_type
Get the Huggingface model type.
Megatron-LM/megatron/core/models/huggingface/module.py:62
↓ 3 callersMethodget_index_of_chunked_prefill_request
Get the index of the chunked prefill request in the context. Return: (int) Index of the chunked prefill request, or -1 if none ex
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:1586
↓ 3 callersFunctionget_indexed_dataset_infos
Load indexed dataset meta-infos. Args: project_dir (str): Path to Retro project dir. Returns: List of metadata for each data
Megatron-LM/megatron/core/datasets/retro/db/utils.py:127
↓ 3 callersFunctionget_indexed_dataset_infos_path
Path to indexed dataset meta-infos. Args: project_dir (str): Path to Retro project dir. Returns: Path to the `indexed_datase
Megatron-LM/megatron/core/datasets/retro/db/utils.py:72
↓ 3 callersFunctionget_individual_db_paths
Get paths of all database blocks of an individual dataset. Args: project_dir (str): Path to Retro project dir. prefix (str): Uniq
Megatron-LM/megatron/core/datasets/retro/db/utils.py:161
↓ 3 callersFunctionget_jobs_per_bridge
(pipeline_id: int, type_of_job: str)
Megatron-LM/tests/test_utils/python_scripts/notify.py:25
↓ 3 callersFunctionget_key_per_thread
Choose key based on thread name. Returns None if no keys are available.
swe-rl/mini-swe-agent/src/minisweagent/models/utils/key_per_thread.py:11
↓ 3 callersMethodget_layer_offset
Get the layer offset in the pipeline stage
Megatron-LM/megatron/core/transformer/pipeline_parallel_layer_layout.py:170
↓ 3 callersFunctionget_linear_layer
Simple linear layer with weight initialization.
Megatron-LM/megatron/core/transformer/utils.py:23
↓ 3 callersFunctionget_lines_and_ids_from_file
(file_path)
gui-rl/desktop_env/evaluators/metrics/docs.py:1144
↓ 3 callersFunctionget_logprobs
Get sequence logprobs from their token ids. Args: model: model to predict with. tokens: inputs for which we want to get logprobs.
Megatron-LM/megatron/rl/rl_utils.py:704
↓ 3 callersMethodget_loss_mask
(self, messages: list[dict], tools: list[dict] = None)
slime/slime/utils/mask_utils.py:129
↓ 3 callersMethodget_loss_scale
FP32 optimizer does not do any scaling.
Megatron-LM/megatron/core/optimizer/optimizer.py:917
↓ 3 callersMethodget_mamba_block
(self, hybrid_override_pattern)
Megatron-LM/tests/unit_tests/ssm/test_mamba_block.py:29
↓ 3 callersFunctionget_merged_dataset
Get merged dataset. Args: project_dir (str): Path to Retro project dir. chunk_length (int): GPT chunk length (e.g., 64).
Megatron-LM/megatron/core/datasets/retro/db/utils.py:263
↓ 3 callersMethodget_meta
Get meta from key, which must be either 'src' or 'dst'.
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:154
↓ 3 callersMethodget_metadata
(self)
slime/slime/rollout/data_source.py:207
↓ 3 callersMethodget_new_request_id
Gets a new request id from the scheduler
Megatron-LM/megatron/core/inference/engines/static_engine.py:131
↓ 3 callersMethodget_num_layers_to_build
Get the number of layers to build in the pipeline stage
Megatron-LM/megatron/core/transformer/pipeline_parallel_layer_layout.py:152
↓ 3 callersFunctionget_object_path
Extract the full object path from a Griffe breaking change. Tries multiple sources to get the object path: 1. Direct path attributes (new
Megatron-LM/scripts/check_api_backwards_compatibility.py:158
↓ 3 callersFunctionget_param_id_to_sharded_param_map
Generate mapping from optimizer state ids to model sharded parameters. Args: model_sharded_state_dict: sharded state dict with all model
Megatron-LM/megatron/core/dist_checkpointing/optimizer.py:45
↓ 3 callersFunctionget_param_state_dp_zero
(optimizer)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_optimizer.py:194
↓ 3 callersFunctionget_pipeline_model_parallel_group
Get the pipeline-model-parallel group the caller rank belongs to.
Megatron-LM/megatron/core/parallel_state.py:1374
↓ 3 callersFunctionget_query_dir
Get root directory of all saved query data. Args: project_dir (str): Retro project dir. Returns: Path to query sub-directory
Megatron-LM/megatron/core/datasets/retro/query/utils.py:10
↓ 3 callersMethodget_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
Megatron-LM/megatron/core/transformer/multi_latent_attention.py:539
↓ 3 callersFunctionget_retro_config
()
Megatron-LM/pretrain_retro.py:33
↓ 3 callersMethodget_reward
Given the LLM response and the golden data, provide a reward.
Megatron-LM/megatron/rl/agent/reward_only_agent.py:48
↓ 3 callersMethodget_scores
Get attribute scores for a given text via Perspective API. :param input_text: the input text :param requested_attributes: the
Megatron-LM/examples/academic_paper_scripts/detxoify_lm/annotations/perspective_api_annotate.py:44
↓ 3 callersFunctionget_seqlen_balanced_partitions
get order of seq lengths to make partitions balanced, this is used in balacing sum of seqlength across dp ranks and microbatches Parameter
slime/slime/utils/seqlen_balancing.py:146
↓ 3 callersFunctionget_sharded_load_dir
Helper to retrieve the sharded load directory and its prefix, if any.
Megatron-LM/megatron/post_training/checkpointing.py:54
↓ 3 callersMethodget_stream_generator
Returns the stream generator for the given request ID if it exists.
Megatron-LM/megatron/core/inference/engines/static_engine.py:189
↓ 3 callersFunctionget_tensor_on_this_rank
(tensor)
Megatron-LM/tests/unit_tests/transformer/test_multi_latent_attention.py:1420
↓ 3 callersFunctionget_tensor_on_this_rank
(tensor)
Megatron-LM/tests/unit_tests/transformer/test_attention.py:617
↓ 3 callersFunctionget_tensor_on_this_rank
(tensor)
Megatron-LM/tests/unit_tests/ssm/test_gated_delta_net.py:261
↓ 3 callersFunctionget_time_offsets
Get example time offsets.
Megatron-LM/examples/inference/gpt/utils.py:204
↓ 3 callersFunctionget_training_data_block_dir
Get directory for of saved embedding blocks. Args: config (RetroPreprocessingConfig): Retro preprocessing config. Returns: P
Megatron-LM/megatron/core/datasets/retro/index/utils.py:66
↓ 3 callersFunctionget_training_data_merged_path
Get path to merged training embeddings. Args: config (RetroPreprocessingConfig): Retro preprocessing config. Returns: Path t
Megatron-LM/megatron/core/datasets/retro/index/utils.py:90
↓ 3 callersFunctionget_training_data_root_dir
Get root directory for embeddings (blocks and merged data). Args: config (RetroPreprocessingConfig): Retro preprocessing config. Ret
Megatron-LM/megatron/core/datasets/retro/index/utils.py:54
↓ 3 callersFunctionget_virtual_pipeline_model_parallel_world_size
Return the virtual pipeline-parallel world size.
Megatron-LM/megatron/core/parallel_state.py:1643
↓ 3 callersFunctionget_vmrun_type
()
gui-rl/desktop_env/providers/vmware/manager.py:198
↓ 3 callersFunctiongradient_reduce_preprocessing
Gradient reduce preprocessing for gradient averaging and gradient scaling.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:3635
↓ 3 callersMethodgrads_states_parallel_group_is_shared
Check if all optimizers share the same gradient statistics parallel group.
Megatron-LM/megatron/core/optimizer/optimizer.py:1254
↓ 3 callersFunctiongroup_by
Similar to itertools.groupby, but do not require iterable to be sorted
slime/slime/utils/misc.py:114
↓ 3 callersFunctionhandle_experts_in_state_dict
Rewrite expert keys in state dict. Args: state_dict: The state dictionary to process. num_experts: Total number of experts i
Megatron-LM/megatron/core/transformer/fsdp_dtensor_checkpoint.py:105
← previousnext →1,201–1,300 of 10,561, ranked by callers