Portuguese
mamba
mamba-3
ssm
muon
muonclip
qk-clip
adamw
optimizer
nope
hybrid-architecture
activation-checkpointing
3d-vision-language
depth-perception
point-cloud
diffusion
stable-diffusion
mixture-of-experts
kohonen
som-attention
random-forest
deep-neural-network
knowledge-distillation
bidirectional-distillation
engram-memory
multimodal
multi-token-prediction
dpo
rlhf
hh-rlhf
pcgrad
long-context
lra-qvit
engineer-agent
integral-state
cython
jev-classifiers
gumbel-softmax
quantization
riemannian-optimization
stiefel-manifold
cython-kernels
gradient-accumulation
vector-quantization
grayscale-detection
joint-perception
self-regulation
signal-table
abmo
ciar
growing-som
pt-br
File size: 1,382 Bytes
b433ff3 | 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 | # -*- coding: utf-8 -*-
"""conftest da suíte KHTST.
v23 (P12 da auditoria independente — EXECUTAVEL.md §8 fase 1): a suíte era
100% torch-dependente — sem torch, os 20 arquivos falhavam NA COLEÇÃO por
import (20/20 erros, nenhuma rede de segurança). Aqui a ausência de torch é
detectada UMA vez e TODA a coleta vira skip com mensagem clara (pytest sai
0 com "skipped", em vez de 20 erros de importação); com torch presente, a
coleta é idêntica à anterior (bit a bit — zero interferência).
"""
from __future__ import annotations
import os
import sys
_RAIZ = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
for _caminho in (os.path.join(_RAIZ, "src"),
os.path.join(_RAIZ, "src", "khtst", "acelerado")):
if _caminho not in sys.path:
sys.path.insert(0, _caminho)
try: # torch é dependência dura da suíte
import torch # noqa: F401
_SEM_TORCH = False
except Exception: # ImportError e afins
_SEM_TORCH = True
def pytest_collection_modifyitems(config, items):
if not _SEM_TORCH:
return
import pytest
_skip = pytest.mark.skip(
reason="torch ausente neste ambiente (P12) — a suíte KHTST é "
"torch-dependente; instale torch para executar as provas")
for item in items:
item.add_marker(_skip)
|