Skip to content

CI never runs the inference suite with the runtime installed #488

Description

@JArmandoAnaya

CI installs the base distribution and never the local-inference extra, so every
test that needs the real runtime skips on every run.

That absence is deliberate in the python job and stays: it is the half of the
matrix that proves a base install imports none of torch, torchvision,
transformers, accelerate or huggingface_hub, and that a machine without them
refuses with the install command rather than an ImportError. Removing it would
lose the only check that keeps two gigabytes of wheels off the server's startup
path.

What is missing is the other half. There is no job anywhere that installs the
extra, so the tests written for the with-runtime side never execute in CI:

  • tests/inference/test_provider.py — the one skipif(not EXTRA_INSTALLED)
    test, structural conformance of the built provider to the ModelProvider
    port;
  • tests/architecture/test_optional_runtime.py — the lazy-import contract. Its
    probe asserts that importing visionset.server.main, visionset.cli.main,
    visionset.jobs and visionset.inference leaves none of the five modules in
    sys.modules. On a machine where they are not installed the assertion is true
    by construction: a module-level import torch under visionset/inference
    would be caught by nobody, because the import that would prove the point
    cannot succeed. This is the check that most needs the extra to mean anything;
  • every test that exercises visionset.inference against a stub — family
    resolution, capability derivation, the download job, tensor-to-domain
    conversion, the fp16 shims — runs today with no evidence that the real
    libraries at the locked versions behave the way the stubs claim.

The practical consequence: a transformers, torch or huggingface_hub bump in
uv.lock that broke the adapter, family resolution or the download path would
pass CI green. Every with-extra verification to date has been run by hand on a
developer machine or recorded one-off in a pull request body (#460, #486), which
is not a check.

Proposed

A second job on the format-smoke mould — its own job because the extra is
large, installed from uv.lock with uv sync --locked --extra local-inference,
running the inference test surface on a CPU-only runner:

  • VISIONSET_REQUIRE_LOCAL_INFERENCE=1, the VISIONSET_REQUIRE_FFMPEG /
    VISIONSET_REQUIRE_ULTRALYTICS rule: with the runtime meant to be present, a
    missing-library skip becomes an error, so a broken install goes red rather
    than quietly shrinking the suite.
  • Missing-GPU skips stay skips. The runner has no CUDA device and never
    will, so the one test that reproduces the half-precision finding on real
    tensors must keep skipping honestly. Any marker that conflates "no runtime"
    with "no GPU" is split first — a CUDA test erroring under the require variable
    would make the job permanently red for a reason nobody can fix.
  • The count of tests run against tests skipped is stated on the record, so a
    future silent shrink is visible.

The python job is untouched.

Bounds

No new dependency groups, no lock changes, no version bumps, no GPU runners, and
no model downloads — the faked hub surface stays the boundary.

cf. #418, #469, #480

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendvisionset Python distribution — kernel, server, cli, mcp, formatsciCI, tooling, repo automation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions