aboutsummaryrefslogtreecommitdiff
path: root/app/backends/sglomni/__init__.py
blob: be94a0ed585973f066620491d2e7dbfc3cb0cef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"""sglang-omni backend — setup wizard, server specs, model management.

A package of focused modules behind one import surface: everything public
is re-exported here, so callers (the hub, the CLI, tests) keep using
``backends.sglomni.<name>`` regardless of which module implements it.

Modules:
    constants   shared constants (package name, port, timeouts, configs)
    catalog     the model catalog + the install tree shape
    gpu         the NVIDIA GPU facts (nvidia-smi) launch decisions use
    pythonenv   interpreter selection/provisioning for the backend venv
    models      model install state, (un)install, run-model resolution
    status      detect() for the hub's backend menu + the server spec
    wizard      the TUI wizard, configure screen, uninstall/update, CLI
"""

from .constants import (
    CONFIGS_DIR,
    DEFAULT_PORT,
    PYTHON_SPEC,
    PYTHON_VERSIONS,
    SERVER_NAME,
    SERVER_START_TIMEOUT,
    SGLOMNI_PIP_PKG,
    UV_PIP_PKG,
)
from .gpu import (
    compute_capability,
    describe,
)
from .catalog import (
    CAPABILITY_CLONE,
    CAPABILITY_DESIGN,
    CAPABILITY_SPEAKER,
    ENTRIES,
    ModelEntry,
    config_path,
    entries_by_keys,
    entry_by_key,
    entry_by_repo,
    extra_import_name,
    install_tree_families,
)
from .pythonenv import (
    env_compatible,
    env_version,
    prepare_env,
)
from .models import (
    delete_model_weights,
    install_companions,
    install_model,
    installed_entries,
    installed_keys,
    missing_companions,
    model_installed,
    preset_voices,
    repo_dir,
    resolve_model,
    uninstall_model,
)
from .status import (
    build_spec,
    detect,
    gpu_fallback_note,
    launch_config_path,
    needs_fp8_fallback,
)
from .wizard import (
    build_parser,
    main,
    models_screen,
    run_tui,
    setup_screen,
    uninstall,
    update,
)

__all__ = [
    # constants
    "CONFIGS_DIR", "DEFAULT_PORT", "PYTHON_SPEC", "PYTHON_VERSIONS",
    "SERVER_NAME", "SERVER_START_TIMEOUT", "SGLOMNI_PIP_PKG", "UV_PIP_PKG",
    # gpu
    "compute_capability", "describe",
    # catalog
    "CAPABILITY_CLONE", "CAPABILITY_DESIGN", "CAPABILITY_SPEAKER",
    "ENTRIES", "ModelEntry", "config_path", "entries_by_keys",
    "entry_by_key", "entry_by_repo", "extra_import_name",
    "install_tree_families",
    # pythonenv
    "env_compatible", "env_version", "prepare_env",
    # models
    "delete_model_weights", "install_companions", "install_model",
    "installed_entries", "installed_keys", "missing_companions",
    "model_installed", "preset_voices", "repo_dir",
    "resolve_model", "uninstall_model",
    # status
    "build_spec", "detect", "gpu_fallback_note", "launch_config_path",
    "needs_fp8_fallback",
    # wizard
    "build_parser", "main", "models_screen", "run_tui", "setup_screen",
    "uninstall", "update",
]