tests/test_edges_defaults_smoke.py hinzugefügt
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s
This commit is contained in:
parent
4228b8a74f
commit
bc967f1f6e
20
tests/test_edges_defaults_smoke.py
Normal file
20
tests/test_edges_defaults_smoke.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import annotations
|
||||
from app.core.qdrant import QdrantConfig, get_client
|
||||
from collections import Counter
|
||||
import json
|
||||
|
||||
def main():
|
||||
cfg = QdrantConfig.from_env()
|
||||
cl = get_client(cfg)
|
||||
col = f"{cfg.prefix}_edges"
|
||||
pts,_ = cl.scroll(collection_name=col, with_payload=True, with_vectors=False, limit=10000)
|
||||
by_rel = Counter()
|
||||
for p in pts:
|
||||
rel = p.payload.get("relation") or p.payload.get("kind") or "edge"
|
||||
by_rel[rel] += 1
|
||||
print(json.dumps({"prefix": cfg.prefix, "relations": dict(by_rel)}, ensure_ascii=False))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Reference in New Issue
Block a user