You can use
tasks[*].grid to create multiple tasks from a single task
declaration, for example, to train various models with different parameters:
# execute independent tasks in parallel executor: parallel tasks: - source: random-forest.py # generates random-forest-1, random-forest-2, ..., random-forest-6 name: random-forest- product: random-forest.html grid: # creates 6 tasks (3 * 2) n_estimators: [5, 10, 20] criterion: [gini, entropy]
pip install ploomber ploomber examples -n cookbook/grid -o grid cd grid pip install -r requirements.txt ploomber build
Click here to see the complete example.
For full details, see the
grid API documentation.
An in-depth tutorial showing how to use
grid and MLflow for experiment tracking is available here.