feat(vwb): add dashboard competence testing and health tools
This commit is contained in:
@@ -67,6 +67,41 @@ except ModuleNotFoundError:
|
||||
flask_socketio.emit = _fake_emit
|
||||
sys.modules["flask_socketio"] = flask_socketio
|
||||
|
||||
try:
|
||||
import prometheus_client # noqa: F401
|
||||
except ModuleNotFoundError:
|
||||
prometheus_client = types.ModuleType("prometheus_client")
|
||||
prometheus_client.CONTENT_TYPE_LATEST = "text/plain; version=0.0.4"
|
||||
|
||||
def _fake_generate_latest(*_args, **_kwargs):
|
||||
return b""
|
||||
|
||||
class _FakeMetric:
|
||||
def __init__(self, *_args, **_kwargs):
|
||||
pass
|
||||
|
||||
def labels(self, **_kwargs):
|
||||
return self
|
||||
|
||||
def inc(self, *_args, **_kwargs):
|
||||
return None
|
||||
|
||||
def observe(self, *_args, **_kwargs):
|
||||
return None
|
||||
|
||||
def set(self, *_args, **_kwargs):
|
||||
return None
|
||||
|
||||
def info(self, *_args, **_kwargs):
|
||||
return None
|
||||
|
||||
prometheus_client.generate_latest = _fake_generate_latest
|
||||
prometheus_client.Counter = _FakeMetric
|
||||
prometheus_client.Histogram = _FakeMetric
|
||||
prometheus_client.Gauge = _FakeMetric
|
||||
prometheus_client.Info = _FakeMetric
|
||||
sys.modules["prometheus_client"] = prometheus_client
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# GPU Preflight — vérification avant les tests GPU
|
||||
|
||||
Reference in New Issue
Block a user