diff --git a/src/phoenix/utilities/json.py b/src/phoenix/utilities/json.py index c9715da1d1..0b5c0bf8e3 100644 --- a/src/phoenix/utilities/json.py +++ b/src/phoenix/utilities/json.py @@ -8,11 +8,17 @@ import numpy as np import pandas as pd -from pandas.io.json import build_table_schema, ujson_dumps # type: ignore +from pandas.io.json import build_table_schema from pandas.io.json._table_schema import parse_table_schema # type: ignore from strawberry import UNSET from strawberry.types.base import StrawberryObjectDefinition +try: + from pandas.io.json import ujson_dumps # type: ignore +except ImportError: + # https://github.com/pandas-dev/pandas/pull/54581 + from pandas.io.json import dumps as ujson_dumps # type: ignore + def jsonify(obj: Any) -> Any: """