Skip to content

LC117/mlinspect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlinspect

mlinspect GitHub license Build Status codecov

Inspect ML Pipelines in Python in the form of a DAG

Run mlinspect locally

Prerequisite: python >= 3.8

  1. Clone this repository

  2. Set up the environment

    cd mlinspect
    python -m venv venv
    source venv/bin/activate

  3. Install pip dependencies

    pip install -e .[dev]

  4. If you want to use the visualisation functions we provide, install graphviz which can not be installed via pip

    Linux: apt-get install graphviz
    MAC OS: brew install graphviz

  5. Run the tests

    python setup.py test

Vision

Make it easy to analyze your pipeline and automatically check for common issues.

from mlinspect.pipeline_inspector import PipelineInspector
from mlinspect.instrumentation.analyzers.materialize_first_rows_analyzer import MaterializeFirstRowsAnalyzer

IPYNB_PATH = ...

inspection_result = PipelineInspector \
        .on_pipeline_from_ipynb_file(IPYNB_PATH) \
        .add_analyzer(MaterializeFirstRowsAnalyzer(2)) \
        .execute()

extracted_dag = inspection_result.dag
analyzer_results = inspection_result.analyzer_to_annotations

Notes

  • For debugging in PyCharm, set the pytest flag --no-cov (Link)
  • This is a research project, so comprehensive coverage of all possible ML APIs will not be possible in the current initial step. We will try to tell you if we encounter APIs we can not handle yet.

License

This library is licensed under the Apache 2.0 License.

About

Inspect ML Pipelines in Python in the form of a DAG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 59.1%
  • Python 40.9%