To complete and run the ClearML tutorial for hyperparameter optimization, follow these steps:
-
Ensure you have completed the previous experiments:
- Run
01_first_experiment.pyto create a baseline model. - Run
02_pipeline.pyto set up a pipeline that processes data and trains models.
- Run
-
Run Hyperparameter Optimization (
03_hpo.py):The script provided sets up hyperparameter optimization using ClearML's automation capabilities. Here are the key steps in the script:
python1from clearml import Task 2from clearml.automation import ( 3 HyperParameterOptimizer, 4 DiscreteParameterRange, 5 UniformIntegerParameterRange, 6 RandomSearch 7) 8 9# Find the last completed task (baseline model) 10tasks = Task.get_tasks(project_name='ClearML Tutorial', 11 task_filter={'status': ['completed', 'published']}, 12 task_name='01_First_Experiment') 13base_task_id = tasks[-1].id 14 15# Initialize a new ClearML task for HPO 16Task.init(project_name='ClearML Tutorial', task_name='03_Hyperparameter_Optimization', 17 task_type=Task.Task
Read the full article at DEV Community
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.



