def is_editable_bentoml() -> bool:
    """Returns true if BentoML is installed in editable mode."""

    dist = importlib.metadata.distribution("bentoml")
    direct_url_file = next(
        (f for f in (dist.files or []) if str(f).endswith("direct_url.json")), None
    )
    if direct_url_file is None:
        return False
    direct_url_data = json.loads(direct_url_file.read_text())
    return direct_url_data.get("dir_info", {}).get("editable", False)
Returns true if BentoML is installed in editable mode.
src/bentoml/_internal/configuration/__init__.py