Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
ray / experimental / gradio_utils.py
Size: Mime:
def type_to_string(_type: type) -> str:
    """Gets the string representation of a type.

    THe original type can be derived from the returned string representation through
    pydoc.locate().
    """
    if _type.__module__ == "typing":
        return f"{_type.__module__}.{_type._name}"
    elif _type.__module__ == "builtins":
        return _type.__name__
    else:
        return f"{_type.__module__}.{_type.__name__}"