<jupyter_start><jupyter_text>To run this example locally, [install Ploomber](https://ploomber.readthedocs.io/en/latest/get-started/install.html) and execute: `ploomber examples -n templates/ml-advanced`To start a free, 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%252Ftemplates/ml-advanced%252FREADME.ipynb%26branch%3Dmaster)Found an issue? [Let us know.](https://github.com/ploomber/projects/issues/new?title=templates/ml-advanced%20issue)Have questions? [Ask us anything on Slack.](https://ploomber.io/community/)  ML advancedML pipeline using the Python API. Shows how to create a Python package, test it with pytest, and train models in parallel. Build<jupyter_code>%%sh
ploomber build --entry-point ml_advanced.pipeline.make<jupyter_output>Finished tasks so far: 
Remaining tasks: {'fit-ml-advanced--models--logistic-reg', 'fit-sklearn--ensemble--RandomForestClassifier', 'features', 'join', 'get', 'fit-ml-advanced--models--svc'}
Finished 0 out of 6 tasks
Finished tasks so far: 
Remaining tasks: {'fit-ml-advanced--models--logistic-reg', 'fit-sklearn--ensemble--RandomForestClassifier', 'features', 'join', 'get', 'fit-ml-advanced--models--svc'}
Finished 0 out of 6 tasks
Finished tasks so far: {'get', 'features', 'join'}
Remaining tasks: {'fit-ml-advanced--models--logistic-reg', 'fit-sklearn--ensemble--RandomForestClassifier', 'fit-ml-advanced--models--svc'}
Finished 3 out of 6 tasks
Finished tasks so far: {'get', 'features', 'join'}
Remaining tasks: {'fit-ml-advanced--models--logistic-reg', 'fit-sklearn--ensemble--RandomForestClassifier', 'fit-ml-advanced--models--svc'}
Finished 3 out of 6 tasks
name                                Ran?      Elapsed (s)    Percentage
----------------------------------  ------  -------------  -[...]<jupyter_text>Testing<jupyter_code>%%bash
# complete (force execution of all tasks)
pytest --force
%%bash
# incremental (will only run the tasks that have changed)
pytest<jupyter_output>============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /Users/Edu/dev/projects-ploomber/templates/ml-advanced
plugins: Faker-9.2.0, anyio-3.3.3
collected 1 item

tests/test_pipeline.py .                                                 [100%]

=============================== warnings summary ===============================
../../../../miniconda3/envs/projects/lib/python3.9/site-packages/ansiwrap/core.py:6
  /Users/Edu/miniconda3/envs/projects/lib/python3.9/site-packages/ansiwrap/core.py:6: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

tests/test_pipeline.py: 42 warnings
  /Users/Edu/miniconda3/envs/projects/lib/python3.9/site-packages/jsonschema/validators.py:190: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call valid[...]
{'fraction_non_alphanumeric': 0.18682367918523235, 'fraction_numerical': 0.027052832590706555, 'mean_word_length': 4.19504132231405, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '175136', 'license': 'Apache-2.0', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1003, 'n_words': 219, 'path': 'templates/ml-advanced/README.ipynb', 'repo_name': 'jramirez857/projects', 'size': '3142'}