Inspect ML Pipelines in Python in the form of a DAG
Prerequisite: python >= 3.8
-
Clone this repository
-
Set up the environment
cd mlinspect
python -m venv venv
source venv/bin/activate -
Install pip dependencies
pip install -e .[dev] -
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 -
Run the tests
python setup.py test
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- 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.
This library is licensed under the Apache 2.0 License.