def METHOD_NAME(weights: str) -> List[float]:
    if not weights:
        return []
    elements = weights.split(",")
    elements = [element.strip() for element in elements if element.strip() != ""]
    result = []
    for element in elements:
        try:
            f = float(element)
            if f == 0:
                logger.info("Warning: 0 weight, will ignore")
            else:
                result.append(f)
        except ValueError:
            raise ValueError(f"Warning: cannot parse weight {element}")
    return result