Skip to main content

Numerix โ€” Key Functionalities

Overviewโ€‹

Numerix evaluates mathematical expressions over feature matrices with a simple, low-latency gRPC surface. Each request references a compute_id; Numerix resolves a postfix expression, maps variables to input columns, and evaluates it over fp32/fp64 vectors with compiler-assisted SIMD.

๐Ÿš€ Core Capabilitiesโ€‹

Expression Evaluationโ€‹

  • Postfix execution: Linear-time, stack-based evaluation over aligned vectors.
  • Vectorized math: Compiler autovectorization (NEON/SVE on ARM, SSE/AVX on x86) โ€” no handwritten intrinsics.
  • Typed compute: Inputs converted to fp32 or fp64 for predictable performance.

Input Formatsโ€‹

  • Strings: Easy-to-produce feature values (converted internally).
  • Bytes: Efficient wire format for high-throughput paths.

Request Patternsโ€‹

  • Single entity or batch: Multiple entity_scores per call.
  • Schema-driven: Column order in schema drives variable mapping in expressions.

๐ŸŽฏ Developer Experienceโ€‹

  • gRPC API: Simple single RPC โ€” Numerix/Compute.
  • Protobuf schema: Language-agnostic client generation.
  • Deterministic behavior: No parsing at request time; expression resolved from registry.

gRPC Serviceโ€‹

service Numerix {
rpc Compute(NumerixRequestProto) returns (NumerixResponseProto);
}

Example Call (grpcurl)โ€‹

grpcurl -plaintext \
-import-path ./numerix/src/protos/proto \
-proto numerix.proto \
-d '{
"entityScoreData": {
"schema": ["feature1", "feature2"],
"entityScores": [ { "stringData": { "values": ["1.0", "2.0"] } } ],
"computeId": "1001",
"dataType": "fp32"
}
}' \
localhost:8080 numerix.Numerix/Compute

๐Ÿ“Š Observabilityโ€‹

  • Datadog/DogStatsD: Latency (P50/P95/P99), RPS, error rate via UDP client.
  • Optional /metrics endpoint for local/adhoc debugging.

โš™๏ธ Configuration & Registryโ€‹

  • etcd registry: compute_id (int) โ†’ postfix expression mapping.
  • Environment-driven config: endpoints, timeouts, sampling rate.

๐Ÿงช Example Scenariosโ€‹

Batched evaluationโ€‹

  • Submit multiple entities in one call to reduce RPC overhead; evaluate the same compute_id across all rows.

Mixed input formatsโ€‹

  • Start with string inputs for ease; migrate to bytes for performance without changing the expression or API.

๐Ÿ”ง Tuning Knobsโ€‹

  • Data type: choose fp32 (speed) vs fp64 (precision).
  • Batch size: tune number of entities per call for your p99 vs throughput goals.
  • Sampling rate: adjust Datadog metric sampling to balance signal vs cost.

Contributingโ€‹

We welcome contributions from the community! Please see our Contributing Guide for details on how to get started.

Community & Supportโ€‹

Licenseโ€‹

BharatMLStack is open-source software licensed under the BharatMLStack Business Source License 1.1.


Built with โค๏ธ for the ML community from Meesho
If you find this useful, โญ๏ธ the repo โ€” your support means the world to us!