Files
2026-10-29 20:48:09 +07:00

55 lines
2.0 KiB
Python

try:
import xenith_engine as _engine
except ImportError as _e:
raise ImportError(
"не найден скомпилированный модуль xenith_engine.\n"
"Сборка: cmake -B build -DXENITH_VULKAN=ON && cmake --build build -j\n"
" (нужны: pybind11 — pip install pybind11, заголовки python3-dev)\n"
"Запуск: PYTHONPATH=build python -c 'import xenith'\n"
f"Исходная ошибка: {_e}"
) from _e
from xenith_engine import (
Model,
TrainState,
TrainStats,
GenResult,
BenchResult,
XenithError,
# модульные функции
version, commit, build_type,
backend_name, backend_describe, backend_is_gpu, device_memory_used,
vulkan_available, list_devices, init_vulkan, shutdown_vulkan, use_cpu,
set_threads, get_threads, set_threads_cap, get_threads_cap, hardware_threads,
set_fsync, set_log_callback, get_log,
load_config, config_get, probe, optimizer_names,
# GGUF и квантования
quant_types, convert_model, gguf_info, gguf_dump,
# обучаемый MoE-мозг агента
MoEBrain,
)
from xenith_engine import __doc__ as _engine_doc # noqa: F401
from . import shm
from .python import exception
try:
from .python import conf
except Exception:
pass
try:
from .python import vulkan as shader_builder
except Exception:
pass
__version__ = version()
__all__ = [
"Model", "TrainState", "TrainStats", "GenResult", "BenchResult", "XenithError",
"version", "commit", "build_type",
"backend_name", "backend_describe", "backend_is_gpu", "device_memory_used",
"vulkan_available", "list_devices", "init_vulkan", "shutdown_vulkan", "use_cpu",
"set_threads", "get_threads", "set_threads_cap", "get_threads_cap",
"hardware_threads", "set_fsync", "set_log_callback", "get_log",
"load_config", "config_get", "probe", "optimizer_names",
"shm", "exception", "__version__",
]