Pocket-Sized Multimodal AI for content understanding and generation across multilingual texts, images, and 🔜 video, up to 5x faster than OpenAI CLIP and LLaVA 🖼️ & 🖋️
Background: Follow-up to #58, which was cancelled as it combined the contribution of pre-commit config (to run linters) with a refactor (for code structure), and it transpired that only the former was desirable upon submission
I've re-done the changes (by copying over the pre-commit exactly as in the previous PR #58 and executing it on this fresh branch). The only edits that were required to achieve a successful linting were the removal of * imports (torchvision.transforms.* and uform.models.* specifically)
Other than that nothing was changed, then the linters ran.
Some of these are the built-in ones from the pre-commit tool's own hooks:
end-of-file-fixer (standardise newlines at end of file)
name-tests-test (not needed yet as there are no pytest tests but you may wish to include them in future so no harm?)
trailing-whitespace
Additionally:
toml-sort-fix (lints pyproject.toml)
ruff (replaces many other tools which are selected with single letter rule category codes in pyproject.toml: pyflakes, pycodestyle, isort, pyupgrade)
To run this on CI all you have to do is go to pre-commit.ci and give its GitHub Actions app permission to run on your CI (does not require a .github/workflows YAML config to run). The pre-commit config YAML file introduced in this PR is sufficient to configure the CI workflow to then run it.
I've re-done the changes (by copying over the pre-commit exactly as in the previous PR #58 and executing it on this fresh branch). The only edits that were required to achieve a successful linting were the removal of
*
imports (torchvision.transforms.*
anduform.models.*
specifically)Other than that nothing was changed, then the linters ran.
Some of these are the built-in ones from the pre-commit tool's own hooks:
Additionally:
pyproject.toml
)pyproject.toml
: pyflakes, pycodestyle, isort, pyupgrade)To run this on CI all you have to do is go to pre-commit.ci and give its GitHub Actions app permission to run on your CI (does not require a
.github/workflows
YAML config to run). The pre-commit config YAML file introduced in this PR is sufficient to configure the CI workflow to then run it.