Skip to content

Scale CLI

The silva-scale command lists all canonical families, audits guide coverage, and prints one family's data contract, references, benchmark route, scale controls, extension points, data sources, access conditions, storage plan, ordered source-scale steps, and scalable constructor defaults.

Commands

silva-scale --list
silva-scale silva_fno_deq --tier workstation
silva-scale pideq --tier full --json
silva-scale --audit

The command reports configurations; it does not download data or launch a benchmark. Use its canonical name and defaults with build_scaled_silva, then provide the task-specific dimensions, modules, schedules, and constraints.

Operational Contract

This API surface connects coverage, reproduction, data, and scale configuration to the same SILVA experiment contract used by the learning pages and notebooks. Its central relation is

\[ F_\theta(z;x)=0,\qquad \widehat F_{\theta,s}(z;x)=0\ \text{uses the same mathematical contract at scale tier }s \]
Part What must remain inspectable
State the selected family, constructor contract, runtime tier, and data-loader configuration.
Condition changing a runtime tier may change numerical budgets and resource use but must not silently change the family equation.
Diagnostic coverage record, verification level, solver settings, effective batch size, and source-scale metrics.
Replacement point compact defaults with family-specific modules, official data adapters, and an archived experiment configuration.
Scale axes solver iterations, tolerance, model width, batch size, precision, workers, process count, and checkpoint interval.

The relevant method lineage is recorded in the SILVA construction [1] and the selected family's primary references. Those references define the source mechanisms; this API exposes them through SILVA objects so a reader can inspect, replace, solve, differentiate, and scale the construction.

Complete Compact Study

Run the complete repository program below from the project root. The page uses the same file that is exercised by the test suite, so the displayed call is not an isolated fragment.

"""Inspect one family from public API coverage through executable scale defaults."""

from __future__ import annotations

from silva_networks import (
    SILVADataLoaderConfig,
    implementation_cases,
    runtime_for_tier,
    silva_family_guide,
    silva_reproduction_spec,
    silva_scaling_defaults,
)

family = "fno_deq"
case = next(item for item in implementation_cases() if item.key == "recent_equilibrium_families")
guide = silva_family_guide(family)
reproduction = silva_reproduction_spec(family)
defaults = silva_scaling_defaults(family, tier="smoke")
runtime = runtime_for_tier("smoke")
loader = SILVADataLoaderConfig(batch_size=4, workers=0)

print("family", family)
print("public objects", len(case.public_objects))
print("verification", reproduction.verification_level)
print("benchmark tasks", len(guide.benchmark_tasks))
print("solver", defaults["config"].solver)
print("max iterations", defaults["config"].max_iter)
print("runtime", runtime.device, runtime.mixed_precision)
print("loader", loader.batch_size, loader.workers)
python examples/api_scale_workflow.py

Measured Compact Output

family fno_deq
public objects 12
verification compact-verified
benchmark tasks 2
solver anderson
max iterations 12
runtime auto none
loader 4 0

Interpret the Output

The family resolves through four independent registries: public coverage, source relation, scale guidance, and runtime/data configuration. The compact-verified label describes repository evidence; it does not convert the two listed benchmark tasks into claimed benchmark results.

For a controlled experiment, retain the compact call as a regression case and change one scale axis at a time. Record the resolved constructor, data source and split, preprocessing, seed, forward and backward solver settings, task metric, normalized residual, iteration count, runtime, peak memory, and any failed convergence case. A larger run becomes evidence only when its own resolved configuration and outputs are archived; the compact output above is evidence for the executable mechanism and its stated invariants.

Command-line access to executable SILVA family scale-up guidance.

main

main(argv=None)

Run the silva-scale command.

Source code in src/silva_networks/scale_cli.py
def main(argv: list[str] | None = None) -> int:
    """Run the ``silva-scale`` command."""

    args = _parser().parse_args(argv)
    if args.audit:
        errors = (*audit_silva_family_guides(), *audit_silva_reproduction_specs())
        if args.json:
            print(json.dumps({"errors": list(errors)}, indent=2))
        elif errors:
            print("\n".join(errors))
        else:
            print("All canonical SILVA families have complete scale-up and reproduction guidance.")
        return int(bool(errors))

    if args.list or args.family is None:
        guides = all_silva_family_guides()
        if args.json:
            print(json.dumps([asdict(guide) for guide in guides], indent=2))
        else:
            for guide in guides:
                print(f"{guide.family}: {guide.role}")
        return 0

    guide = silva_family_guide(args.family)
    payload = {
        "guide": asdict(guide),
        "reproduction": _serializable(silva_reproduction_spec(guide.family)),
        "constructor_signature": silva_reproduction_spec(guide.family).constructor_signature,
        "constructor_defaults": _serializable(silva_scaling_defaults(guide.family, tier=args.tier)),
    }
    if args.json:
        print(json.dumps(payload, indent=2))
    else:
        print(f"Family: {guide.family}")
        print(f"Role: {guide.role}")
        print(f"Data: {guide.data_contract}")
        print(f"References: {', '.join(f'[{ref}]' for ref in guide.paper_refs)}")
        print(f"Benchmarks: {', '.join(guide.benchmark_tasks)}")
        print(f"Scale controls: {', '.join(guide.scale_controls)}")
        print(f"Extension points: {', '.join(guide.extension_points)}")
        reproduction = silva_reproduction_spec(guide.family)
        print(f"Source relation: {reproduction.source_relation}")
        print(f"Equation: {reproduction.equation}")
        print(f"Datasets: {', '.join(reproduction.datasets)}")
        print(f"Data sources: {', '.join(reproduction.data_sources)}")
        print("Data access:")
        for item in reproduction.data_access:
            print(f"  - {item}")
        print("Storage plan:")
        for item in reproduction.storage_plan:
            print(f"  - {item}")
        print("Source-scale steps:")
        for index, item in enumerate(reproduction.source_scale_steps, start=1):
            print(f"  {index}. {item}")
        print(f"Metrics: {', '.join(reproduction.metrics)}")
        print(f"Verification: {reproduction.verification_level}")
        print(f"Constructor: {reproduction.constructor_signature}")
        print("Use build_scaled_silva(family, **task_specific_kwargs) to instantiate it.")
    return 0

Where to Go Next

Question Page
What does each reported scale field mean mathematically? Full-Scale SILVA
Which Python objects expose the same information? Scaling API
Where is the family selection taxonomy? Selecting Model Families
Can I run the scale checks in a notebook? Full-Scale Family Notebook