https://github.com/openml/flow-visualization
Tool to convert openml flows to ONNX and visualize them via Netron
https://github.com/openml/flow-visualization
Last synced: 5 months ago
JSON representation
Tool to convert openml flows to ONNX and visualize them via Netron
- Host: GitHub
- URL: https://github.com/openml/flow-visualization
- Owner: openml
- Created: 2023-07-25T10:30:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T14:15:25.000Z (almost 3 years ago)
- Last Synced: 2025-07-01T22:36:32.243Z (12 months ago)
- Language: Dockerfile
- Size: 813 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Visualizing openML flows
This repository provides an initial attempt at visualizing flows. Generally, this should work in three steps:
1. Retrieve the pipeline/model from the openML flow.
2. Convert the model to onnx format.
3. Load the onnx model through [netron](https://github.com/lutzroeder/netron).
The current trial version is restricted to visualizing *scikit-learn* flows.
## Usage
1. Setting up your environment
```
cd .
pip install -r requirements.txt
```
2. ```implementation.csv``` provides an overview of all distinct configurations found among openML flows. Run ```retrieve_sklearn_version.py``` in order to generate a docker for every distinct sklearn configuration found. Dockerfiles are stored in ```./dockers``` (59 distinct configurations found).
3. Running a docker will call ```sk_onnx.py``` or ```sk_onnx_old.py```, depending on the sklearn version used. This script will convert all flows that are built using that specific sklearn version to onnx files. Files will be stored in ```./onnx_models```.
4. Once you have the onnx file stored, you can visualize it using netron. A function to do so is provided in ```sk_onnx.visualize_onnx```.
Keep in mind that there are currently multiple bugs in the code that need fixing. There are also multiple to-do's (such as integrating netron in the openML website). Find elaborate documentation on limitations and future work in ```Documentation.pdf```.
## App
A small Flask app is provided to show how netron can be used to visualize onnx models. This can be done by either loading a stored file or directly via url. Running the Flask app will call ```sk_onnx_test.py``` which allows you to visualize flow 19433:
```
cd .
flask run
```
## Contact
Feel free to reach out to me (t.a.boot@outlook.com) in case of questions!