mlcheck

Crates.iomlcheck
lib.rsmlcheck
version0.1.6
sourcesrc
created_at2024-04-10 22:58:14.281023
updated_at2024-06-24 21:38:18.185033
descriptionA tool to check files for ML best practices
homepagehttps://github.com/mcmullarkey/mlcheck
repositoryhttps://github.com/mcmullarkey/mlcheck
max_upload_size
id1204192
size56,607
Michael Mullarkey (mcmullarkey)

documentation

README

mlcheck

mlcheck is a command line tool to check for ML best practices in different coding documents.

Think of this tool as a spell-check equivalent for ML best practices.

The current version can detect scikit-learn style Python code in .py or .ipynb (Jupyter Notebook) files and tidymodels style R code in .R or .Rmd files.

Install

If you have Rust and Cargo installed (see this resource if you haven't), you can install mlcheck from crates.io using:

cargo install mlcheck

Running mlcheck

To run mlcheck on a file you can run the following terminal command:

mlcheck --path path/to/your_file_name.py

To run mlcheck on a folder with .py and/or .ipynb files you can run the following terminal command:

mlcheck --path path/to/folder/

Analyzing mlcheck results

To look back at all the past checks you've run using mlcheck you can query the mlcheck_output.db sqlite database that's automatically created when you run mlcheck for the first time. As long as you run mlcheck in the same folder, new checks will be appended to the database.

sqlite3 mlcheckoutput.db

sqlite> select * from mlcheck_results

If you'd prefer to save your mlcheck results to a csv, run your commands like this

mlcheck --path path/to/your_file_name.py --output csv

Disclaimer

Note: mlcheck is at an incredibly early stage and is under active development. Breaking changes are likely.

Acknowledgements

The concept for this tool was in part inspired by the statcheck project.

Potential future features

  • Add more specific, sophisticated regex across styles
Commit count: 16

cargo fmt