Linter for Machine Learning projects
Project description
mllint
— Linter for Machine Learning projects
mllint
is a command-line utility to evaluate the technical quality of Machine Learning (ML) and Artificial Intelligence (AI) projects written in Python by analysing the project's source code, data and configuration of supporting tools. mllint
aims to ...
- ... help data scientists and ML engineers in creating and maintaining production-grade ML and AI projects.
- ... help ML practitioners inexperienced with Software Engineering (SE) techniques explore and make effective use of battle-hardended SE for ML tools in the Python ecosystem.
- ... help ML project managers assess the quality of their ML and AI projects and receive recommendations on what aspects of their projects they should focus on improving.
mllint
does this by measuring the project's adherence to ML best practices, as collected and deduced from SE4ML and Google's Rules for ML. Note that these best practices are rather high-level, while mllint
aims to give practical, down-to-earth advice to its users. mllint
may therefore be somewhat opinionated, as it tries to advocate specific tools to best fit these best practices. However, mllint
aims to only recommend open-source tooling and publically verifiable practices. Feedback is of course always welcome!
mllint
is created during my MSc thesis in Computer Science at the Software Engineering Research Group (SERG) at TU Delft and ING's AI for FinTech Research Lab on the topic of Code Quality and Software Engineering for Machine Learning projects
See docs/example-report.md to view the report generated for this example project.
Installation
mllint
is compiled for Linux, MacOS and Windows, both 64 and 32 bit x86 (MacOS 64-bit only), as well as 64-bit ARM on Linux and MacOS (Apple M1).
mllint
is published to PyPI, so it can be installed using pip
:
pip install mllint
Usage
To run mllint
on the project in the current folder, simply run:
mllint
To run mllint
on a project in another folder, simply run:
mllint path/to/my-ml-project
mllint
will analyse your project and create a Markdown-formatted report of its analysis. By default, this will be pretty printed to your terminal.
If you instead prefer to export the raw Markdown text to a file, use the --output
or -o
flag and provide a filename. mllint
does not overwrite the destination file if it already exists, unless --force
or -f
is used. For example:
mllint --output report.md
Using -
(a dash) as the filename prints the raw Markdown directly to your terminal:
mllint -o -
See docs/example-report.md for an example of a report that mllint
generates.
Of course, feel free to explore mllint help
for more information about its commands and to discover additional flags that can be used.
Linters, Categories and Rules
mllint
analyses your project by evaluating several categories of linting rules. Each category, as well as each rule, has a 'slug', i.e., a lowercased piece of text with dashes or slashes for spaces, e.g., code-quality/pylint/no-issues
. This slug identifies a rule and is often (if not always) displayed next to the category or rule that it references.
To list all available (implemented) categories and linting rules, run:
mllint list all
To list all enabled linting rules, run (optionally providing the path to the project's folder):
mllint list enabled
By default, all of mllint
's rules are enabled. See Configuration to learn how to selectively disable certain rules.
To learn more about a certain rule or category, use mllint describe
along with the slug of the category or rule:
# Describe the Version Control category. This will also list the rules that it checks.
mllint describe version-control
# Describe the rule on DVC usage in the Version Control category
mllint describe version-control/data/dvc
Configuration
mllint
can be configured either using a .mllint.yml
file or through the project's pyproject.toml
. This allows you to selectively disable specific linting rules or categories by means of their slug, as well as configure specific settings for various linting rules. See below for examples of such configuration files.
To print mllint
's current configuration in YAML format, run (optionally providing the path to the project's folder):
mllint config
To print mllint
's default configuration in YAML format, run (unless there is a folder called default
in the current directory):
mllint config default
To create a .mllint.yml
file from mllint
's default configuration, run:
mllint config default -q > .mllint.yml
YAML
An example .mllint.yml
that disables some rules looks as follows:
rules:
disabled:
- version-control/code/git
- dependency-management/single
TOML
If no .mllint.yml
is found, mllint
searches the project's pyproject.toml
for a [tool.mllint]
section. TOML has a slightly different syntax, but the structure is otherwise the same as the config in the YAML file.
An example pyproject.toml
configuration of mllint
is as follows. Note that it is identical to the YAML example above.
[tool.mllint]
[tool.mllint.rules]
disabled = ["version-control/code/git", "dependency-management/single"]
Getting Started (development)
While mllint
is a tool for the Python ML ecosystem and distributed through PyPI, it is actually written in Go, compiled to a static binary and published as platform-specific Python wheels.
To run mllint
from source, install the latest version of Go for your operating system, then clone this repository and run go run .
in the root of this repository. Use go test ./...
or execute test.sh
to run all of mllint
's tests.
To test compiling and packaging mllint
into a Python wheel for your current platform, run test.package.sh
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mllint-0.7.3-pp37-pypy37_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12765efe52354ee4119797556b7a583531ad3d0cd2be5b79db2f8df9e6710373 |
|
MD5 | ad35734e48f76ab76029b6f019a250d7 |
|
BLAKE2b-256 | 2bd5fbfcfb14b9ed80d19d64671e0b618695fe65b4bd54266baa5e3dd12bc3de |
Hashes for mllint-0.7.3-pp37-pypy37_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13d7431c879513340634a15987df1a7115244490390b96c83760bf4d31e803e3 |
|
MD5 | e521dfab99c91a67dd10856444239e4e |
|
BLAKE2b-256 | 583c46cc6e9d59fbf20b22311a9a61eaeb546ee791b8ad95beb30bb9eb984f4b |
Hashes for mllint-0.7.3-pp37-pypy37_pp73-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f74d1d77f244ba51e43394dd9ca63f621df157cbce841a690903b8b1528aae5c |
|
MD5 | 52ba67a344f3b79f9c807ac7d987d012 |
|
BLAKE2b-256 | bfd15a62fe4a3e1b78a606ba5cde5dca0e5d957de18f0365229209442565ae79 |
Hashes for mllint-0.7.3-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e026f02936b7893136d43316d6990a5a5b58a74d16878565bd8ab90687bd795b |
|
MD5 | 379f8b8fc706e47e74fe5dae3409edc1 |
|
BLAKE2b-256 | aacba5e96e1c8f2a0691bcbc01688305fc97d38be90cc331aa3bdba1b44c158b |
Hashes for mllint-0.7.3-pp36-pypy36_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f2b4df91dc530a8bb7680e03ad3e7631c74b3c46d8fcbd76c7cf035f57375f3 |
|
MD5 | 24d8b412a39cce8f8f80125450d468ed |
|
BLAKE2b-256 | 6d99540622babf0eb43635dcc8e2d080749947bfbd6031c799cbed43ae8b0ea7 |
Hashes for mllint-0.7.3-pp36-pypy36_pp73-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b531c70a53d86eaa24ea2403e9bca704d717194ca289f094cb9780ef6b33e96 |
|
MD5 | eab4cd6a533ffba304e3c0ebdf96277f |
|
BLAKE2b-256 | 086f9d2fcf1e377834f480cea8bd122a383161aeb51b5d339d7060a9a8607842 |
Hashes for mllint-0.7.3-pp36-pypy36_pp73-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9236f4e2264b44d6315972929a4eea5e386404b920118fd247a71674a1d74b4 |
|
MD5 | 479aae9eb0897b1f632fe91938d06c36 |
|
BLAKE2b-256 | 32e4ff3f6ae5100dfdcfd48fc5882d07aeb7e4a7dcdfba6d9b13d67ef4e1a7f0 |
Hashes for mllint-0.7.3-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d84edd79bb6fbc6883a3199503b3431279fc6d0bb1d2f03be64e3b36441a08a |
|
MD5 | 16563b3cb8c6a24e9306863a2fa275f6 |
|
BLAKE2b-256 | 4580759110540fa955043a6c158ad48b13eda746f44f0598e90d0a5ac69b2f34 |
Hashes for mllint-0.7.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155eea0f7ac64fdc3ed53ba55351bf5dbeff9dfa6536444a81cca54b090e12c9 |
|
MD5 | e97207add3b8e40d9fe2e131b83dacf6 |
|
BLAKE2b-256 | f8f1b36c07158c8fd41b4f5fbb021bdde7cf683a4b912c41520c89110c8a639f |
Hashes for mllint-0.7.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daa670e4547ea452d330c6cec1dcfd8d7b6606fe1724bc50e3f88b6d1372b67c |
|
MD5 | c6561b36e1514c91d09410a0215a0319 |
|
BLAKE2b-256 | 1a2a5ee3573588c5461ac3e0c0c6cd8dbf929b30ce22a83da5e4c23c2ab96cd2 |
Hashes for mllint-0.7.3-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d86c5048bc4e32f73ef0942e43afb3eea4655b8fa0bec3c4945eb0b7888104f2 |
|
MD5 | 366bf3577189fddfe27c18f13b01f908 |
|
BLAKE2b-256 | c2d6efd0d75ad391358b096d2e6eea5541b2fccddfacaa06b0aaa83f932f4c87 |
Hashes for mllint-0.7.3-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc434867dcc49ed8c900015a7877330976f381d4838e43075a31da9bf0ff10f |
|
MD5 | 96db75d76e9fba79d4ff775cf64f0cc3 |
|
BLAKE2b-256 | 5f6bfc89fee1336af1ef14460db564f97c736ebd132387944d46fb8f4b01cab7 |
Hashes for mllint-0.7.3-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 941caf60579164159aee0bc53dbfedb35281acf29bdb76a8f4720118fb221bb0 |
|
MD5 | e941ff7373334ff0855a99a33761a315 |
|
BLAKE2b-256 | cb9f06b5a2f3878a3510134d65792a6ffc71986655d2346a20c38224aa7667b5 |
Hashes for mllint-0.7.3-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fcce93f847b948ba36164792d2861a95d8f5908189b54550014aee0580c0f29 |
|
MD5 | e0ef6cd0316d5d7c61739a5754de5322 |
|
BLAKE2b-256 | 23c231c7c9f1e4e8e016757dd01bfa5d7af1b21301e5ff1576bc6d2d042c0501 |
Hashes for mllint-0.7.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072623fab7831107a2e57c6171450fb9d5b77b48c451b0edcbc0e80f8ad9e0f5 |
|
MD5 | bd14c2d42c0364a206eb37a119c7dbe8 |
|
BLAKE2b-256 | f08852cfbe486e8c23f2aa672435a8c7d31cf5e932488d1f09534ca108fd919d |
Hashes for mllint-0.7.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba66e2cdcb1504294491606ed346a58129fcd2ff6856bc3ba6e0b0603ddf05d9 |
|
MD5 | 44191ff2aee8e6c4fa12f7a7768e3abf |
|
BLAKE2b-256 | 9a864908028733ce0028311d01ae4d6d977e8cd75a183f06a610b06d5f5a9e26 |
Hashes for mllint-0.7.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 294de17727fbcfd71690b5df568fe2895d25946be87aa253759b66edda471b84 |
|
MD5 | e232337ff497e3292ad7d68d502791c3 |
|
BLAKE2b-256 | e198428544e505bec65becef5e416a746c287f7da3faa4a3bf7ff7e13a419524 |
Hashes for mllint-0.7.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f3c1f91e749daa768f4920f0dbb1295709cbafbe91631a2190e606a397a1ef |
|
MD5 | b88dd71452c9d5dd1e1ef9d9b82fa7fa |
|
BLAKE2b-256 | d4c93fc0c9495cc2b2ae1aee00c237ea39c81ef465a9394722249ea4d836b660 |
Hashes for mllint-0.7.3-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e8ae404c5f74c8fe3c0dd26d607ef7a78eb50eecb3287f14c8dd43d0f93c06 |
|
MD5 | 401d0bd94e7942c7f946b47177cab95e |
|
BLAKE2b-256 | 7e73415eef9276d2480c31b856ccac8bff55e4abef4994059dd299fc0ad008ee |
Hashes for mllint-0.7.3-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b93eee505c9a2a04a636f4f0d77beca7f1c8ac44f7fbb295fb9c1332bdba77b7 |
|
MD5 | 3985b44b015a4de2876290dde1e6c613 |
|
BLAKE2b-256 | 8966ac1a48b0045da6a4e617c05af8b8a90900396a2dab3dcdb8dacd07c7817e |
Hashes for mllint-0.7.3-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e035d14b04e96486e239d4da2688d9d4fa1e134165954822ba26333011a0ca4 |
|
MD5 | 58cff2560396567963fe368f53e4bba4 |
|
BLAKE2b-256 | 54172411fb8a510e12e456c29b74086da83c6a02f2cb300ec491c8c2c9d56f40 |
Hashes for mllint-0.7.3-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 135a99f75b6a055d3f7192ce9b60811df801171c511c9cca28fe3b4ed41dda5e |
|
MD5 | f786102d9758cc1103a45a4bdc1614e6 |
|
BLAKE2b-256 | c6ab100520ee90b8ea466f76f58738d94bcfc4f1e3a032b22cb89a9210901c66 |
Hashes for mllint-0.7.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f22f73d906b85bb7f49c491cd6fca940226607465a1242c267f7443212da133a |
|
MD5 | ac9d12994df18b38145a05282c524864 |
|
BLAKE2b-256 | 8ebb8a9d47bdd2262e94a9d492966c5e44c38a672e658445e2fcce47b1be5494 |
Hashes for mllint-0.7.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57a49554788ff6c02867aa19633ebd25ec7309fd5f3e4e6693895eeffe85e7dc |
|
MD5 | ce6c075ce13f1fff656ab14eb49585a7 |
|
BLAKE2b-256 | 05b79029673ab389b92ab3095ff072ada078d041b6c17970227281b36ffe3fab |
Hashes for mllint-0.7.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a48d69d4ebfa7b4567c97a759a78459a3476eac46979935554c1528ce087b04d |
|
MD5 | a88c2b9c34752551d0d11d3b7eed8733 |
|
BLAKE2b-256 | 0fcf4996d61f938af239418b43e56f61a8cc8f954600ecc6b1bde49d905a8fc2 |
Hashes for mllint-0.7.3-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c08cb6d3a68af2a77489cf795152ac1383bdef690db2f1a9b05504133500571 |
|
MD5 | 6005db95685f43b923ce9f8aa67a8760 |
|
BLAKE2b-256 | 4713461b0f415b6d12adcc9fcfabe5211ccbfdba5f40871c873e955a1bb5017c |
Hashes for mllint-0.7.3-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4add6edcc487ad4d10b7165c8c265ceb4421e9ad4e1776e8938535bb604678ed |
|
MD5 | 7bb1d71f1cacbe55f27dfbf0c4354d92 |
|
BLAKE2b-256 | 66307c993ca75f6a8e04d47f77d0de62f2d887ab935b488d7d61f8e9635c56ec |
Hashes for mllint-0.7.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1d4f8e1c276eaa836151b06f00ab1022d495af4767660ecf89c9ebeeff612ce |
|
MD5 | 591519f032e20f4eb6e8fcb4a4c43b0e |
|
BLAKE2b-256 | c64b0b7aa55e8c7468cee3d4ef28e70bf966ebf8fe97d668cc381c05158230cc |
Hashes for mllint-0.7.3-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430775d4cca4a5e23a2bfc3f20030eafa10c219353883e223ec511db5218bc9a |
|
MD5 | d7b2ef893b353a3350d90354fcf251da |
|
BLAKE2b-256 | 964c7aa4c24e60ceee099787d0de02df21bf82eb3fba391094f2f791797ad535 |
Hashes for mllint-0.7.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c7b50bb9002de726135b9f3b3186165f7bbf8a06c9fd0d69d3b2bffb4ef49e |
|
MD5 | 8831fc60e0bef47bcd50af4910d4b9ba |
|
BLAKE2b-256 | 468a5810b6e76cf09d7116e05ab5eee581c18c1c6d2d49c554328e93e35f9334 |
Hashes for mllint-0.7.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3def68bf58edfaa6fc852bc5c0352a7dd08b507c9f51880bfbcd2b06a6f470a9 |
|
MD5 | 78982bd934688b04a25759db31c9f291 |
|
BLAKE2b-256 | 9d9e574db2709914da56d9ffb4321750575a3ee795dff7a7fe9712d4e8fb914a |
Hashes for mllint-0.7.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204e64e0df878551144d749f5c11a2c98c6609c46ec675aea47a061a668bd3dc |
|
MD5 | 90cab0b283504d20c5b12eedcfbbf8aa |
|
BLAKE2b-256 | 66d110eaedd4f4fe0cdab10523d35c0e1a3a6434a325b859bdea21d4bd9cc410 |
Hashes for mllint-0.7.3-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89e6a4257e8e18dc7a7c756887335eb6045e92b2b8e8d675a04e289da92ca085 |
|
MD5 | b99b45efbd3e603ab6e1ba764cbeddc9 |
|
BLAKE2b-256 | 47815c8b9c72c451f3c3f103ae88afff7a82bad9addb9723092cca94de8cc440 |
Hashes for mllint-0.7.3-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87461c3b823889babfe1b1b9458705b4f5e91c1afbc2b8fc60ad0876794d199 |
|
MD5 | 005384f2d6d43f7d8458fc2ee4a48a9b |
|
BLAKE2b-256 | d234ff398ce2fafd1be56d1c718f5afd2a261b2b3b0252c4ff2cfc83c0ba9cee |
Hashes for mllint-0.7.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ba95ae9591ef3dac9d88a53e03a84799d4a552dc663e836e6fecbb90d085650 |
|
MD5 | 5bb45474a1f0a713718abd59cad3cdd8 |
|
BLAKE2b-256 | 3bd1e117012a82de6d654f86ac63efeaf82d6257d80a5a305ae06986c9dddfa9 |
Hashes for mllint-0.7.3-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d0f562212fdac8a9c02343c8290fd997390e7d07b5b6acfda66cf223b300e81 |
|
MD5 | bd3a687099e53d2df2e0ff6f53562472 |
|
BLAKE2b-256 | 5c62d8ef5faf320c5bc88a656ae883a8466424f2578851a677dc5e3ae2b1b9fb |
Hashes for mllint-0.7.3-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | adf33a2a8a334a238f2885fd5af205a8bdb77f76ec8107be8ddcee7e42bdc9f0 |
|
MD5 | 64e3688de830c533951852a6eb68377c |
|
BLAKE2b-256 | 456323114c503c8d33c47902a35f756e843af8afdb01dbec73cec52719b53dcf |