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: don't raise error during dimension type inference #596

Merged
merged 1 commit into from
Apr 14, 2023
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
5 changes: 2 additions & 3 deletions src/phoenix/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy.typing as npt
import pandas as pd
from pandas.api.types import is_numeric_dtype, is_object_dtype
from pandas.api.types import is_numeric_dtype

from phoenix.datasets import Dataset
from phoenix.datasets.schema import EmbeddingColumnNames, EmbeddingFeatures
Expand Down Expand Up @@ -108,9 +108,8 @@ def _infer_dimension_data_type(self, dimension_name: str) -> DimensionDataType:
)
if is_numeric_dtype(dimension_pandas_dtype):
return DimensionDataType.NUMERIC
elif is_object_dtype(dimension_pandas_dtype):
else:
return DimensionDataType.CATEGORICAL
raise ValueError("Unrecognized dimension type")

def export_events_as_parquet_file(
self,
Expand Down