Linter for Machine Learning projects
Project description
mllint
— Linter for Machine Learning projects
mllint
is a command-line utility to evaluate the quality of Machine Learning (ML) projects by means of static analysis of the project's repository. It measures the project's adherence to ML best practices, as collected and deduced from se4ml.github.io and Google's Rules for ML.
TODO: write overview of linting rules or implement mllint describe <rule>
Getting Started
Installing mllint
mllint
works on Linux, MacOS and Windows, and is published to PyPI, so it can be installed using pip
:
pip install mllint
Running mllint
To run mllint
in its default configuration, use one of the following commands:
# Run `mllint` on the project in the current folder
mllint
# Run `mllint` on the project in projects/my-ml-project
mllint projects/my-ml-project
Linters and rules
To list all available or all enabled linting rules, use one of the following commands:
# List all available (implemented) linting rules
mllint list all
# List only the enabled rules for the project in the current folder.
mllint list enabled
# or for a project in projects/my-ml-project
mllint list enabled projects/my-ml-project
Configuration
YAML
mllint
can be configured using a .mllint.yml
file that should be placed at the root of the project directory. This is a YAML file in which you can disable specific rules / linters, as well as configure specific settings for various linters.
An example .mllint.yml
looks as follows:
rules:
disabled:
- use-git # disables the 'use-git' linter
- use-dependency-manager/single # disables the 'single' rule of the 'use-dependency-manager' linter.
# - use-dependency-manager # this would disable the 'use-dependency-manager' linter and all of its rules entirely.
TOML
Alternatively, if no .mllint.yml
exists, mllint
can be configured from the pyproject.toml
file in the root of the project. This should be done in the [tool.mllint]
section. TOML has a slightly different syntax, but the structure is otherwise the same as the config in the YAML file. The example below is identical to the YAML example above.
[tool.mllint]
[tool.mllint.rules]
disabled = ["use-git", "use-dependency-manager/single"]
Here are some useful commands related to configuration:
# Print the configuration of the project in the current folder
mllint config
# Print the configuration of the project in projects/my-ml-project
mllint config projects/my-ml-project
# Print the default configuration (unless there's a folder called 'default' in the current dir)
mllint config default
# Create a valid `.mllint.yml` file with the default configuration
mllint config default -q > .mllint.yml
Getting Started (development)
Clone this repository and run go run .
in the root of this repository.
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.3.2-pp37-pypy37_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 442f7421f5f3beab9ed5269c0f01a78cb7612fba4abb6717dad34b3a2bac58ab |
|
MD5 | d7aab7dc892c41f6a5f0150c4a54047a |
|
BLAKE2b-256 | 2977f515c6278355e84182dfd42f922b234ace97a301ea4e1398c2bf4be23e68 |
Hashes for mllint-0.3.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 047423422adb7eb4cdf1e1a86cfa385126b333752c13eea4ceaeed638da2b78e |
|
MD5 | fd95c77d970c8b46b6b837a3e2422a90 |
|
BLAKE2b-256 | 8964338b6a310e5b27f8b469388b27b9e4528f314f65225ebcc61c8b533f959a |
Hashes for mllint-0.3.2-pp36-pypy36_pp73-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9b5aa4611e1e58c0785a2640d00ed3c965d80b302ac838d0dfb1c087161feae |
|
MD5 | 0d06a7e73c17a0db6504ea673378539c |
|
BLAKE2b-256 | 4c711c4941c6744bccd7c1a2eb1a7e880f531a3446044d34d71b82637da200dc |
Hashes for mllint-0.3.2-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a6e7ae9cf614e136e0a7248c09f142779bf6368ec40d513ba8cfc84e4374ee6 |
|
MD5 | ec0965cc11fa44486458133a83461b4d |
|
BLAKE2b-256 | db8f9947f8bf7463b1e893c1214ddfb6f85c8bb273fa2c1c2dbcd2fde27f620f |
Hashes for mllint-0.3.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd5378d8452c11cdf753d9b12129e1f2b3f29123965e14517a0600e1e943e0ed |
|
MD5 | 751524a6a4f2d3c7e31377c45c1639f9 |
|
BLAKE2b-256 | ad0e6219396db1a2a596fe9ba0d70156f780b613e7aad0af160cdaf59a4d31d3 |
Hashes for mllint-0.3.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cf39ac6f237b040a72a686f279eacc18e165e9e24c4bc1411095befe7fa7ba9 |
|
MD5 | 481d3dc39ab81bdcdc461dfe48358afc |
|
BLAKE2b-256 | 51e7871f49bf178e19d0b42280db380b894afa82f893470c36ef70fbb5b9669e |
Hashes for mllint-0.3.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dcd190efd822a86e30d77d224b0351f85f770c8ba76c4aa1be121fe6737afbf |
|
MD5 | f9f7a3d5f71ddcdb975b2ecd01aa1aec |
|
BLAKE2b-256 | 5bb5c8530d4576c11a772e72f3be1fedcb05a73eba72e24f53ac8a10b996fa50 |
Hashes for mllint-0.3.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be497ee4971c2ba416bcacb4d71ddfef79111eeffec7813913b45b13b1794e47 |
|
MD5 | 45e44195fd91fe9f338bf10c3548a9fb |
|
BLAKE2b-256 | 421ac3f9d758578c65e14c4a89df3a87e681b53bfaf65e895932faa382c0d84c |
Hashes for mllint-0.3.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3eced27dc342c5cc192b1da0a6f25743fbcf8f2e140991026770cae4d47d352 |
|
MD5 | cb7456c7699a0ed3d1beeedc178116f2 |
|
BLAKE2b-256 | 837ff12f84f7e081cd1c4b9e0dc41d8a0327234b0b30ab9250b9dcfee7562451 |
Hashes for mllint-0.3.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8579f16eabeaafe7b5595cfa314eca2f60f8846060b941651cac81d12c8151cf |
|
MD5 | 9296e6f6b5d654b0c10eb9ad267bdb8e |
|
BLAKE2b-256 | 34e0de12d70b3b84a71297066548a12160d1b3362f1022c18e1840b7fe2e1207 |
Hashes for mllint-0.3.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d04257de1d9cd10ae7177704f94d029e8e49b5eb85bc3ac1f7f5dd77c3c80915 |
|
MD5 | 7f63df7f694ea39204496d17677c0aa3 |
|
BLAKE2b-256 | 9a87b74d994be23c58c29c82beaa85468fb7e7f770bf2c4846838a0ba2a3b07c |
Hashes for mllint-0.3.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8fd296e4ec86497c3fbacf7cbbefc55364c4ac1188fc4f58faa0b0349972b90 |
|
MD5 | f925b65a97b0967acf9bb6ec150cd75c |
|
BLAKE2b-256 | e43d6ca2c5394bb72fe859fb3d729ce18b905cd6c950c440590d8e964c3095e1 |
Hashes for mllint-0.3.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea209e0fdb620ea1d75bc5eab2f0418b6137087089789a608c4f6cb9a138f19 |
|
MD5 | c3a46080359c5e658b4866bee94a472e |
|
BLAKE2b-256 | 8a05a831361aca0ed2dabdc5eae2a9fc32bc6c67914dcb2eb19cba60814dddc5 |
Hashes for mllint-0.3.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d22d745e036ca8de83d00a606b9fbc6453d2a96e38d480699160b995a0470a |
|
MD5 | 5bfa8a3855b9e72e331562a02fae5e81 |
|
BLAKE2b-256 | 00c5bd8ebd92d9baa6f7d488255fe2131197d3e471cf75e49e39d5991260b92b |
Hashes for mllint-0.3.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57fa9b9e36637224b668b6ea10ace937c3ce249b3721c113449c5c9e2ffa5805 |
|
MD5 | a27a4b1303dc15d31b72c31f6cca8ac1 |
|
BLAKE2b-256 | 81761fa0396c9cbeae12ebef33dea9e97687d650a3b17dddbf9830a47653d04e |
Hashes for mllint-0.3.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a6a32bfe0d433a5f2835eef6b2aaa9f2731d77998da6d10d2897b02c8ab34f8 |
|
MD5 | 39bf7485b2d9cbb7bbeafba51b8fc9e2 |
|
BLAKE2b-256 | 3f213f909d6b96b611fb664c6dd60f71f586d96d02b5b124a20904bfa2d38c6b |