Skip to content

tests: speed up RAG tests #336

@planetf1

Description

@planetf1

Problem

When running tests on a macbook m1 32GB RAG tests are taking around 17 minutes.

Analysis

The setup times for each test are substantive, and slow down for each test.
Memory churn could be notable if pages discarded.. as models reloaded (so very dependent on disk I/O and memory bandwidth)

tests are read-only, and model loading isn't the core function of the test, it's just a requirement to run

Proposal

Load model once - ie a fixture at the module level rather than test level
This should massively reduce memory impact & duration
Since we're not testing loading as such, I believe this is safe and does not affect the validity of the test or cause side effects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions