MCPcopy Create free account

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

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

↓ 31 callersFunctionparse_args
Parse all arguments.
Megatron-LM/megatron/training/arguments.py:93
↓ 31 callersMethodread
Read bytes into a numpy array. Args: dtype (Type[numpy.number]): Data-type of the returned array. count (int): Numbe
Megatron-LM/megatron/core/datasets/indexed_dataset.py:356
↓ 30 callersFunctionget_blend_from_list
Get the blended_megatron_dataset_config.BlendedMegatronDatasetConfig blend from the blend list Args: blend (Optional[List[str]]): The
Megatron-LM/megatron/core/datasets/utils.py:49
↓ 30 callersFunctionis_pp_last_stage
Return True if in the last pipeline-model-parallel stage, False otherwise.
Megatron-LM/megatron/core/pipeline_parallel/utils.py:18
↓ 30 callersMethodis_static_batching
Return `True` if context uses static batching.
Megatron-LM/megatron/core/inference/contexts/base_context.py:22
↓ 30 callersMethodparse
Parse the Google-style docstring into its components. :returns: parsed docstring
Megatron-LM/tools/retro/config_utils.py:396
↓ 30 callersMethodremove
Remove a string and all nodes with this text as prefix from the trie. Args: text: String to remove (will also remove all
slime/slime/router/middleware_hub/radix_tree.py:353
↓ 29 callersFunctiondeprecate_inference_params
Print warning for deprecated `inference_params`.
Megatron-LM/megatron/core/utils.py:489
↓ 29 callersFunctiondiff
Recursive diff of dicts. Args: x1 (object): left dict x2 (object): right dict prefix (tuple): tracks recursive calls. Use
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:69
↓ 29 callersFunctionget_num_microbatches
Get number of microbatches.
Megatron-LM/megatron/core/num_microbatches_calculator.py:17
↓ 29 callersFunctionget_timers
Return timers.
Megatron-LM/megatron/training/global_vars.py:62
↓ 29 callersFunctionload_function
Load a function from a module. :param path: The path to the function, e.g. "module.submodule.function". :return: The function object.
slime/slime/utils/misc.py:9
↓ 29 callersMethodsave
Save the sharded part of the state dict.
Megatron-LM/megatron/core/dist_checkpointing/strategies/base.py:197
↓ 28 callersFunctiondivide
Ensure that numerator is divisible by the denominator and return the division value.
Megatron-LM/megatron/core/utils.py:482
↓ 28 callersFunctionpost
(url, payload, max_retries=60)
slime/slime/utils/http_utils.py:321
↓ 27 callersMethodbuild_group
Entrypoint method that adds the argument group to the parser. Args: parser: The parser to add arguments to title: Tit
Megatron-LM/megatron/training/argument_utils.py:190
↓ 27 callersMethodinsert
Insert a string and its corresponding token IDs, log probabilities, and loss mask into the trie. Args: text: String to in
slime/slime/router/middleware_hub/radix_tree.py:201
↓ 27 callersMethodis_current_rank_in_grid
Check if the current rank is in the grid.
Megatron-LM/megatron/core/pipeline_parallel/multimodule_communicator.py:150
↓ 27 callersFunctionis_pp_first_stage
Return True if in the first pipeline model-parallel stage, False otherwise.
Megatron-LM/megatron/core/pipeline_parallel/utils.py:13
↓ 27 callersFunctionnested_values
Returns iterator over (nested) values of a given dict or list.
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:166
↓ 27 callersMethodzero_grad
Copied from torch.optim.optimizer
Megatron-LM/megatron/core/optimizer/optimizer.py:910
↓ 26 callersFunctioncore_transformer_config_from_args
(args, config_class=None)
Megatron-LM/megatron/training/arguments.py:1337
↓ 26 callersFunctioncreate_group
Creates a ProcessGroup.
Megatron-LM/megatron/core/parallel_state.py:209
↓ 26 callersFunctionget_cuda_rng_tracker
Get cuda rng tracker.
Megatron-LM/megatron/core/tensor_parallel/random.py:346
↓ 26 callersFunctionmetrics_append
Every metrics-dict value is a list of 1D tensor, i.e., [torch.Tensor] with shapes exactly the same as log_probs. All metrics will be aggreg
slime/examples/train_infer_mismatch_helper/mis.py:42
↓ 26 callersFunctionnvtx_range
(msg, time=False)
Megatron-LM/megatron/training/utils.py:754
↓ 26 callersMethodstart
(self, name)
slime/slime/utils/timer.py:20
↓ 25 callersMethodadd
(self, generation_args: 'GenericGenerationArgs')
Megatron-LM/megatron/rl/__init__.py:68
↓ 25 callersMethodadd
(self, name, elapsed_time)
slime/slime/utils/timer.py:40
↓ 25 callersMethodget
Retrieve a single item from the dataset with the option to only return a portion of the item. get(idx) is the same as [idx] but get()
Megatron-LM/megatron/core/datasets/indexed_dataset.py:735
↓ 25 callersFunctionload_plain_tensors
Load checkpoint tensors without any sharding and plain structure. NOTE: common state dict is NOT included. Args: checkpoint_dir (str
Megatron-LM/megatron/core/dist_checkpointing/serialization.py:266
↓ 25 callersFunctionnvtx_range_pop
Pop NVTX range from stack. If msg is not provided, use the calling function's path. Args: msg (str, optional): Message to associate with
Megatron-LM/megatron/core/utils.py:2156
↓ 25 callersMethodsize
(self)
Megatron-LM/tests/unit_tests/fusions/test_mla_yarn_rope_apply.py:33
↓ 24 callersMethod_fwd
(self, method, *args, **kwargs)
slime/slime/utils/reloadable_process_group.py:177
↓ 24 callersFunctionget_new_function
(func)
slime/slime/utils/reloadable_process_group.py:50
↓ 24 callersMethodis_enabled
Check if the feature flag is enabled.
Megatron-LM/megatron/core/msc_utils.py:31
↓ 24 callersFunctionnvtx_range_push
Push NVTX range onto stack. If msg is not provided, use the calling function's path. Args: msg (str, optional): Message to associate with
Megatron-LM/megatron/core/utils.py:2134
↓ 24 callersMethodrun
Run step() until agent is finished. Return exit status & message
swe-rl/mini-swe-agent/src/minisweagent/agents/default.py:73
↓ 23 callersFunctionget_model
Build the model.
Megatron-LM/megatron/training/training.py:953
↓ 23 callersMethodimport_package
Import the package.
Megatron-LM/megatron/core/msc_utils.py:35
↓ 23 callersMethodis_decode_only
Functional access to `.decode_mode`, to match dynamic context.
Megatron-LM/megatron/core/inference/contexts/static_context.py:70
↓ 23 callersFunctionmake_sharded_tensors_for_checkpoint
Wraps tensors from transformer layers with ShardedTensor or ShardedObject. For a given `state_dict`, wraps: - all _extra_states with ShardedO
Megatron-LM/megatron/core/transformer/utils.py:75
↓ 23 callersMethodpad
Pad token ID.
Megatron-LM/megatron/training/tokenizer/sft_tokenizer.py:169
↓ 22 callersFunction_set_random_seed
Set random seed for reproducability.
Megatron-LM/megatron/training/initialize.py:405
↓ 22 callersFunctionget_nccl_options
Set the NCCL process group options. Args: pg_name (str): process group name nccl_comm_cfgs (dict): nccl communicator configuratio
Megatron-LM/megatron/core/parallel_state.py:145
↓ 22 callersFunctioninitialize_megatron
Set global variables, initialize distributed, and set autoresume and random seeds. `allow_no_cuda` should not be set unless using megatron for
Megatron-LM/megatron/training/initialize.py:38
↓ 22 callersMethodload_state_dict
Customized load.
Megatron-LM/megatron/legacy/model/t5_model.py:184
↓ 22 callersMethodpad
The PAD token id Raises: NotImplementedError: Non-abstract, optional attribute
Megatron-LM/megatron/core/datasets/megatron_tokenizer.py:120
↓ 22 callersMethodset
(self, state_dict, params)
Megatron-LM/tools/checkpoint/schema_hf.py:14
↓ 22 callersMethodstream
(self)
terminal-rl/agent/camel_agent.py:274
↓ 21 callersMethodclose
(self, lease_id: str)
gui-rl/env_client.py:98
↓ 21 callersMethodexecute
Execute a command in the local environment and return the result as a dict.
swe-rl/mini-swe-agent/src/minisweagent/environments/local.py:20
↓ 21 callersMethodload
(self, rollout_id=None)
gui-rl/gui_data_source.py:128
↓ 21 callersMethodload
(self, sharded_state_dict, ckpt_dir)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_fully_parallel.py:71
↓ 21 callersMethodrun
Run pipeline. Running a pipeline consists of: - Save checkpoint (includes initializing params & forward passing data). - Con
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:493
↓ 21 callersMethodsave
(self)
Megatron-LM/tools/checkpoint/saver_hf_llava.py:379
↓ 21 callersMethodselect
Generates the rewrited solution.
slime/examples/multi_agent/agent_system.py:136
↓ 21 callersFunctionset_args
(args)
Megatron-LM/megatron/training/global_vars.py:151
↓ 20 callersMethodcheckpoint
Checkpoint function.
Megatron-LM/megatron/core/tensor_parallel/random.py:616
↓ 20 callersMethodget
(self)
slime/slime_plugins/rollout_buffer/buffer.py:184
↓ 20 callersFunctionget_attr_wrapped_model
Get an attribute from a wrapped model. If return_model_obj is true, return the object that has the 'attr' attribute; otherwise, return the att
Megatron-LM/megatron/core/utils.py:557
↓ 20 callersFunctionget_checkpoint_name
Determine the directory name for this rank's checkpoint.
Megatron-LM/megatron/training/checkpointing.py:141
↓ 20 callersFunctionget_forward_backward_func
Retrieves the appropriate forward_backward function given the configuration of parallel_state. Returns a function that will perform all of th
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:45
↓ 20 callersFunctionget_fp8_context
Return fp8 context manager. Arguments: config (TransformerConfig): Configuration object. layer_no (int): *Global* lay
Megatron-LM/megatron/core/fp8_utils.py:595
↓ 20 callersFunctionget_model_chunk_id
Helper method to get the model chunk ID given the iteration number.
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:1099
↓ 20 callersFunctionis_float8tensor
Check if a tensor is a FP8 tensor.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/mixed_precision.py:157
↓ 20 callersFunctionis_layer_window_attention
( window_size: Optional[Tuple[int, int]], window_attn_skip_freq: int | list, layer_number: int )
Megatron-LM/megatron/core/transformer/utils.py:451
↓ 20 callersFunctionis_main_replica
Checks if given `replica_id` is considered as main. "Main" replica is: - integer 0 - or an iterable with all 0 elements It is the ap
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:501
↓ 20 callersFunctionreduce_from_tensor_model_parallel_region
Wrapper for autograd function: forward: all reduce, backward copy
Megatron-LM/megatron/core/tensor_parallel/mappings.py:475
↓ 20 callersMethodsize
Return the number of chunk handlers in the queue.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:110
↓ 19 callersFunction_safe_get_rank
Internal function that safely checks and returns the rank of the caller.
Megatron-LM/megatron/core/rerun_state_machine.py:1313
↓ 19 callersMethodencode
(self, json_line)
Megatron-LM/tools/preprocess_data.py:92
↓ 19 callersMethodget_file
Gets a file from the server.
gui-rl/desktop_env/controllers/python.py:114
↓ 19 callersFunctionget_gloo_group
Get the Gloo group for distributed communication.
slime/slime/utils/distributed_utils.py:28
↓ 19 callersFunctionget_megatron_optimizer
Retrieve the Megatron optimizer for model chunks. We use separate optimizers for expert parameters and non-expert parameters. Args:
Megatron-LM/megatron/core/optimizer/__init__.py:450
↓ 19 callersFunctionreset_arg
Reset the default value of a Megatron argument. :param parser: The argument parser. :param name: The name of the argument to reset. :
slime/slime/utils/arguments.py:19
↓ 18 callersMethod_get_dynamic_context
( self, params_dtype, num_layers, kv_channels, num_attention_heads,
Megatron-LM/tests/unit_tests/inference/contexts/test_dynamic_context.py:42
↓ 18 callersFunctionapply_rotary_pos_emb
Reroute to the appropriate apply_rotary_pos_emb function depending on fused/unfused kernels, or bshd (conventional) / thd (packed seq) format
Megatron-LM/megatron/core/models/common/embeddings/rope_utils.py:250
↓ 18 callersMethodclear
Clear the embedding data structures to save memory. The metadata ends up getting used, and is also much smaller in dimensiona
Megatron-LM/megatron/legacy/data/realm_index.py:43
↓ 18 callersMethodclose
(self)
gui-rl/desktop_env/desktop_env.py:238
↓ 18 callersMethodclose
Close the S3 client
Megatron-LM/megatron/core/datasets/object_storage_utils.py:65
↓ 18 callersFunctionget_gpt_decoder_block_spec
GPT block spec.
Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:743
↓ 18 callersFunctionget_transformer_layer_offset
Get the index offset of current pipeline stage, given the level of pipelining.
Megatron-LM/megatron/core/transformer/transformer_layer.py:38
↓ 18 callersFunctionload_tokenizer
(name_or_path: str, **kwargs)
slime/slime/utils/processing_utils.py:15
↓ 18 callersMethodread_metadata
Read metadata from file system, caching for subsequent calls. Returns: Metadata: Checkpoint metadata.
Megatron-LM/megatron/core/dist_checkpointing/strategies/cached_metadata_filesystem_reader.py:29
↓ 18 callersMethodsave
(self, sharded_state_dict, ckpt_dir)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_fully_parallel.py:59
↓ 18 callersFunctionto_local_if_dtensor
Convert a DTensor to a local tensor. Args: tensor (torch.Tensor): The tensor to convert. Returns: torch.Tensor: The local
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:3773
↓ 17 callersFunction_get_fwd_config
Helper function to lazy initialize the forward configuration.
Megatron-LM/megatron/core/fusions/linear_cross_entropy/blackwell/entry.py:54
↓ 17 callersMethodadd
Add vectors to index. Args: config (RetroPreprocessingConfig): Retro preprocessing config. text_dataset (GPTToTextDat
Megatron-LM/megatron/core/datasets/retro/index/index.py:126
↓ 17 callersMethodcleanup
(self)
swe-rl/mini-swe-agent/src/minisweagent/environments/extra/bubblewrap.py:103
↓ 17 callersMethodclear
Reset all stored tensors to None.
Megatron-LM/megatron/core/transformer/moe/moe_utils.py:1171
↓ 17 callersMethoddecode
Performs inference step for decoding.
Megatron-LM/megatron/core/ssm/mamba_mixer.py:563
↓ 17 callersMethodforward
(self, input_features)
Megatron-LM/tests/unit_tests/models/test_mimo_model.py:38
↓ 17 callersFunctionget_model_config
Returns the config attribute, allowed to return None
Megatron-LM/megatron/core/utils.py:598
↓ 17 callersMethodget_states
Get rng states. Copy the dictionary so we have direct pointers to the states, not just a pointer to the dictionary.
Megatron-LM/megatron/core/tensor_parallel/random.py:203
↓ 17 callersFunctionget_transformer_block_and_grid
Utility to build a ``TransformerBlock`` for tests.
Megatron-LM/tests/unit_tests/pipeline_parallel/test_bridge_communicator.py:149
↓ 17 callersFunctioninit_basic_mock_args
(args, tp, pp, bf16=True)
Megatron-LM/tests/unit_tests/dist_checkpointing/utils.py:105
↓ 17 callersMethodlog
Log data to tensorboard Args: data (dict): Dictionary containing metric names and values step (int): Current step/epo
slime/slime/utils/tensorboard_utils.py:49
↓ 17 callersMethodsend_forward
Send forward activation tensor. Args: output_dict: A dictionary mapping module names to tensors.
Megatron-LM/megatron/core/pipeline_parallel/multimodule_communicator.py:269
↓ 17 callersMethodshuffle
(self, new_epoch_id)
slime/slime/utils/data.py:239
← previousnext →101–200 of 10,561, ranked by callers