<jupyter_start><jupyter_text>*Note:* You can run this example locally (`ploomber examples -n ml-basic`) or in Binder (hosted JupyterLab ).[![binder-logo](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ploomber/binder-env/main?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fploomber%252Fprojects%26urlpath%3Dlab%252Ftree%252Fprojects%252Fml-basic%252FREADME.ipynb%26branch%3Dmaster)  Basic ML projectMachine Learning pipeline. Setup(**Note**: Skip if running in Binder)~~~bash if using condaconda env create --file environment.ymlconda activate ml-basic or use pip directlypip install -r requirements.txt~~~ DescriptionLet's take a look at the `pipeline.yaml`:<jupyter_code>%%sh
cat pipeline.yaml<jupyter_output># # enable client if you want to upload arfifacts to google cloud storage
# # see clients.py for details
# clients:
#   File:
#     dotted_path: clients.get_storage_client
#     run_id: '{{run_id}}'

tasks:
    # tasks.get, features and join are python functions
  - source: tasks.get
    product: output/get.parquet

  - source: tasks.features
    product: output/features.parquet

  - source: tasks.join
    product: output/join.parquet

    # fit.py is a script executed as a notebook
  - source: fit.py
    name: fit
    product:
        nb: output/nb.ipynb
        model: output/model.pickle<jupyter_text>Note that the first three tasks as Python functions, while the last one is ascript.Generate the plot:<jupyter_code>%%sh
ploomber plot

# If using jupyter, you can show the plot with this code:
from IPython.display import Image
Image(filename='pipeline.png')

# otherwise open the pipeline.png file directly<jupyter_output><empty_output><jupyter_text>Build pipeline<jupyter_code>%%sh
ploomber build<jupyter_output>name      Ran?      Elapsed (s)    Percentage
--------  ------  -------------  ------------
get       True         0.014284      0.340374
features  True         0.032976      0.785787
join      True         0.028502      0.679176
fit       True         4.12079      98.1947
{'fraction_non_alphanumeric': 0.114271701814615, 'fraction_numerical': 0.04413928396272683, 'mean_word_length': 3.5033112582781456, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '523360', 'license': 'Apache-2.0', 'n_tokens_mistral': 722, 'n_tokens_neox': 657, 'n_words': 175, 'path': 'ml-basic/README.ipynb', 'repo_name': 'kozo2/projects', 'size': '2039'}