I don't see where you instanciate ClaerML Task in your given code. Which means that Task.current_task() will return None , thus the error you get.
Hi @<1856144871656525824:profile|SparklingFly7> , can you describe the issue you're experiencing? I saw there is a new response in github - None
(I don't really use HPO feature so I out sorry)