Skip to content

Commit

Permalink
Update the tutorial of "Visualise pipelines" (#1913)
Browse files Browse the repository at this point in the history
* Change a file extention to match the previous article

Signed-off-by: dinotuku <kuan.tung@epfl.ch>

* Add a missing import

Signed-off-by: dinotuku <kuan.tung@epfl.ch>

* Change both preprocessed datasets to parquet files

Signed-off-by: dinotuku <kuan.tung@epfl.ch>

* Change data type to ParquetDataSet for parquet files

Signed-off-by: dinotuku <kuan.tung@epfl.ch>

* Add a note for installing seaborn if it is not installed

Signed-off-by: dinotuku <kuan.tung@epfl.ch>

Signed-off-by: dinotuku <kuan.tung@epfl.ch>
  • Loading branch information
dinotuku authored Oct 7, 2022
1 parent e1da30f commit 34b2d33
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions docs/source/tutorial/visualise_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ shuttles:
layer: raw

preprocessed_companies:
type: pandas.CSVDataSet
filepath: data/02_intermediate/preprocessed_companies.csv
type: pandas.ParquetDataSet
filepath: data/02_intermediate/preprocessed_companies.pq
layer: intermediate

preprocessed_shuttles:
type: pandas.CSVDataSet
filepath: data/02_intermediate/preprocessed_shuttles.csv
type: pandas.ParquetDataSet
filepath: data/02_intermediate/preprocessed_shuttles.pq
layer: intermediate

model_input_table:
type: pandas.CSVDataSet
filepath: data/03_primary/model_input_table.csv
type: pandas.ParquetDataSet
filepath: data/03_primary/model_input_table.pq
layer: primary

regressor:
Expand Down Expand Up @@ -180,6 +180,7 @@ The below functions can be added to the `nodes.py` and `pipeline.py` files respe
```python
# nodes.py
import plotly.express as px
import plotly.graph_objs as go
import pandas as pd
# the below function uses plotly.express
Expand Down Expand Up @@ -277,6 +278,8 @@ def create_confusion_matrix(companies: pd.DataFrame):
return plt
```

> You might have to execute `pip install seaborn` if the [seaborn library](https://seaborn.pydata.org/) is not installed yet.

```python
# pipeline.py
def create_pipeline(**kwargs) -> Pipeline:
Expand Down

0 comments on commit 34b2d33

Please sign in to comment.