Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Gen-Verse/OpenClaw-RL
/ functions
Functions
10,561 in github.com/Gen-Verse/OpenClaw-RL
⨍
Functions
10,561
◇
Types & classes
1,405
↳
Endpoints
144
↓ 1,939 callers
Method
append
(self, item)
slime/slime_plugins/rollout_buffer/buffer.py:145
↓ 1,519 callers
Method
get
(cls, name: str)
slime/slime/utils/types.py:205
↓ 573 callers
Method
items
Return generator over underlying items.
Megatron-LM/megatron/core/optimizer/optimizer.py:1069
↓ 462 callers
Method
split
(self, json_line)
Megatron-LM/tools/preprocess_data.py:82
↓ 445 callers
Method
format
(self, messages: list[LLMChatMessage], tools: list[dict] | None = None)
Megatron-LM/megatron/rl/inference/chat_templates.py:21
↓ 439 callers
Method
size
Get the size of the dtype/code in bytes Args: key (Union[int, Type[numpy.number]]): The dtype or code Raises:
Megatron-LM/megatron/core/datasets/indexed_dataset.py:86
↓ 400 callers
Method
pop
Remove and set the next non-empty chunk as the current backward chunk.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:92
↓ 382 callers
Method
initialize_model_parallel
( tensor_model_parallel_size=1, pipeline_model_parallel_size=1, virtual_pipeline_model
Megatron-LM/tests/unit_tests/test_utilities.py:98
↓ 342 callers
Method
destroy_model_parallel
()
Megatron-LM/tests/unit_tests/test_utilities.py:87
↓ 303 callers
Function
set
Set a key in the global config file.
swe-rl/mini-swe-agent/src/minisweagent/run/extra/config.py:85
↓ 296 callers
Function
print_rank_0
If distributed is initialized or rank is specified, print only on rank 0.
Megatron-LM/megatron/training/utils.py:393
↓ 272 callers
Function
get_args
Return arguments.
Megatron-LM/megatron/training/global_vars.py:27
↓ 201 callers
Method
exists
Return whether the IndexedDataset exists on disk at the prefix Args: path_prefix (str): The prefix to the index (.idx) and data (
Megatron-LM/megatron/core/datasets/indexed_dataset.py:812
↓ 194 callers
Method
barrier
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:184
↓ 187 callers
Method
get
Get an item from the queue with Python < 3.13 compatibility.
Megatron-LM/megatron/core/inference/utils.py:185
↓ 185 callers
Method
all
(cls)
slime/slime/utils/types.py:201
↓ 182 callers
Method
detach
(self, x)
Megatron-LM/tests/unit_tests/a2a_overlap/utils.py:41
↓ 169 callers
Method
sleep
(self, tags)
slime/slime/ray/train_actor.py:104
↓ 159 callers
Method
update
Updates internal state in grad scaler based on whether NaNs are seen in grads or not.
Megatron-LM/megatron/core/optimizer/grad_scaler.py:108
↓ 152 callers
Method
get
(self, key, model)
Megatron-LM/tools/checkpoint/schema_base.py:65
↓ 148 callers
Function
model_parallel_cuda_manual_seed
Initialize model parallel cuda seed. This function should be called after the model parallel is initialized. Also, no torch.cuda.manual_seed
Megatron-LM/megatron/core/tensor_parallel/random.py:378
↓ 140 callers
Method
raises
Return a list of information on the exceptions that the function may raise.
Megatron-LM/tools/retro/config_utils.py:181
↓ 126 callers
Method
is_initialized
Checks if the internal RNG state has been set wirth set_states().
Megatron-LM/megatron/core/tensor_parallel/random.py:183
↓ 120 callers
Method
backward
(ctx, g_logprobs: torch.Tensor)
Megatron-LM/tests/unit_tests/fusions/test_fused_linear_cross_entropy.py:635
↓ 115 callers
Method
write
Write timers to a tensorboard writer. Note that we only report maximum time across ranks to tensorboard. Args: names (Lis
Megatron-LM/megatron/core/timers.py:441
↓ 105 callers
Method
load
Load the sharded part of the checkpoint.
Megatron-LM/megatron/core/dist_checkpointing/strategies/base.py:139
↓ 104 callers
Method
execute_python_command
Executes a python command on the server. It can be used to execute the pyautogui commands, or... any other python command. who knows?
gui-rl/desktop_env/controllers/python.py:136
↓ 100 callers
Method
apply
(cls, *args, **kwargs)
Megatron-LM/megatron/core/fusions/fused_bias_gelu.py:51
↓ 100 callers
Method
copy
(self, *, src_tag: str, dst_tag: str)
slime/slime/utils/tensor_backper.py:34
↓ 100 callers
Method
from_rank_offsets
Allows to construct the ShardedTensor given offset specified in process ranks. Args: key (str): unique key data (torc
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:254
↓ 95 callers
Method
open
(self)
slime/tests/ci/gpu_lock_exec.py:155
↓ 88 callers
Method
broadcast
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:187
↓ 87 callers
Function
is_te_min_version
Check if minimum version of `transformer-engine` is installed.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:70
↓ 86 callers
Function
log_single_rank
If torch distributed is initialized, write log on only one rank Args: logger (logging.Logger): The logger to write the logs args
Megatron-LM/megatron/core/utils.py:750
↓ 85 callers
Function
build_module
Build a module from a ModuleSpec or return it as is if already provided.
Megatron-LM/megatron/core/transformer/spec_utils.py:65
↓ 84 callers
Method
post
Handles a POST request.
Megatron-LM/megatron/core/inference/text_generation_server/endpoints/completions.py:53
↓ 83 callers
Method
from_pretrained
Instantiate a PreTrainedBertModel from a pre-trained model file. Download and cache the pre-trained model file if needed.
Megatron-LM/megatron/training/tokenizer/gpt2_tokenization.py:98
↓ 83 callers
Method
rank
(self)
Megatron-LM/tools/checkpoint/utils.py:60
↓ 82 callers
Function
get_gpt_layer_with_transformer_engine_spec
Use this spec to use lower-level Transformer Engine modules (required for fp8 training). Args: num_experts (int, optional): Number of ex
Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:177
↓ 79 callers
Method
create_pg
r"""Create a process group based on a list of dimension names Note: The unique key used to store the process group internally will follow the
Megatron-LM/megatron/core/hyper_comm_grid.py:120
↓ 76 callers
Method
state_dict
(self)
Megatron-LM/tests/unit_tests/test_rl_utils.py:45
↓ 74 callers
Method
sharded_state_dict
(self)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_optimizer.py:53
↓ 72 callers
Method
search
(self, query: str, num: int = None, return_score: bool = False)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:138
↓ 71 callers
Method
gather
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:211
↓ 68 callers
Method
log
logs the timers passed in names to stdout. Example usage is to log average per step value for timer 'foo', this function can be called with
Megatron-LM/megatron/core/timers.py:411
↓ 67 callers
Method
load
Orchestrate the entire flow of loading the Megatron checkpoint.
Megatron-LM/tools/checkpoint/loader_base.py:394
↓ 67 callers
Method
wait
Wait for all gather operations to complete
Megatron-LM/megatron/core/transformer/dot_product_attention_context_parallel.py:126
↓ 64 callers
Method
detach
(t)
Megatron-LM/megatron/core/tensor_parallel/random.py:651
↓ 63 callers
Method
apply_chat_template
Convert a conversation to token IDs.
Megatron-LM/tests/unit_tests/test_tokenizer.py:214
↓ 61 callers
Method
put
Adds a new value to the stream
Megatron-LM/megatron/core/inference/async_stream.py:36
↓ 61 callers
Function
save
Saving entrypoint. Extracts ShardedTensors from the given state dict. Rank 0 saves the "regular" part of the checkpoint to common torch file.
Megatron-LM/megatron/core/dist_checkpointing/serialization.py:310
↓ 61 callers
Method
size
(self)
slime/slime/utils/reloadable_process_group.py:163
↓ 58 callers
Method
state_dict
( self, destination=None, prefix='', keep_vars=False )
Megatron-LM/megatron/core/transformer/module.py:465
↓ 57 callers
Function
is_te_min_version
Check if minimum version of `transformer-engine` is installed.
Megatron-LM/megatron/core/utils.py:342
↓ 56 callers
Method
decode
(self, token_ids: List[int])
terminal-rl/agent/camel_agent.py:232
↓ 56 callers
Method
load
(self, rollout_id=None)
slime/slime/ray/rollout.py:176
↓ 55 callers
Function
_set_arg
(arg_name, old_arg_name=None, force=False)
Megatron-LM/megatron/training/checkpointing.py:1309
↓ 54 callers
Function
get_tokenizer
Return tokenizer.
Megatron-LM/megatron/training/global_vars.py:33
↓ 54 callers
Method
run
(self, task: str, **kwargs)
swe-rl/mini-swe-agent/src/minisweagent/__init__.py:71
↓ 54 callers
Function
sum_of_sample_mean
Compute sum of per-sample means across variable-length responses. Parameters: x: Flat tensor containing concatenated per-token values acr
slime/slime/backends/fsdp_utils/actor.py:943
↓ 52 callers
Method
run
(self)
openclaw-tinker/trainer.py:264
↓ 52 callers
Method
start
Start the timer. Args: barrier (bool, optional): Synchronizes ranks before starting. Defaults to False.
Megatron-LM/megatron/core/timers.py:143
↓ 50 callers
Method
step
Clip gradients (if needed) and step the base optimizer. Always return successful since there is no overflow.
Megatron-LM/megatron/core/optimizer/optimizer.py:961
↓ 49 callers
Function
load
Loading entrypoint. In the steps below, the following verbs refer to corresponding objects: - load = load from checkpoint - extract = ext
Megatron-LM/megatron/core/dist_checkpointing/serialization.py:60
↓ 47 callers
Method
eval
(self, rollout_id)
slime/slime/ray/rollout.py:160
↓ 47 callers
Method
read
(self)
slime/slime_plugins/rollout_buffer/buffer.py:245
↓ 47 callers
Method
tokenize
(self, *text)
Megatron-LM/tools/preprocess_data.py:46
↓ 46 callers
Method
all_gather
All gather the input tensor to the output tensor
Megatron-LM/megatron/core/transformer/dot_product_attention_context_parallel.py:115
↓ 46 callers
Method
match
Match a layer based on its qualified name. If it does not match, return None. If it matches, return the configuration key to
Megatron-LM/megatron/core/quantization/quant_config.py:96
↓ 44 callers
Function
is_torch_min_version
Check if minimum version of `torch` is installed.
Megatron-LM/megatron/core/utils.py:361
↓ 44 callers
Function
log_retro_rank_0
Log on rank 0. Args: message (str): Message to log.
Megatron-LM/megatron/core/datasets/retro/utils.py:47
↓ 43 callers
Method
add_scalar
(self, name, value, iteration)
Megatron-LM/tests/unit_tests/transformer/test_multi_token_prediction.py:655
↓ 43 callers
Function
get_tensor_model_parallel_group_if_none
Issue a deprecation warning if tp_group is None and return the default tp group.
Megatron-LM/megatron/core/utils.py:500
↓ 43 callers
Function
save_checkpoint
Save a model, optimizer and optionally dataloader checkpoint. Checkpointing context is used to persist some checkpointing state throughout a
Megatron-LM/megatron/training/checkpointing.py:409
↓ 42 callers
Function
get_pg_rank
Get rank for a distributed group. Args: group: Process group to get rank for. If None, uses default group. Returns: int: Ran
Megatron-LM/megatron/core/utils.py:543
↓ 41 callers
Method
load_state_dict
(self, params)
Megatron-LM/tests/unit_tests/test_rl_utils.py:39
↓ 41 callers
Method
use_mpu_process_groups
Use the default process groups from parallel_state. Args: required_pgs (List[str], optional): List of process group name
Megatron-LM/megatron/core/process_groups_config.py:161
↓ 40 callers
Method
fork
Fork the cuda rng state, perform operations, and exit with the original state.
Megatron-LM/megatron/core/tensor_parallel/random.py:243
↓ 40 callers
Function
get_gpt_layer_local_spec
Use this spec for an implementation using only modules in Megatron-Core. Args: num_experts (int, optional): Number of experts. Defaults
Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:270
↓ 40 callers
Method
get_ranks
Get rank group by input token. Args: token (str): Specify the ranks type that want to get. If we want
Megatron-LM/megatron/core/parallel_state.py:501
↓ 40 callers
Function
load_checkpoint
Load a model checkpoint and return the iteration. strict (bool): whether to strictly enforce that the keys in :attr:`state_dict` of the ch
Megatron-LM/megatron/training/checkpointing.py:1404
↓ 39 callers
Function
unwrap_model
Unwrap_model to return the final model instance
Megatron-LM/megatron/core/utils.py:2231
↓ 38 callers
Method
start
Connects to the coordinator and starts the background listener task. This method must be awaited before submitting any requests. It
Megatron-LM/megatron/core/inference/inference_client.py:167
↓ 37 callers
Function
create_hypercomm_grid
Create a HyperCommGrid with tensor parallelism=2, context parallelism=2, and data parallelism=2.
Megatron-LM/tests/unit_tests/pipeline_parallel/test_bridge_communicator.py:111
↓ 37 callers
Method
record
Record a new sample.
Megatron-LM/megatron/core/rerun_state_machine.py:1110
↓ 37 callers
Function
setup_model_and_optimizer
( seed, tp, pp, initialize_fn=initialize_gpt_model, bf16=True, dist_opt=True, optimizer='adam' )
Megatron-LM/tests/unit_tests/dist_checkpointing/utils.py:163
↓ 37 callers
Method
stop
Stop the timer. Args: barrier (bool, optional): Synchronizes ranks before stopping. Defaults to False.
Megatron-LM/megatron/core/timers.py:156
↓ 36 callers
Method
clear
(self)
slime/slime/utils/routing_replay.py:38
↓ 36 callers
Method
collect
(self)
slime/slime/rollout/filter_hub/base_types.py:33
↓ 36 callers
Method
pause
Pause health checking. Called when engines are offloaded.
slime/slime/utils/health_monitor.py:85
↓ 35 callers
Method
exception
(self, *args, **kwargs)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_local.py:332
↓ 35 callers
Function
get_pg_size
Get world size for a distributed group. Args: group: Process group to get world size for. If None, uses default group. Returns:
Megatron-LM/megatron/core/utils.py:529
↓ 34 callers
Function
_broadcast
(item)
Megatron-LM/megatron/training/utils.py:522
↓ 34 callers
Method
convert
Convert model weights to trtllm model weights This method goes through each layer in the model state dict and converts to equivalent trtllm m
Megatron-LM/megatron/core/export/trtllm/trtllm_weights_converter/distributed_trtllm_model_weights_converter.py:236
↓ 34 callers
Method
run_test
Test fp8_param with gpt_model.
Megatron-LM/tests/unit_tests/test_fp8_param.py:312
↓ 33 callers
Method
build
Builds a ShardedStateDict from the original tensor
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:650
↓ 33 callers
Function
get_screen_text
Extract all text content from the app's UI.
swe-rl/mini-swe-agent/tests/agents/test_interactive_textual.py:13
↓ 32 callers
Method
stop
Stops the client and cleans up all resources. This method cancels the background listener task, closes the ZMQ socket, and t
Megatron-LM/megatron/core/inference/inference_client.py:241
↓ 31 callers
Function
debug_rank
Print debug message for a specific rank when DEBUG is enabled.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:16
↓ 31 callers
Function
is_approximately_equal
Compare two values with a tolerance of 0.1% (0.005)
gui-rl/desktop_env/evaluators/metrics/slides.py:206
next →
1–100 of 10,561, ranked by callers