Fix for using custom Error Metric for anomaly models

Fix for using custom Error Metric for anomaly models