MCPcopy Create free account

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

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

↓ 4 callersFunctionmake_args
(**overrides)
slime/tests/plugin_contracts/test_plugin_generate_contracts.py:41
↓ 4 callersFunctionmake_sample
(index: int, reward: float = 1.0)
slime/tests/plugin_contracts/test_plugin_runtime_hook_contracts.py:76
↓ 4 callersFunctionmasked_sum
(x: torch.Tensor, loss_mask: torch.Tensor, expand: bool = False)
slime/examples/train_infer_mismatch_helper/mis.py:12
↓ 4 callersFunctionnamed_params_and_buffers
( args: Namespace, model: Sequence[torch.nn.Module], convert_to_global_name: bool = True, tran
slime/slime/backends/megatron_utils/update_weight/common.py:116
↓ 4 callersFunctionnormalize_answer
(s)
slime/examples/search-r1/qa_em_format.py:21
↓ 4 callersMethodonload
Fire resume_memory_occupation on all engines (non-blocking). Returns a list of Ray ObjectRefs. Skipped for groups that do not overla
slime/slime/ray/rollout.py:188
↓ 4 callersFunctionparse_args
(add_custom_arguments=None)
slime/slime/utils/arguments.py:1488
↓ 4 callersFunctionpost_process_weights
Trigger post-process for int4/fp4 quantization on all rollout engines.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:340
↓ 4 callersMethodread
(self)
slime/slime_plugins/rollout_buffer/buffer.py:245
↓ 4 callersFunctionremove_padding
Remove vocab padding: param[:vocab_size] for embedding/output layers, else unchanged.
slime/slime/backends/megatron_utils/megatron_to_hf/processors/padding_remover.py:6
↓ 4 callersMethodrender_with_expected_mask
(self, messages, add_generation_prompt=False)
slime/tests/utils/test_loss_mask_type_qwen35.py:43
↓ 4 callersMethodreset
(self)
slime/examples/geo3k_vlm_multi_turn/env_geo3k.py:44
↓ 4 callersMethodreset
Reset internal offset to the start and return self.
slime/slime/backends/megatron_utils/data.py:284
↓ 4 callersFunctionrun
Run a coroutine in the background event loop.
slime/slime/utils/async_utils.py:34
↓ 4 callersMethodrun
(self, coro)
slime/slime/utils/async_utils.py:18
↓ 4 callersFunctionrun_contract_test_for_file
Parse ``--xxx-path`` CLI arguments, store as ``SLIME_CONTRACT_XXX_PATH`` env vars, then call pytest on *file*. Args: file: ``_
slime/tests/plugin_contracts/_shared.py:58
↓ 4 callersMethodsave
(self, rollout_id)
slime/slime/ray/rollout.py:505
↓ 4 callersFunctionsave_file
(i, tensors)
slime/tools/convert_torch_dist_to_hf_parallel.py:329
↓ 4 callersMethodsave_model
(self, rollout_id, force_sync=False)
slime/slime/ray/train_actor.py:114
↓ 4 callersFunctionshould_disable_forward_pre_hook
Block forward pre-hook for certain configurations.
slime/slime/backends/megatron_utils/model.py:488
↓ 4 callersFunctionshould_run_periodic_action
Return True when a periodic action (eval/save/checkpoint) should run. Args: rollout_id: The current rollout index (0-based).
slime/slime/utils/misc.py:73
↓ 4 callersFunctionslice_with_cp
( tokens: torch.Tensor, pad_value: tuple[int, float, Callable], qkv_format: str = "thd", max_s
slime/slime/backends/megatron_utils/cp_utils.py:175
↓ 4 callersMethodstart_engines
Create Ray actors, allocate ports, and fire ``engine.init()`` without waiting. Returns ``(init_handles, port_cursors)`` where *init_handles*
slime/slime/ray/rollout.py:70
↓ 4 callersMethodstep
(self, rollout_id: int)
slime/slime/utils/profile_utils.py:30
↓ 4 callersMethodupdate_weights
(self)
slime/slime/ray/train_actor.py:118
↓ 3 callersMethod__init__
(self, module=None, params=None)
slime/tests/test_qwen3_linear_attention_cu_seqlens.py:42
↓ 3 callersMethod__init__
(self)
slime/examples/multi_agent/agent_system.py:81
↓ 3 callersFunction_append_event
( handle: TraceHandle, *, kind: str, name: str, timestamp: float, attrs: dict[str, Any
slime/slime/utils/trace_utils.py:429
↓ 3 callersFunction_append_with_entropy
(lp: torch.Tensor, start: int, end: int)
slime/slime/backends/megatron_utils/loss.py:302
↓ 3 callersFunction_coerce_handles
(target: Sample | TraceHandle | list[Sample | TraceHandle])
slime/slime/utils/trace_utils.py:458
↓ 3 callersFunction_compact_text
(value: Any, max_len: int = 256)
slime/tools/trace_timeline_viewer.py:106
↓ 3 callersFunction_compute_hash_dict
(tensors: dict[str, torch.Tensor])
slime/slime/utils/tensor_backper.py:105
↓ 3 callersFunction_ensure_lock_files
(path_pattern: str, total_gpus: int)
slime/tests/ci/gpu_lock_exec.py:174
↓ 3 callersMethod_get_text_config
Get the text config, handling VLM nesting.
slime/slime_plugins/mbridge/qwen3_5.py:114
↓ 3 callersMethod_get_updatable_server
Return the server with ``update_weights=True``. When multiple updatable servers exist, returns the first one (multi-model weight upda
slime/slime/ray/rollout.py:445
↓ 3 callersFunction_init_wandb_common
()
slime/slime/utils/wandb_utils.py:195
↓ 3 callersFunction_is_offline_mode
Detect whether W&B should run in offline mode. Priority order: 1) args.wandb_mode if provided 2) WANDB_MODE environment variable
slime/slime/utils/wandb_utils.py:10
↓ 3 callersFunction_make_group
(group_cfg, router_ip, router_port, overrides_extra=None)
slime/slime/ray/rollout.py:1029
↓ 3 callersFunction_noop_handle
()
slime/slime/utils/trace_utils.py:98
↓ 3 callersFunction_normalize_trace_target
(value)
slime/slime/utils/trace_utils.py:571
↓ 3 callersFunction_quantize_param
(name, weight, weight_block_size)
slime/slime/backends/megatron_utils/megatron_to_hf/processors/quantizer_fp8.py:94
↓ 3 callersFunction_str_is_int
(x: str)
slime/slime/rollout/rm_hub/math_utils.py:219
↓ 3 callersMethod_sync_end_events
(self, attrs: dict[str, Any])
slime/slime/utils/trace_utils.py:90
↓ 3 callersMethod_update_bucket_weights_from_distributed
Lock → broadcast → clear → unlock → pbar++. Lock prevents NCCL deadlock.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:228
↓ 3 callersFunction_write_yaml
(data: dict)
slime/tests/utils/test_sglang_config.py:9
↓ 3 callersMethodadd_samples
Add samples to the data source
slime/slime/rollout/data_source.py:26
↓ 3 callersFunctionassert_rollout_function_matches_default_contract
(fn)
slime/tests/plugin_contracts/test_plugin_rollout_contracts.py:138
↓ 3 callersFunctionassert_sample_contract
(sample: Sample)
slime/tests/plugin_contracts/test_plugin_generate_contracts.py:90
↓ 3 callersFunctionbuild_sglang_meta_trace_attrs
(meta: dict[str, Any])
slime/slime/utils/trace_utils.py:124
↓ 3 callersFunctioncall_dynamic_filter
(fn, *args, **kwargs)
slime/slime/rollout/filter_hub/base_types.py:11
↓ 3 callersMethodcompute_log_prob
( self, data_iterator: list[DataIterator], num_microbatches: list[int], store_
slime/slime/backends/megatron_utils/actor.py:346
↓ 3 callersMethodconnect
(self, critic_group)
slime/slime/ray/actor_group.py:132
↓ 3 callersFunctioncontract_env_name
(key: str)
slime/tests/plugin_contracts/_shared.py:50
↓ 3 callersFunctionconvert_qwen2_to_hf
(args, name, param)
slime/slime/backends/megatron_utils/megatron_to_hf/qwen2.py:5
↓ 3 callersFunctiondestroy_process_groups
Destroy all reloadable process groups.
slime/slime/utils/reloadable_process_group.py:285
↓ 3 callersFunctiondisable_forward_pre_hook
Disable forward pre-hooks for provided DDP-wrapped model chunks. Args: model_chunks (Sequence[DDP]): Sequence of DDP modules to disable h
slime/slime/backends/megatron_utils/model.py:140
↓ 3 callersFunctionemit_result
(result: dict[str, Any], output_handle)
slime/tools/replay_openai_jsonl.py:303
↓ 3 callersFunctionextract_boxed_answer
Extract the answer from inside a LaTeX \\boxed{} command
slime/slime/rollout/rm_hub/math_utils.py:422
↓ 3 callersFunctionextract_delta_text
(delta: Any, key: str)
slime/tools/replay_openai_jsonl.py:150
↓ 3 callersMethodfinalize
(self, end_events: list[dict[str, Any]])
slime/slime/utils/trace_utils.py:84
↓ 3 callersFunctionfind_available_port
(base_port: int)
slime/slime/utils/http_utils.py:17
↓ 3 callersFunctionfinish_tracking
(args)
slime/slime/utils/logging_utils.py:38
↓ 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:179
↓ 3 callersMethodgen_multi_turn_loss_mask_qwen3
( self, messages: list[dict], tools: list[dict] = None )
slime/slime/utils/mask_utils.py:85
↓ 3 callersFunctionget_bool_env_var
(name: str, default: str = "false")
slime/slime/utils/external_utils/command_utils.py:226
↓ 3 callersMethodget_buffer_length
(self)
slime/slime/rollout/data_source.py:243
↓ 3 callersMethodget_queue_size
Get current output queue size
slime/examples/fully_async/fully_async_rollout.py:144
↓ 3 callersFunctiongroup_by
Similar to itertools.groupby, but do not require iterable to be sorted
slime/slime/utils/misc.py:114
↓ 3 callersFunctionload_docs
(corpus, doc_idxs)
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:38
↓ 3 callersMethodload_other_checkpoint
(self, model_tag: str, path: str)
slime/slime/backends/megatron_utils/actor.py:597
↓ 3 callersMethodlock
(self)
slime/tests/ci/gpu_lock_exec.py:161
↓ 3 callersFunctionnormalize_final_answer
Normalize a final answer to a quantitative reasoning question. Args: final_answer: The answer string to normalize Returns: N
slime/slime/rollout/rm_hub/math_dapo_utils.py:143
↓ 3 callersFunctionparent_span_name
(parent_span_id: str | None)
slime/tools/trace_timeline_viewer.py:387
↓ 3 callersFunctionpercentile
(values: list[float], ratio: float)
slime/tools/replay_openai_jsonl.py:248
↓ 3 callersFunctionprocess_vision_info
Extract PIL images (and videos) from the message list for training. Tries qwen_vl_utils first (Qwen VL family), falls back to generic extract
slime/slime/utils/processing_utils.py:133
↓ 3 callersMethodrecord
(self, result: dict[str, Any])
slime/tools/replay_openai_jsonl.py:28
↓ 3 callersFunctionreload_process_groups
Reload all reloadable process groups.
slime/slime/utils/reloadable_process_group.py:290
↓ 3 callersMethodreset
(self, name=None)
slime/slime/utils/timer.py:34
↓ 3 callersMethodstart
(self)
slime/slime/utils/profile_utils.py:96
↓ 3 callersFunctionstrip_param_name_prefix
(name: str)
slime/slime/backends/megatron_utils/misc_utils.py:1
↓ 3 callersMethodto_dict
(self)
slime/slime/utils/types.py:126
↓ 2 callersMethod__init__
(self, *args, **kwargs)
slime/tools/convert_torch_dist_to_hf_parallel.py:23
↓ 2 callersMethod__init__
( self, retrieval_method: str = "bm25", retrieval_topk: int = 10, index_path:
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:290
↓ 2 callersMethod__init__
(self, source_getter: _SourceGetter)
slime/slime/utils/tensor_backper.py:18
↓ 2 callersFunction_adapt_trace_target
(value)
slime/slime/utils/trace_utils.py:581
↓ 2 callersFunction_allgather_cp_redistribute
Redistribute response tensors from allgather-CP layout to zigzag ring-attn layout. After allgather context parallelism, each rank holds a contigu
slime/slime/backends/megatron_utils/loss.py:145
↓ 2 callersFunction_append_to_sample
( sample: Sample, response_tokens: list[int], tokens_to_add: list[int], logprobs: list[float],
slime/examples/geo3k_vlm_multi_turn/rollout.py:236
↓ 2 callersMethod_build_config
Build the configuration for Qwen2 models. Configures Qwen2-specific parameters such as QKV bias settings and layer normaliza
slime/slime_plugins/mbridge/glm4.py:45
↓ 2 callersFunction_common_args
Arguments shared by both phases.
slime/tests/test_qwen2.5_0.5B_debug_rollout_then_train.py:30
↓ 2 callersFunction_compute_fqn
(name, vp_stage=vp_stage)
slime/slime/backends/megatron_utils/update_weight/common.py:145
↓ 2 callersMethod_compute_mrope_position_ids
Compute 3D M-RoPE position IDs from input_ids in [bs, seq] format. Image regions are detected by looking for consecutive runs of ``im
slime/slime_plugins/megatron_bridge/glm4v_moe.py:276
↓ 2 callersFunction_create_torch_profiler
(args, name)
slime/slime/utils/profile_utils.py:60
↓ 2 callersFunction_ensure_trace_carrier
( carrier: dict[str, Any] | None, *, trace_id: str | None = None, sample_id: int | str | None
slime/slime/utils/trace_utils.py:130
↓ 2 callersFunction_gather_input_ids_from_cp
Reconstruct full (global) input_ids from zigzag CP chunks. With zigzag CP, each CP rank r holds chunks [r] and [2*cp_size-1-r] for each seque
slime/slime_plugins/megatron_bridge/glm4v_moe.py:59
↓ 2 callersFunction_generate_data_iterator
(rollout_data, micro_batch_size, micro_batch_indices=None)
slime/slime/backends/megatron_utils/data.py:332
↓ 2 callersFunction_get_current_parent_span_id
( trace_id: str, *, stack: tuple[tuple[str, str], ...] | None = None, )
slime/slime/utils/trace_utils.py:472
↓ 2 callersFunction_get_lock_path
(path_pattern: str, gpu_id: int)
slime/tests/ci/gpu_lock_exec.py:186
↓ 2 callersMethod_get_token_delta
Calculate token delta for multi-turn conversations. Tokenization logic adapted from: https://verl.readthedocs.io/en/v0.4.1/s
slime/examples/tau-bench/trainable_agents.py:334
↓ 2 callersMethod_get_valid_groups_with_timeout
Get valid groups including timeout-based groups
slime/slime_plugins/rollout_buffer/buffer.py:162
↓ 2 callersFunction_is_frac
(expr: str)
slime/slime/rollout/rm_hub/math_utils.py:215
← previousnext →101–200 of 1,433, ranked by callers