chore(ml): added testing and github workflow
Description
This PR adds pytest unit tests to the ML package. Given the expanding scope of ML, it's important to ensure a certain set of behaviors across changes. The tests included here aren't exhaustive and should be built upon in the future, but they're a good starting point.
Further, formatting, linting and testing are all automatically checked through GHA to ensure consistency across contributions.
#2951 is included in this PR and should be merged first.
Testing
To test locally, you can follow these steps:
cd machine-learningpoetry install --with devpytest --cov
To test in a container, you must copy or map the machine-learning folder, not just app. You can then SSH into the container and run pytest --cov.
Note that models are mocked in most tests to avoid downloading and loading them. The exceptions are the endpoint tests, which are skipped by default. Setting MACHINE_LEARNING_TEST_FULL will run these tests as well.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| immich | ⬜️ Ignored (Inspect) | Jun 27, 2023 9:57pm |
Rebased