Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/THU-KEG/LongTraceRL
/ functions
Functions
1,433 in github.com/THU-KEG/LongTraceRL
⨍
Functions
1,433
◇
Types & classes
146
↳
Endpoints
7
↓ 470 callers
Method
get
(cls, name: str)
slime/slime/utils/types.py:213
↓ 302 callers
Method
append
(self, item)
slime/slime_plugins/rollout_buffer/buffer.py:145
↓ 41 callers
Method
size
(self)
slime/slime/utils/reloadable_process_group.py:176
↓ 40 callers
Function
load_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 callers
Method
update
(self, attrs: dict[str, Any] | None)
slime/slime/utils/trace_utils.py:69
↓ 26 callers
Function
metrics_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 callers
Method
search
(self, query: str, num: int = None, return_score: bool = False)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:138
↓ 20 callers
Method
_fwd
(self, method, *args, **kwargs)
slime/slime/utils/reloadable_process_group.py:190
↓ 19 callers
Function
get_new_comm_function
Wrap communication functions with memory check.
slime/slime/utils/reloadable_process_group.py:60
↓ 19 callers
Function
reset_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 callers
Method
sleep
(self, tags)
slime/slime/ray/train_actor.py:102
↓ 16 callers
Method
load
(self, rollout_id=None)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:111
↓ 16 callers
Method
run
Runs the agent by sending a prompt to the LLM.
slime/examples/multi_agent/agent_system.py:84
↓ 15 callers
Function
_json_safe
(value: Any)
slime/tools/trace_timeline_viewer.py:90
↓ 15 callers
Function
_log_trace_error
(action: str, exc: Exception)
slime/slime/utils/trace_utils.py:112
↓ 14 callers
Method
add
(self, name, elapsed_time)
slime/slime/utils/timer.py:40
↓ 14 callers
Method
copy
(self, *, src_tag: str, dst_tag: str)
slime/slime/utils/tensor_backper.py:34
↓ 13 callers
Method
barrier
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:204
↓ 13 callers
Method
get
(self)
slime/slime_plugins/rollout_buffer/buffer.py:184
↓ 12 callers
Function
_round_float
(value: float | None)
slime/tools/trace_timeline_viewer.py:100
↓ 12 callers
Method
apply_chat_template
(self, messages, tools, **kwargs)
slime/slime/rollout/message_processor_hub/base_message_processor.py:8
↓ 12 callers
Function
get_gloo_group
Get the Gloo group for distributed communication.
slime/slime/utils/distributed_utils.py:28
↓ 12 callers
Method
log
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 callers
Method
open
(self)
slime/tests/ci/gpu_lock_exec.py:155
↓ 11 callers
Method
decode
(self, token_ids)
slime/tests/utils/test_loss_mask_type_qwen35.py:21
↓ 11 callers
Method
encode
(self, query_list: list[str], is_query=True)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:77
↓ 11 callers
Function
make_sample
(index: int, reward: float = 1.0)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:65
↓ 11 callers
Function
print_memory
(msg, clear_before_print: bool = False)
slime/slime/utils/memory_utils.py:41
↓ 11 callers
Method
resolve
Resolve per-group defaults from model-level then args-level values.
slime/slime/backends/sglang_utils/sglang_config.py:68
↓ 11 callers
Function
reward_adjustment
(samples, reward_weight)
slime/examples/multi_agent/agent_system.py:206
↓ 11 callers
Function
sum_of_sample_mean
(x: torch.Tensor)
slime/slime/backends/megatron_utils/cp_utils.py:67
↓ 10 callers
Method
close
(self)
slime/tests/ci/gpu_lock_exec.py:165
↓ 10 callers
Method
write
(self, data)
slime/slime_plugins/rollout_buffer/buffer.py:238
↓ 9 callers
Function
_byte_to_gb
(n: int)
slime/slime/utils/memory_utils.py:37
↓ 9 callers
Method
_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 callers
Function
all_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 callers
Method
broadcast
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:207
↓ 9 callers
Method
collect
(self)
slime/slime/rollout/filter_hub/base_types.py:33
↓ 9 callers
Method
gather
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:231
↓ 9 callers
Function
make_args
(**overrides)
slime/tests/plugin_contracts/test_plugin_path_loading_contracts.py:79
↓ 9 callers
Function
section
(text)
slime/tools/analyze_profile.py:42
↓ 8 callers
Method
_weight_name_mapping_attention
(self, name: str)
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:65
↓ 8 callers
Method
_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 callers
Function
clear_memory
(clear_host_memory: bool = False)
slime/slime/utils/memory_utils.py:11
↓ 8 callers
Function
exec_command
(cmd: str, capture_output: bool = False)
slime/slime/utils/misc.py:37
↓ 8 callers
Function
post
(url, payload, max_retries=60, headers=None)
slime/slime/utils/http_utils.py:275
↓ 8 callers
Function
slice_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 callers
Function
zero
(len: int)
slime/slime/backends/megatron_utils/cp_utils.py:142
↓ 7 callers
Method
apply_chat_template
( self, messages, tokenize=True, tools=None, add_generation_prompt=Fal
slime/tests/utils/test_loss_mask_type_qwen35.py:24
↓ 7 callers
Method
backup
(self, tag: str)
slime/slime/utils/tensor_backper.py:31
↓ 7 callers
Function
call_rollout_fn
(fn, *args, evaluation: bool, **kwargs)
slime/slime/rollout/base_types.py:19
↓ 7 callers
Function
get_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 callers
Method
get_loss_mask
(self, messages: list[dict], tools: list[dict] = None)
slime/slime/utils/mask_utils.py:216
↓ 7 callers
Method
load
(self, rollout_id=None)
slime/slime/ray/rollout.py:508
↓ 7 callers
Method
start
(self, name)
slime/slime/utils/timer.py:20
↓ 7 callers
Function
trace_span
( target: Sample | TraceHandle | list[Sample | TraceHandle], name: str, *, attrs: dict[str, An
slime/slime/utils/trace_utils.py:255
↓ 6 callers
Method
_build_base_config
(self, **kwargs)
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:89
↓ 6 callers
Method
async_train
Do one rollout training
slime/slime/ray/actor_group.py:111
↓ 6 callers
Function
batched_async_rm
( args, samples: list[Sample], **kwargs, )
slime/slime/rollout/rm_hub/__init__.py:133
↓ 6 callers
Method
clear
(self)
slime/slime/utils/routing_replay.py:38
↓ 6 callers
Function
configure_logger
(prefix: str = "")
slime/slime/utils/logging_utils.py:12
↓ 6 callers
Function
dict_add_prefix
(d: dict[str, Any], prefix: str)
slime/slime/utils/metric_utils.py:10
↓ 6 callers
Method
end
(self, name)
slime/slime/utils/timer.py:26
↓ 6 callers
Function
generate_and_rm
( args: Namespace, sample: Sample | list[Sample], sampling_params: dict[str, Any], evaluation:
slime/slime/rollout/sglang_rollout.py:240
↓ 6 callers
Function
get_contract_path
(key: str, default: str | None = None)
slime/tests/plugin_contracts/_shared.py:54
↓ 6 callers
Function
get_new_query_function
Wrap query functions (get_rank, get_world_size, etc.) without memory check.
slime/slime/utils/reloadable_process_group.py:50
↓ 6 callers
Method
get_reward_value
(self, args)
slime/slime/utils/types.py:150
↓ 6 callers
Method
get_text_from_loss_mask
(self, token_ids: list[int], loss_masks: list[int])
slime/slime/utils/mask_utils.py:258
↓ 6 callers
Function
load_bridge_module
()
slime/tests/test_qwen3_5_mtp_bridge_mapping.py:105
↓ 6 callers
Function
masked_mean
(x: torch.Tensor, loss_mask: torch.Tensor, expand: bool = False)
slime/examples/train_infer_mismatch_helper/mis.py:17
↓ 6 callers
Method
set
(self, key: str, value: Any)
slime/slime/utils/trace_utils.py:64
↓ 5 callers
Method
_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 callers
Method
_convert_mtp_param
Convert MTP layer parameters from MCore to HF format.
slime/slime_plugins/mbridge/mimo.py:58
↓ 5 callers
Method
_switch_model
(self, target_tag: str)
slime/slime/backends/megatron_utils/actor.py:262
↓ 5 callers
Function
convert_to_hf
(args, model_name, name, param, quantization_config=None)
slime/slime/backends/megatron_utils/megatron_to_hf/__init__.py:23
↓ 5 callers
Function
get_args
()
slime/tools/convert_hf_to_torch_dist.py:37
↓ 5 callers
Function
get_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 callers
Method
get_samples
Return num_samples samples
slime/slime/rollout/data_source.py:20
↓ 5 callers
Function
make_sample
(index: int, reward: float = 1.0)
slime/tests/plugin_contracts/test_plugin_rollout_contracts.py:37
↓ 5 callers
Method
offload
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 callers
Method
shuffle
(self, new_epoch_id)
slime/slime/utils/data.py:342
↓ 5 callers
Method
sleep
(self)
slime/slime/backends/megatron_utils/actor.py:165
↓ 5 callers
Function
timer
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 callers
Method
_fwd_query
Forward non-communication calls without memory check.
slime/slime/utils/reloadable_process_group.py:197
↓ 4 callers
Function
_normalize_text
(text: str)
slime/slime/rollout/rm_hub/gpqa.py:18
↓ 4 callers
Method
_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 callers
Function
async_rm
(args, sample: Sample, **kwargs)
slime/slime/rollout/rm_hub/__init__.py:72
↓ 4 callers
Function
compute_rollout_step
(args, rollout_id)
slime/slime/utils/metric_utils.py:120
↓ 4 callers
Function
encode_image_for_rollout_engine
Load an image from path, ensure RGB, encode as PNG base64 string.
slime/slime/utils/processing_utils.py:155
↓ 4 callers
Method
eval
(self, rollout_id)
slime/slime/ray/rollout.py:494
↓ 4 callers
Function
extract_answer
(passage: str)
slime/slime/rollout/rm_hub/math_utils.py:478
↓ 4 callers
Method
from_yaml
(path: str)
slime/slime/backends/sglang_utils/sglang_config.py:158
↓ 4 callers
Function
get_sum_of_sample_mean
Calculate correct sample mean for CP
slime/slime/backends/megatron_utils/cp_utils.py:53
↓ 4 callers
Function
header
(text)
slime/tools/analyze_profile.py:36
↓ 4 callers
Method
init
(self, args, role, with_ref=False, with_opd_teacher=False)
slime/slime/ray/train_actor.py:50
↓ 4 callers
Function
init_tracking
(args, primary: bool = True, **kwargs)
slime/slime/utils/logging_utils.py:27
↓ 4 callers
Function
install_paths
()
slime/tests/plugin_contracts/_shared.py:15
↓ 4 callers
Function
install_stubs
(*, with_sglang_router: bool = False, with_transformers: bool = False)
slime/tests/plugin_contracts/_shared.py:22
↓ 4 callers
Function
load_processor
(name_or_path: str, **kwargs)
slime/slime/utils/processing_utils.py:85
↓ 4 callers
Function
load_tokenizer
(name_or_path: str, **kwargs)
slime/slime/utils/processing_utils.py:18
next →
1–100 of 1,433, ranked by callers