MCPcopy Create free account

hub / github.com/THU-KEG/LongTraceRL / functions

Functions1,433 in github.com/THU-KEG/LongTraceRL

↓ 470 callersMethodget
(cls, name: str)
slime/slime/utils/types.py:213
↓ 302 callersMethodappend
(self, item)
slime/slime_plugins/rollout_buffer/buffer.py:145
↓ 41 callersMethodsize
(self)
slime/slime/utils/reloadable_process_group.py:176
↓ 40 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
↓ 27 callersMethodupdate
(self, attrs: dict[str, Any] | None)
slime/slime/utils/trace_utils.py:69
↓ 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
↓ 24 callersMethodsearch
(self, query: str, num: int = None, return_score: bool = False)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:138
↓ 20 callersMethod_fwd
(self, method, *args, **kwargs)
slime/slime/utils/reloadable_process_group.py:190
↓ 19 callersFunctionget_new_comm_function
Wrap communication functions with memory check.
slime/slime/utils/reloadable_process_group.py:60
↓ 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:18
↓ 19 callersMethodsleep
(self, tags)
slime/slime/ray/train_actor.py:102
↓ 16 callersMethodload
(self, rollout_id=None)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:111
↓ 16 callersMethodrun
Runs the agent by sending a prompt to the LLM.
slime/examples/multi_agent/agent_system.py:84
↓ 15 callersFunction_json_safe
(value: Any)
slime/tools/trace_timeline_viewer.py:90
↓ 15 callersFunction_log_trace_error
(action: str, exc: Exception)
slime/slime/utils/trace_utils.py:112
↓ 14 callersMethodadd
(self, name, elapsed_time)
slime/slime/utils/timer.py:40
↓ 14 callersMethodcopy
(self, *, src_tag: str, dst_tag: str)
slime/slime/utils/tensor_backper.py:34
↓ 13 callersMethodbarrier
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:204
↓ 13 callersMethodget
(self)
slime/slime_plugins/rollout_buffer/buffer.py:184
↓ 12 callersFunction_round_float
(value: float | None)
slime/tools/trace_timeline_viewer.py:100
↓ 12 callersMethodapply_chat_template
(self, messages, tools, **kwargs)
slime/slime/rollout/message_processor_hub/base_message_processor.py:8
↓ 12 callersFunctionget_gloo_group
Get the Gloo group for distributed communication.
slime/slime/utils/distributed_utils.py:28
↓ 12 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
↓ 12 callersMethodopen
(self)
slime/tests/ci/gpu_lock_exec.py:155
↓ 11 callersMethoddecode
(self, token_ids)
slime/tests/utils/test_loss_mask_type_qwen35.py:21
↓ 11 callersMethodencode
(self, query_list: list[str], is_query=True)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:77
↓ 11 callersFunctionmake_sample
(index: int, reward: float = 1.0)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:65
↓ 11 callersFunctionprint_memory
(msg, clear_before_print: bool = False)
slime/slime/utils/memory_utils.py:41
↓ 11 callersMethodresolve
Resolve per-group defaults from model-level then args-level values.
slime/slime/backends/sglang_utils/sglang_config.py:68
↓ 11 callersFunctionreward_adjustment
(samples, reward_weight)
slime/examples/multi_agent/agent_system.py:206
↓ 11 callersFunctionsum_of_sample_mean
(x: torch.Tensor)
slime/slime/backends/megatron_utils/cp_utils.py:67
↓ 10 callersMethodclose
(self)
slime/tests/ci/gpu_lock_exec.py:165
↓ 10 callersMethodwrite
(self, data)
slime/slime_plugins/rollout_buffer/buffer.py:238
↓ 9 callersFunction_byte_to_gb
(n: int)
slime/slime/utils/memory_utils.py:37
↓ 9 callersMethod_make_request
Make a POST request to the specified endpoint with the given payload. Args: endpoint: The API endpoint to call payloa
slime/slime/backends/sglang_utils/sglang_engine.py:222
↓ 9 callersFunctionall_gather_with_cp
Gather tensors across all ranks in the context parallel group. The first dimension of the output tensor will be the `response_length`.
slime/slime/backends/megatron_utils/cp_utils.py:123
↓ 9 callersMethodbroadcast
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:207
↓ 9 callersMethodcollect
(self)
slime/slime/rollout/filter_hub/base_types.py:33
↓ 9 callersMethodgather
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:231
↓ 9 callersFunctionmake_args
(**overrides)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:79
↓ 9 callersFunctionsection
(text)
slime/tools/analyze_profile.py:42
↓ 8 callersMethod_weight_name_mapping_attention
(self, name: str)
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:65
↓ 8 callersMethod_weight_name_mapping_mlp
Override to handle expert bias names correctly. Base class extracts expert_id by splitting on 'weight', which fails for bias paramete
slime/slime_plugins/mbridge/gpt_oss.py:64
↓ 8 callersFunctionclear_memory
(clear_host_memory: bool = False)
slime/slime/utils/memory_utils.py:11
↓ 8 callersFunctionexec_command
(cmd: str, capture_output: bool = False)
slime/slime/utils/misc.py:37
↓ 8 callersFunctionpost
(url, payload, max_retries=60, headers=None)
slime/slime/utils/http_utils.py:275
↓ 8 callersFunctionslice_log_prob_with_cp
( log_prob: list[float] | torch.Tensor, total_length: int, response_length: int, qkv_format: s
slime/slime/backends/megatron_utils/cp_utils.py:219
↓ 8 callersFunctionzero
(len: int)
slime/slime/backends/megatron_utils/cp_utils.py:142
↓ 7 callersMethodapply_chat_template
( self, messages, tokenize=True, tools=None, add_generation_prompt=Fal
slime/tests/utils/test_loss_mask_type_qwen35.py:24
↓ 7 callersMethodbackup
(self, tag: str)
slime/slime/utils/tensor_backper.py:31
↓ 7 callersFunctioncall_rollout_fn
(fn, *args, evaluation: bool, **kwargs)
slime/slime/rollout/base_types.py:19
↓ 7 callersFunctionget_logits_and_tokens_offset_with_cp
All offsets start from the begining of the prompt.
slime/slime/backends/megatron_utils/cp_utils.py:9
↓ 7 callersMethodget_loss_mask
(self, messages: list[dict], tools: list[dict] = None)
slime/slime/utils/mask_utils.py:216
↓ 7 callersMethodload
(self, rollout_id=None)
slime/slime/ray/rollout.py:508
↓ 7 callersMethodstart
(self, name)
slime/slime/utils/timer.py:20
↓ 7 callersFunctiontrace_span
( target: Sample | TraceHandle | list[Sample | TraceHandle], name: str, *, attrs: dict[str, An
slime/slime/utils/trace_utils.py:255
↓ 6 callersMethod_build_base_config
(self, **kwargs)
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:89
↓ 6 callersMethodasync_train
Do one rollout training
slime/slime/ray/actor_group.py:111
↓ 6 callersFunctionbatched_async_rm
( args, samples: list[Sample], **kwargs, )
slime/slime/rollout/rm_hub/__init__.py:133
↓ 6 callersMethodclear
(self)
slime/slime/utils/routing_replay.py:38
↓ 6 callersFunctionconfigure_logger
(prefix: str = "")
slime/slime/utils/logging_utils.py:12
↓ 6 callersFunctiondict_add_prefix
(d: dict[str, Any], prefix: str)
slime/slime/utils/metric_utils.py:10
↓ 6 callersMethodend
(self, name)
slime/slime/utils/timer.py:26
↓ 6 callersFunctiongenerate_and_rm
( args: Namespace, sample: Sample | list[Sample], sampling_params: dict[str, Any], evaluation:
slime/slime/rollout/sglang_rollout.py:240
↓ 6 callersFunctionget_contract_path
(key: str, default: str | None = None)
slime/tests/plugin_contracts/_shared.py:54
↓ 6 callersFunctionget_new_query_function
Wrap query functions (get_rank, get_world_size, etc.) without memory check.
slime/slime/utils/reloadable_process_group.py:50
↓ 6 callersMethodget_reward_value
(self, args)
slime/slime/utils/types.py:150
↓ 6 callersMethodget_text_from_loss_mask
(self, token_ids: list[int], loss_masks: list[int])
slime/slime/utils/mask_utils.py:258
↓ 6 callersFunctionload_bridge_module
()
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:105
↓ 6 callersFunctionmasked_mean
(x: torch.Tensor, loss_mask: torch.Tensor, expand: bool = False)
slime/examples/train_infer_mismatch_helper/mis.py:17
↓ 6 callersMethodset
(self, key: str, value: Any)
slime/slime/utils/trace_utils.py:64
↓ 5 callersMethod_build_final_result
Build the final interaction result with all collected data. Args: res: InteractionResult instance to populate
slime/examples/tau-bench/trainable_agents.py:369
↓ 5 callersMethod_convert_mtp_param
Convert MTP layer parameters from MCore to HF format.
slime/slime_plugins/mbridge/mimo.py:58
↓ 5 callersMethod_switch_model
(self, target_tag: str)
slime/slime/backends/megatron_utils/actor.py:262
↓ 5 callersFunctionconvert_to_hf
(args, model_name, name, param, quantization_config=None)
slime/slime/backends/megatron_utils/megatron_to_hf/__init__.py:23
↓ 5 callersFunctionget_args
()
slime/tools/convert_hf_to_torch_dist.py:37
↓ 5 callersFunctionget_model_url
Return the router URL for a named model. Use this in custom rollout functions to route requests to a specific model when multiple models are
slime/slime/rollout/sglang_rollout.py:64
↓ 5 callersMethodget_samples
Return num_samples samples
slime/slime/rollout/data_source.py:20
↓ 5 callersFunctionmake_sample
(index: int, reward: float = 1.0)
slime/tests/plugin_contracts/test_plugin_rollout_contracts.py:37
↓ 5 callersMethodoffload
Fire release_memory_occupation on all engines (non-blocking). Returns a list of Ray ObjectRefs. Skipped for groups that do not overl
slime/slime/ray/rollout.py:178
↓ 5 callersMethodshuffle
(self, new_epoch_id)
slime/slime/utils/data.py:342
↓ 5 callersMethodsleep
(self)
slime/slime/backends/megatron_utils/actor.py:165
↓ 5 callersFunctiontimer
Can be used either as a decorator or a context manager: @timer def func(): ... or with timer("block_name"): ..
slime/slime/utils/timer.py:55
↓ 4 callersMethod_fwd_query
Forward non-communication calls without memory check.
slime/slime/utils/reloadable_process_group.py:197
↓ 4 callersFunction_normalize_text
(text: str)
slime/slime/rollout/rm_hub/gpqa.py:18
↓ 4 callersMethod_weight_name_mapping_mcore_to_hf
Map MCore weight names to Hugging Face weight names. Args: mcore_weights_name: MCore weight name Returns:
slime/slime_plugins/mbridge/glm4.py:83
↓ 4 callersFunctionasync_rm
(args, sample: Sample, **kwargs)
slime/slime/rollout/rm_hub/__init__.py:72
↓ 4 callersFunctioncompute_rollout_step
(args, rollout_id)
slime/slime/utils/metric_utils.py:120
↓ 4 callersFunctionencode_image_for_rollout_engine
Load an image from path, ensure RGB, encode as PNG base64 string.
slime/slime/utils/processing_utils.py:155
↓ 4 callersMethodeval
(self, rollout_id)
slime/slime/ray/rollout.py:494
↓ 4 callersFunctionextract_answer
(passage: str)
slime/slime/rollout/rm_hub/math_utils.py:478
↓ 4 callersMethodfrom_yaml
(path: str)
slime/slime/backends/sglang_utils/sglang_config.py:158
↓ 4 callersFunctionget_sum_of_sample_mean
Calculate correct sample mean for CP
slime/slime/backends/megatron_utils/cp_utils.py:53
↓ 4 callersFunctionheader
(text)
slime/tools/analyze_profile.py:36
↓ 4 callersMethodinit
(self, args, role, with_ref=False, with_opd_teacher=False)
slime/slime/ray/train_actor.py:50
↓ 4 callersFunctioninit_tracking
(args, primary: bool = True, **kwargs)
slime/slime/utils/logging_utils.py:27
↓ 4 callersFunctioninstall_paths
()
slime/tests/plugin_contracts/_shared.py:15
↓ 4 callersFunctioninstall_stubs
(*, with_sglang_router: bool = False, with_transformers: bool = False)
slime/tests/plugin_contracts/_shared.py:22
↓ 4 callersFunctionload_processor
(name_or_path: str, **kwargs)
slime/slime/utils/processing_utils.py:85
↓ 4 callersFunctionload_tokenizer
(name_or_path: str, **kwargs)
slime/slime/utils/processing_utils.py:18
next →1–100 of 1,433, ranked by callers