Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add backup import for ujson_dumps from pandas.io.json #5496

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/phoenix/utilities/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down
Loading