SwapAI

Classifier monitor

Inspect collected data, candidates, resources, cost and cleanup without changing classifier state.

Start it

npx @swapai/core classifiers-ui \
  --data-directory /var/lib/my-service/swapai \
  --port 4789

Open http://127.0.0.1:4789. SWAPAI_DATA_DIRECTORY can supply the directory. The default host is loopback.

What it shows

For each classifier the monitor shows:

  • collected examples by training, validation, representative-test and coverage-test purpose;
  • result-bin readiness deficits and declared-facet collection coverage;
  • active and candidate model identity;
  • the newest 100 training runs and each dataset revision;
  • aggregate and per-result-bin evaluation evidence;
  • persisted shadow count, mean error, failures and pass state;
  • provider run ID, resource IDs, timestamps and reported cost;
  • cleanup state and failure message;
  • loaded application processes and durable training leases.

Not measured means no candidate has completed protected evaluation. It is never treated as zero error.

Read from TypeScript

import {
  readClassifierStatuses,
  startClassifiersUi,
} from "@swapai/core/classifiers-ui";

const statuses = readClassifierStatuses({
  dataDirectory: "/var/lib/my-service/swapai",
});

const monitor = await startClassifiersUi({
  dataDirectory: "/var/lib/my-service/swapai",
  host: "127.0.0.1",
  port: 4789,
});

The JSON endpoint is GET /api/classifiers. Reading status never migrates the database, creates a runtime, trains a model or changes a lease.

Network safety

The monitor has no built-in user authentication. Keep the loopback default or place authentication in front of it on a private service network. Status never includes raw classifier inputs, reference results, credentials or private artifact paths.