m4/org/openalice-ml

openalice-ml

Rust/Axum HTTP service that runs local ONNX ML inference for the OpenAlice platform — providing dense text embeddings (BGE-M3, 1024-dim, 100+ languages), cross-encoder reranking (BGE-Reranker-Base), and a lightweight pattern-based NER fallback. All three capabilities are exposed on a single service listening on port 8103 and are consumed by `openalice-ml-gateway` (auth / rate-limit / usage metering) before reaching upstream callers.

Features
6
Status
·unknown
Last activity
1mo ago
Branch
mvp

Architecture rating

D1mo ago
consistencyB

Strong substrate adoption: manifest 100/valid, drift 90, zero circular deps and zero dead imports, single typed axum service cleanly fronted by the gateway — uniform with OpenAlice conventions, only minor env drift (PORT declared-unused).

docsC+

Solid README (models, dims, ports, consumer described) plus AGENTS.md and valid manifest with 6 @feature annotations, but roadmap weak (30/100) and 20 missing in-code docstrings leave architecture notes thin.

reliabilityD

Rust/axum with working /health (200, 3ms) and 100% 24h uptime, but no evidence of request timeouts, retries, or graceful SIGTERM shutdown; 1 god module and max cyclomatic complexity 18 concentrate risk in the inference path.

securityD

Stateless ONNX inference service that delegates ALL authn/rate-limit/usage metering to openalice-ml-gateway — no in-repo auth, headers, or input-size guards visible; exposed publicly at ml.blal.pro relying entirely on the gateway as the trust boundary.

data layerD

No owned tables, migrations, or persistence (manifest_owns_tables=[]); stateless by design so a data layer is genuinely absent — no schema/FK/RLS/GDPR surface to grade, scored conservatively for lack of any data-tier signal.

observabilityD

Only a GET /health liveness probe plus GET /v1/models; no metrics endpoint, tracing, or structured-log evidence in Atlas signals — health is externally monitored (uptime 100%) but in-service instrumentation appears absent.

testingF

No tests directory and no test signal from the inspector (migrations/tests presence empty) — critical paths (embed/rerank/NER tokenization, ONNX I/O) are entirely unverified by automated tests.

source · auto-grader-2026-06-16

Ecosystem manifest

.atlas-deps.yml

Rust axum ML inference service — embeddings (BGE-M3), reranking (BGE-Reranker-Base), and pattern-based NER; delegates full GLiNER NER to openalice-ner.

Runtime deps
  • openalice-nerhttpoptional
    via NER_SERVICE_URL
    Delegate GLiNER zero-shot NER requests to the sibling service on port 8104; this service provides pattern-based NER as a lightweight local fallback.
Consumed env
  • ML_API_KEY
  • PORT
Exposes
  • http_endpoint: POST /v1/embed
  • http_endpoint: POST /v1/rerank
  • http_endpoint: POST /v1/ner
  • http_endpoint: GET /v1/models
  • http_endpoint: GET /health
  • docker_image: openalice-ml
Env drift · manifest ⇄ code

Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.

Manifest declares, code unused
  • PORT
Observed reads: 1 · declared: 2

Code composition

tokei · loc
661loc
  • Rust95.8%
  • TOML2.3%
  • Dockerfile2.0%
  • Rust95.8%· 633
  • TOML2.3%· 15
  • Dockerfile2.0%· 13
Language% codecodecommentsblanksfiles
Rust95.8%633831001
TOML2.3%15651
Dockerfile2.0%13371
Markdown0.0%059232

Telemetry ribbon · last 90 days

1 event
MAYJUNJUL2026-05-21 · commit · new commit 38bb5f1 → 468255aNOW
commitmanifestlifecyclekind

ml/embeddings

1 feature
  • ml.embed.generate
    src/main.rs:366
    >
    POST /v1/embed
    since 0.1.0

ml/health

1 feature
  • ml.health.check
    src/main.rs:264
    >
    GET /health
    since 0.1.0

ml/models

1 feature
  • ml.models.list
    src/main.rs:328
    >
    GET /v1/models
    since 0.1.0

ml/ner

1 feature
  • ml.ner.extract
    src/main.rs:627
    >
    POST /v1/ner
    since 0.1.0

ml/reranking

1 feature
  • ml.rerank.score
    src/main.rs:500
    >
    POST /v1/rerank
    since 0.1.0

ml/service

1 feature
  • ml.service.crate
    src/main.rs:15
    >
    POST /v1/embedPOST /v1/rerankPOST /v1/nerGET /v1/modelsGET /health
    since 0.1.0