diff --git a/src/phoenix/session/client.py b/src/phoenix/session/client.py index 870a101d8e..2cd8018280 100644 --- a/src/phoenix/session/client.py +++ b/src/phoenix/session/client.py @@ -141,6 +141,7 @@ def _warn_if_phoenix_is_not_running(self) -> None: ) def log_evaluations(self, *evals: Evaluations, project_name: Optional[str] = None) -> None: + project_name = project_name or get_env_project_name() for evaluation in evals: table = evaluation.to_pyarrow_table() sink = pa.BufferOutputStream() diff --git a/src/phoenix/trace/dsl/helpers.py b/src/phoenix/trace/dsl/helpers.py index 47d277cde7..fb93422674 100644 --- a/src/phoenix/trace/dsl/helpers.py +++ b/src/phoenix/trace/dsl/helpers.py @@ -3,6 +3,7 @@ import pandas as pd from openinference.semconv.trace import DocumentAttributes, SpanAttributes +from phoenix.config import get_env_project_name from phoenix.trace.dsl import SpanQuery DOCUMENT_CONTENT = DocumentAttributes.DOCUMENT_CONTENT @@ -28,6 +29,7 @@ def query_spans( def get_retrieved_documents(obj: CanQuerySpans, project_name: Optional[str] = None) -> pd.DataFrame: + project_name = project_name or get_env_project_name() return cast( pd.DataFrame, obj.query_spans( @@ -45,6 +47,7 @@ def get_retrieved_documents(obj: CanQuerySpans, project_name: Optional[str] = No def get_qa_with_reference(obj: CanQuerySpans, project_name: Optional[str] = None) -> pd.DataFrame: + project_name = project_name or get_env_project_name() return pd.concat( cast( List[pd.DataFrame],