def from_attribute(attr):
    """Creates a :class:`fiftyone.core.labels.Classification` from an
    ``eta.core.data.Attribute``.

    The attribute value is cast to a string, if necessary.

    Args:
        attr: an ``eta.core.data.Attribute``

    Returns:
        a :class:`fiftyone.core.labels.Classification`
    """
    classification = fol.Classification(label=str(attr.value))

    try:
        classification.confidence = attr.confidence
    except:
        pass

    return classification
Creates a :class:`fiftyone.core.labels.Classification` from an
    ``eta.core.data.Attribute``.

    The attribute value is cast to a string, if necessary.

    Args:
        attr: an ``eta.core.data.Attribute``

    Returns:
        a :class:`fiftyone.core.labels.Classification`
    
fiftyone/utils/eta.py