You should do this by inspecting algorithm.monitoring_dataset. The re.sub approach might list things that aren't datasets, like if someone made a channel with a name like "hinge_loss_obejctive".