Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

kaimei

Latest version: v0.14.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: org:Kaimei
0 Stars
0 Forks
22 Versions
1.5K Downloads
Python Repo language

Scan summary

kaimei was last scanned on 27 Nov 2026 at version 0.14.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 22 versions; the latest 5 were published within 7 days (21–27 Nov 2026).
  • Findings: No rules fired in version 0.14.0.
  • Downloads: 1,485 downloads.

Versions

22 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.14.0 LATEST 27 Nov 2026 No rules fired
0.13.0 27 Nov 2026 No rules fired
0.12.0 26 Nov 2026 No rules fired
0.11.0 26 Nov 2026 Not shown
0.10.0 21 Nov 2026 Not shown

No rules fired in 0.14.0

Findings

Findings for v0.14.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.14.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

kaimei

PyPI Python versions License

Official Python client for the Kaimei explainability API.

Kaimei (解明) — to clarify, elucidate, reveal through investigation — turns trained models into something you can inspect: architecture, feature-level attributions, global behaviour, learned rules, robustness, and drift.

from kaimei import Kaimei

client = Kaimei(api_key="km_live_...")

explanation = client.explanations.create(
    model="credit-risk-v3",
    prediction_id="pred_8f2a19",
    input={
        "income": 72000,
        "credit_score": 681,
        "utilization": 0.41,
    },
)

print(explanation.output)
print(explanation.top_features)
# 0.81 decline  |  credit_score -0.22

The same call as POST https://api.kaimei.ai/v1/explanations. See kaimei.ai for the language-agnostic REST examples and the API reference for every endpoint.

Documentation

Our documentation page can be found here: Kaimei Docs

To get started, see the Quickstart page, and reference the examples below.

Install

pip install kaimei

To extract and upload a fitted estimator you also need NumPy (and your training stack):

pip install "kaimei[models]"

A model Kaimei has no reader of its own for is uploaded through ONNX (below):

pip install "kaimei[onnx]"   # NumPy, onnx and onnxscript; a PyTorch model needs nothing more
pip install skl2onnx         # for scikit-learn estimators

For a self-hosted or local Kaimei API, pass its address:

client = Kaimei(api_key="km_test_...", base_url="http://localhost:8000")

KAIMEI_API_KEY and KAIMEI_BASE_URL are read from the environment when arguments are omitted.

Create an API key in the dashboard (session login). Keys cannot create other keys.

Examples for text and image models

Two short runnable examples of models that are not tables are in examples/: a scikit-learn text classifier and a PyTorch image segmenter, each as a script and as a notebook.

Examples

  • titanic-kaimei-example: a complete workflow on the Titanic data, in five notebooks with their outputs (and Colab badges):
    • upload a scikit-learn model;
    • explain passengers, with counterfactuals and two models compared;
    • analyse the whole model;
    • monitor production traffic and catch drift;
    • ship an improved version;
    • explain a model through your own infrastructure: XGBoost here, via TreeSHAP values and a scoring endpoint. Kaimei can also run XGBoost itself.
  • examples/upload_sklearn.py / .ipynb: the smallest upload-and-explain round trip.
  • examples/cats_dogs_gradcam.py and cats_dogs_explain.ipynb: an image model (MobileNetV2) explained with Grad-CAM, occlusion and LIME.

Upload a trained model from a notebook

The client reads the live estimator in your process and uploads layers and learned weights. Small tensors travel inline in the JSON spec; anything larger than 65,536 values is streamed as a zlib-compressed float32 blob and referenced from the spec, so models with millions of parameters upload at about 4 bytes per weight. Kaimei does not store the original .h5 / .pt / pickle file, and it does not host a binary artifact.

from kaimei import Kaimei

client = Kaimei(api_key="km_live_...")

model = client.models.upload(
    clf,  # a fitted estimator
    name="Churn net",
    feature_names=["tenure", "spend", "tickets"],  # optional if the estimator knows them
    X=X_train,   # optional reference rows for explanations (capped at 5,000)
    y=y_train,
)
# Open the dashboard — the architecture scene shows every layer and tensor.

What happens next:

  • Visualize — always. The dashboard draws the uploaded structure.
  • Explain / predict / analyse — when the spec is executable: see the table below. The API runs that structure in-process.
  • Otherwise — pass a live scoring URL, run an agent beside the model, or POST pre-computed attributions:
client.models.upload(
    my_custom_model,
    name="Churn scorer",
    inference={"type": "remote", "url": "https://scoring.example.com/predict"},
)

Attach weights to a model you already registered with client.models.upload_structure(model.id, clf).

Large models

Nothing changes in the call. A PyTorch module with thousands of layers and millions of parameters uploads the same way; the client registers the model from its shapes, streams each large tensor (progress= reports ("tensors", done, total)), then sends the spec that references them. Module names become block paths, so the dashboard folds encoder.layers.0 … encoder.layers.47 into one ×48 block and loads a tensor only when you open it.

model = client.models.upload(
    transformer,                 # torch.nn.Module, 1,200 layers / 110M parameters
    name="Encoder",
    feature_names=["token_id"],
    progress=lambda stage, done, total: print(stage, done, "/", total),
)

Options:

  • externalize_above= — values per tensor above which it uploads as binary (default 65,536; None keeps everything inline). A single value, or a value with no axes, is never lifted: externalize_above=0 lifts every other constant.
  • weights="summary" — upload shapes and statistics, not the weights. The architecture is drawable. Layers under 256 values send no statistics, since those would give the values away. Trees and models made of other models send only how many trees there are and how often each feature is split on, or the model's feature importances. Explain / predict then need inference={"type": "remote", ...} or an agent. A model of any size can be registered this way: no tensor's size and no parameter count is limited for weights that are not sent. A value a graph's input is always given (inputs={name: {"value": ...}}) is kept at home too, unless it is whole numbers (up to 16) or a single number; such a summary is drawn, not run.
  • weights="pictures" — a summary that also sends a small picture of each float tensor of 256 values or more, for the dashboard to draw where the weights would be: at most 64 by 64 cells, each the strongest value of its block, at 8 bits. You ask for this; a summary alone never sends it. A large tensor is reduced to almost nothing by it. One of 64 by 64 values or fewer is all there, at that precision, so do not ask for pictures of a model whose small layers must stay private.
  • extract_structure(estimator, ...) returns the spec and the tensors without uploading, for inspection or a custom upload.
  • client.models.tensors(model) lists what was uploaded; structure_parameter_values(model, "fc1.weight") reads a tensor back as float32.

A runnable walkthrough lives in examples/upload_sklearn.py and examples/upload_sklearn.ipynb.

Supported estimators

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases kaimei

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229