Skip to content

Allow running local tests with a subset of ML back-ends #366

@Louisvh

Description

@Louisvh

Currently, tests fail altogether unless all back-ends are installed. That's good for the CI, but people contributing a small bugfix probably won't use the all-back-ends docker, so they can't run the tests locally before they make a PR. We could add a check in the test logic that tests which back-ends are available, which can fail with a message like

Not all back-ends are available, meaning tests will fail. To skip tests that require unavailable back-ends, use pytest --skip-unavailable-backends.

Then simply skip any test that imports functions from a specific back-end. That way the CI pipeline will still fail if we mess something up in a docker update, but contributors can conveniently run tests locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendsML backends, JAX, TensorFlow, PyTorchdevWorkflows, docker, etc.enhancementNew feature or requesttestsTests
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions