MCPcopy Create free account

hub / github.com/MakazhanAlpamys/Soup / functions

Functions20,206 in github.com/MakazhanAlpamys/Soup

↓ 10 callersFunctionvalidate_multipack_architecture
Raise ``ValueError`` if ``arch_name`` is not multipack-supported. Loud-fail policy (vs Axolotl's silent miss) — see module docstring.
src/soup_cli/utils/multipack_sampler.py:150
↓ 10 callersFunctionvalidate_population_size
(value: object)
src/soup_cli/utils/cmaes_merge.py:75
↓ 10 callersFunctionvalidate_prompt_optimizer
Return the canonical lowercase optimizer name. Rejects bool / non-string / empty / null-byte / >32-char / unknown. Mirrors v0.41.0 ``validate
src/soup_cli/utils/prompt_compile.py:73
↓ 10 callersFunctionvalidate_ra_dit_retriever_model
Validate the operator-supplied retriever-model HF repo id or local path. Bool / non-string rejected. ``None`` passes through unchanged so cal
src/soup_cli/utils/ra_dit.py:104
↓ 10 callersFunctionvalidate_suite_name
Validate a profile name. Returns canonical form.
src/soup_cli/utils/capability_suite.py:152
↓ 10 callersFunctionvalidate_tag
Raise ValueError if ``tag`` is invalid.
src/soup_cli/registry/store.py:133
↓ 10 callersFunctionvalidate_teacher_mix_ratio
Validate the teacher-mix sampling ratio. Range [0.0, 1.0]. 0.0 = student-only rollouts; 1.0 = teacher-only rollouts. Typical MiniLLM recipes
src/soup_cli/utils/minillm.py:81
↓ 10 callersFunctionvalidate_tts_family
Validate a TTS family name and return the canonical (lowercase) form.
src/soup_cli/utils/tts.py:98
↓ 10 callersFunctionverdict_to_evidence
Project a verdict into the ``--evidence`` INPUT schema (the inverse read). ``commands/ship.py`` reads pre-computed evidence as ``{"task": {"m
src/soup_cli/utils/ship_verdict.py:661
↓ 10 callersFunctionwatch
Run the daemon loop. Returns ``(final_state, iterations_run)``. Stops cleanly on: - ``config.max_iterations`` reached (test/finite mode)
src/soup_cli/utils/loop_daemon.py:232
↓ 10 callersFunctionwrite_lock
Atomically write an ``EnvLock`` to JSON under cwd containment.
src/soup_cli/utils/env_lock.py:257
↓ 10 callersFunctionwrite_pre_push_hook
Write the rendered hook to ``hook_path`` with cwd + TOCTOU guards. Returns the path written. Refuses to overwrite an existing file unless ``o
src/soup_cli/utils/eval_gate_hook.py:348
↓ 9 callersMethod_base
(self, **training)
tests/test_dpo_variants.py:26
↓ 9 callersFunction_build_app
(*, tokenizer=None, output=None, capture=None, **kwargs)
tests/test_issue332_vllm_prompt.py:220
↓ 9 callersFunction_build_can
Construct a minimal valid .can tarball at ``out_path``.
tests/test_part_a_wave2.py:33
↓ 9 callersFunction_build_generation_prompt
Build the prompt for data generation.
src/soup_cli/commands/generate.py:667
↓ 9 callersFunction_build_streamed_cpu
(tmp_path, n_layers=2)
tests/test_v07201.py:62
↓ 9 callersFunction_capture_activations
Capture residual-stream activations from the trained model (v0.71.8 #219). Loads the trained model at ``output_dir`` (or ``base`` + adapter when
src/soup_cli/commands/train.py:1739
↓ 9 callersMethod_cfg
(self, yaml_str=None)
tests/test_v07136.py:2783
↓ 9 callersMethod_cfg
(self, extra: str, *, mitigation: str = "kl_control")
tests/test_v07126.py:703
↓ 9 callersFunction_config_sha
(text: str)
tests/test_v07139.py:484
↓ 9 callersFunction_generate
Generate a response from the model. Returns (text, token_count).
src/soup_cli/commands/infer.py:714
↓ 9 callersFunction_generate_batch
Generate a batch of examples using the specified provider.
src/soup_cli/commands/generate.py:494
↓ 9 callersFunction_good_recipe
()
tests/test_v0450.py:784
↓ 9 callersMethod_guard
(self)
tests/test_v07115.py:472
↓ 9 callersFunction_make_callback
(tmp_path, **kwargs)
tests/test_part_e.py:228
↓ 9 callersFunction_make_fake_factory
Return a stand-in for live_eval.make_generator. Branches base vs tuned on the adapter (or a "tuned" model id). Each side answers task prompts
tests/test_v07125.py:645
↓ 9 callersFunction_make_jsonl
Create a JSONL file with count rows, optional category field.
tests/test_data_split.py:7
↓ 9 callersFunction_make_transform_module
Write a temporary Python module and return its importable name. Registers the module in ``sys.modules`` so ``importlib.import_module`` can fi
tests/test_build_dag.py:21
↓ 9 callersFunction_over_refusal
()
tests/test_v07302.py:76
↓ 9 callersMethod_patch_load
(self, monkeypatch, *, compatible=True)
tests/test_v07133.py:1568
↓ 9 callersFunction_prepare_calibration_text
Read JSONL ``{"text": "..."}`` rows and write a plain-text file. llama.cpp ``imatrix`` accepts a raw text file (one paragraph per line is fin
src/soup_cli/utils/gguf_quant.py:371
↓ 9 callersFunction_raft_row
(n_distractors: int = 2)
tests/test_v07117.py:44
↓ 9 callersFunction_response_matrix_rows
6 respondents r0..r5 (latent ability ascending) x several items. - ``const`` : everyone correct (carries ~no information). - ``split`` : co
tests/test_v0716.py:995
↓ 9 callersMethod_rng_tensor
(self, shape, seed)
tests/test_v07134.py:399
↓ 9 callersFunction_row
(step, loss)
tests/test_replay.py:19
↓ 9 callersFunction_row_uncertainty
Compute uncertainty for a single row. Priority: explicit ``uncertainty`` field > ``rm_scores`` list > ``rm_score`` scalar > 0.0.
src/soup_cli/utils/active_sampler.py:161
↓ 9 callersMethod_rows
(self)
tests/test_v0550.py:70
↓ 9 callersMethod_setup_transformers
Load model via standard transformers + peft pipeline.
src/soup_cli/trainer/dpo.py:232
↓ 9 callersMethod_state
(self)
tests/test_v07115.py:275
↓ 9 callersFunction_summarise_history_outcomes
Aggregate accepted-verdict outcomes per choice from prior history. Duck-typed (reads ``.choice`` / ``.accepted`` / ``.outcome`` / ``.project``
src/soup_cli/utils/advise.py:605
↓ 9 callersFunction_under_cwd
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/test_v0535.py:53
↓ 9 callersFunction_validate_vision_images
Validate and resolve image paths in vision dataset rows. Each row must have an 'image' key with a filename or path. Resolves relative paths a
src/soup_cli/data/loader.py:259
↓ 9 callersFunction_version_ok
Check if installed version meets minimum requirement.
src/soup_cli/commands/doctor.py:460
↓ 9 callersMethod_wrapper
(self, *, data_format, family="spark", emotion=None)
tests/test_v07120.py:186
↓ 9 callersFunction_write
(path: Path, text: str)
tests/test_v0690_part_a.py:17
↓ 9 callersMethod_write
(self, path, rows)
tests/test_v07136.py:2525
↓ 9 callersFunction_write_cfg
(tmp_path, name="soup.yaml", body="base: meta-llama/x\ntask: dpo\n")
tests/test_v0714.py:69
↓ 9 callersFunction_write_evidence
(path: Path, payload: dict)
tests/test_v07125.py:417
↓ 9 callersFunction_write_llama4_stub
Write a stub Llama-4-shaped checkpoint; return the tensor dict.
tests/test_v07121.py:1387
↓ 9 callersFunction_write_shard
(path: Path, tensors: dict)
tests/test_v07114.py:41
↓ 9 callersFunctionapply_sleeper_probe
Return per-token defection scores: ``activations @ probe_w``. Threshold is validated here so callers don't accidentally pass NaN.
src/soup_cli/utils/sleeper_probe.py:278
↓ 9 callersFunctionbang_bang_step
Advance the bang-bang controller one step given the multi-signal ``vote``. ``vote`` is the combined hacking signal in ``[0, 1]`` (see :func:`
src/soup_cli/utils/reward_hack_control.py:499
↓ 9 callersFunctionbuild_diff_report
Build a :class:`DiffReport`. When ``before_model`` AND ``after_model`` (model paths or HF ids) are both supplied alongside probes, the report
src/soup_cli/utils/edit_diff.py:162
↓ 9 callersFunctionbuild_minillm_callback
Build the live MiniLLM callback / loss helper (v0.71.11 #237). Lifts the v0.70.0 ``NotImplementedError`` stub. Validates the config type at t
src/soup_cli/utils/minillm.py:609
↓ 9 callersFunctionbuild_optimization_plan
Validate args and produce a frozen plan.
src/soup_cli/utils/data_mix.py:289
↓ 9 callersFunctionbuild_optimizer_param_groups
Map ``model.named_parameters()`` onto optimizer param groups. Each parameter is assigned to the *first* matching ``lr_groups`` entry (search
src/soup_cli/utils/lr_groups.py:183
↓ 9 callersFunctionbuild_report
Compose a FailureReport, filling missing modes with neutral stubs.
src/soup_cli/utils/diagnose/runner.py:41
↓ 9 callersFunctionbuild_repro_receipt
Build a reproducibility receipt from seeds + run_id + autodetected env. ``ReproReceipt.__post_init__`` performs the canonical seeds validation;
src/soup_cli/utils/repro_receipt.py:126
↓ 9 callersFunctionbuild_topic_report
Assemble the coverage table + gap warnings from cluster labels.
src/soup_cli/utils/topics.py:185
↓ 9 callersFunctionclassify_hack_signal
Map a relative drop in cluster-separation to OK / WARN / HACK. ``drop_pct`` is the *relative* drop: ``(baseline_signal - current_signal) / ba
src/soup_cli/utils/reward_hacking.py:227
↓ 9 callersFunctionclassify_norm_blowup
Classify a Frobenius norm delta as OK / WARN / BLOWUP. Bool-rejected, NaN/Inf-rejected, negative-rejected. Matches project bool-before-numeri
src/soup_cli/utils/edit_governor.py:115
↓ 9 callersFunctioncompute_adapter_diff
End-to-end: load both adapters, compute layer diffs, rank top-K.
src/soup_cli/utils/adapter_diff.py:257
↓ 9 callersFunctioncompute_adapter_manifest
Walk ``adapter_dir`` and return a deterministic manifest. Containment + symlink rejection on the adapter dir (TOCTOU defence, mirrors v0.53.1
src/soup_cli/utils/adapter_sign.py:219
↓ 9 callersFunctioncompute_cluster_separation
InfoRM-style cluster-separation index. Returns ``(mean_good - mean_bad) / sqrt(var_good + var_bad + eps)``. Larger = better-separated reward
src/soup_cli/utils/reward_hacking.py:159
↓ 9 callersFunctioncompute_env_hash
Deterministic 64-hex SHA-256 over a lock's *content* (v0.71.1 #224). Excludes ``created_at`` (and the on-disk ``schema_version``) so that re-
src/soup_cli/utils/env_lock.py:313
↓ 9 callersFunctioncompute_lr_schedule
Geometric (log-linear) LR sweep from ``start_lr`` to ``end_lr``.
src/soup_cli/utils/lr_finder.py:32
↓ 9 callersFunctioncopy_bundle_to
Copy bundle's JSONL into `output_path`. Containment-checked. Returns the absolute path written. Refuses to overwrite existing files (caller m
src/soup_cli/utils/demo_bundles.py:135
↓ 9 callersFunctiondecide_stream_fit
Compare predicted demand against measured free VRAM. Refusing rather than warning is deliberate. On Linux an over-budget step is a hard OOM.
src/soup_cli/utils/layer_stream.py:787
↓ 9 callersFunctiondetect_backend
Probe `model_path` and return a preferred backend identifier. Resolution order: 1. Env hint `SOUP_BENCH_BACKEND` (validated against allowli
src/soup_cli/utils/backend_detect.py:75
↓ 9 callersFunctiondetect_common_prefix_tokens
Token-level analogue of :func:`detect_common_prefix` (v0.71.5 #205). Returns the longest token-id prefix shared by >= ``min_frequency`` of ro
src/soup_cli/utils/prune_prompt.py:167
↓ 9 callersFunctiondiscover_documents
Enumerate document files under ``docs_dir`` (one level deep). Skips dotfiles, rejects symlinked directories, restricts to known text extensio
src/soup_cli/utils/data_forge.py:231
↓ 9 callersFunctioneffective_rank
Shannon entropy of normalised singular-value distribution (effective rank). Returns ``exp(H)`` where H is the entropy of the SV distribution
src/soup_cli/utils/adapter_diff.py:81
↓ 9 callersFunctionestimate_peak_vram_gb
Static analytical VRAM predictor. Returns a per-class breakdown.
src/soup_cli/utils/hardware_fit.py:252
↓ 9 callersFunctionestimate_stream_peak_vram
Predicted ``torch.cuda.max_memory_allocated()`` for a streaming step. Assembles the GATE 2 terms. Validated against 10 real runs across two model
src/soup_cli/utils/layer_stream.py:711
↓ 9 callersFunctionget_galore_optimizer_and_params
Build GaLore optimizer kwargs for HuggingFace Trainer. Returns dict of kwargs to pass to TrainingArguments. GaLore applies low-rank gradient
src/soup_cli/utils/galore.py:4
↓ 9 callersFunctionget_moe_target_modules
Get LoRA target modules for MoE models (ScatterMoE LoRA). Returns a list of module name patterns that includes both attention layers and expe
src/soup_cli/utils/moe.py:65
↓ 9 callersFunctionis_known_safe
Return True if ``model_name`` starts with a known-safe org prefix.
src/soup_cli/utils/trust_remote.py:52
↓ 9 callersFunctionlist_drafts
Every registered draft, newest first.
src/soup_cli/utils/draft.py:373
↓ 9 callersFunctionload_eval_examples
Load eval-suite examples (cwd-contained, symlink-safe, O_NOFOLLOW). Accepts a JSON array of objects, a single JSON object, or a JSONL file (o
src/soup_cli/utils/prompt_compile.py:248
↓ 9 callersFunctionload_evidence_file
Load operator-supplied evidence JSON. Containment + size cap + symlink rejection. Mirrors v0.56.0 ``commands/diagnose.py`` evidence loader.
src/soup_cli/utils/unlearning_eval.py:496
↓ 9 callersFunctionload_governor
Reconstruct an :class:`EditGovernor` for ``base_model`` from ``store``. Returns a fresh governor (edit_count=0) when no prior state exists. When
src/soup_cli/utils/edit_governor.py:569
↓ 9 callersFunctionload_jsonl_rows
Read a JSONL file under cwd; skip malformed lines silently.
src/soup_cli/utils/data_score.py:570
↓ 9 callersFunctionload_manifest
Read a canary manifest written by :func:`write_manifest`.
src/soup_cli/utils/canary.py:166
↓ 9 callersFunctionload_reward_fns
Load one OR MORE reward functions from a comma-separated spec (v0.71.40 #311). ``reward_fn`` may name several rewards, e.g. ``"accuracy,format"``
src/soup_cli/trainer/rewards.py:562
↓ 9 callersFunctionlookup_draft
Locally-trained draft for ``target``, or None. An entry whose directory no longer exists (the user moved or deleted the draft) is skipped — a
src/soup_cli/utils/draft.py:411
↓ 9 callersFunctionmake_grpo_trainer_variant
v0.53.11 #123 — build a ``_GRPOTrainerVariant`` subclass. Returns a subclass of ``trl.GRPOTrainer`` whose ``compute_loss`` routes through :fu
src/soup_cli/trainer/grpo.py:26
↓ 9 callersFunctionminillm_on_policy_rollout
True on-policy MiniLLM teacher-mixed rollout (v0.71.18 #257). Unlike :func:`minillm_distill_term` (which blends the teacher distribution into
src/soup_cli/utils/minillm.py:271
↓ 9 callersMethodon_log
Fallback probe — when no buffer is wired, use logged reward stats. info_rm only (rm_ensemble needs per-function rewards). Reads ``rew
src/soup_cli/utils/reward_hacking.py:564
↓ 9 callersFunctionparse_budget_string
Parse ``"50usd"`` / ``"100 USD"`` / ``"25"`` into a USD float. Trailing ``"usd"`` (case-insensitive) is optional. Bounds: ``[0, 1_000_000]``
src/soup_cli/utils/loop_budget.py:142
↓ 9 callersFunctionparse_mcp
Parse an MCP server manifest's ``tools`` array.
src/soup_cli/utils/agent_forge.py:211
↓ 9 callersFunctionpick_batch_size
Top-level batch picker. Honours strategy + cache + probe. Returns: Picked batch size (always >= 1). Falls back to ``static_estimate``
src/soup_cli/utils/batch_probe.py:225
↓ 9 callersFunctionprobe_batch_size
Try-halve-then-double loop. Returns the largest batch that ran OK. Strategy: 1. Try ``start``. If OOM, halve until either it fits or hits ``
src/soup_cli/utils/batch_probe.py:37
↓ 9 callersFunctionread_adapter_base
Read ``base_model_name_or_path`` from an adapter's ``adapter_config.json``. Returns ``None`` when the config is absent or the field is missing. T
src/soup_cli/utils/adapter_arithmetic.py:315
↓ 9 callersFunctionread_lock
Read a previously-written ``EnvLock`` JSON. Containment + symlink rejection BEFORE existence probe so a crafted path cannot distinguish "outs
src/soup_cli/utils/env_lock.py:274
↓ 9 callersMethodregister
Register a model with the base rating.
src/soup_cli/eval/arena.py:106
↓ 9 callersFunctionregister_tab
Register a tab. Idempotent for identical (title, render); rejects re-registration with a different title or render fn.
src/soup_cli/ui/plugins/__init__.py:52
↓ 9 callersFunctionresolve_baseline
Resolve a baseline specifier to a ``{task_name: score}`` map. - ``None`` / ``""``: return empty map - ``registry://<id>``: look up eval_resul
src/soup_cli/eval/gate.py:119
↓ 9 callersFunctionresolve_num_gpus
Resolve --gpus flag into concrete int. Accepts: - None: returns None (user did not pass --gpus) - int: returns the int -
src/soup_cli/utils/topology.py:71
↓ 9 callersFunctionresolve_suite
Resolve a profile name to the ordered tuple of CapabilityBenchmark.
src/soup_cli/utils/capability_suite.py:179
← previousnext →501–600 of 20,206, ranked by callers