You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a behavioural difference on how to access the URLs in client.get_dataset, client._get_dataset_id_by_name and client.get_dataset_versions, specifically the step where the url is generated.
In get_dataset we have urljoin(self._base_url, f"/v1/datasets/{quote(id)}/examples")
In _get_dataset_id_by_name we have urljoin(self._base_url, "/v1/datasets")
In get_dataset_versions we have url = urljoin(self._base_url, f"v1/datasets/{dataset_id}/versions")
The correct one is the one in get_dataset_versions.
The '/' before v1 implies that the relative url is absolute and must follow the domain at a root level. This is a problem when the base url is something on the line of https://base_domain.com/phoenix because the /phoenix is removed resulting in a final url like https://base_domain.com/v1/datasets/example_id/examples instead of the correct one https://base_domain.com/phoenix/v1/datasets/example_id/examples
To Reproduce
Steps to reproduce the behavior:
Deploy phoenix on an endpoint whose url has some kind of path after the domain
Upload a dataset
Instantiate a phoenix client in a notebook
query the dataset with the get_dataset method
Expected behavior
The path for get_dataset should include the complete base_path Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
There is a behavioural difference on how to access the URLs in client.get_dataset, client._get_dataset_id_by_name and client.get_dataset_versions, specifically the step where the url is generated.
In get_dataset we have
urljoin(self._base_url, f"/v1/datasets/{quote(id)}/examples")
In _get_dataset_id_by_name we have
urljoin(self._base_url, "/v1/datasets")
In get_dataset_versions we have
url = urljoin(self._base_url, f"v1/datasets/{dataset_id}/versions")
The correct one is the one in get_dataset_versions.
The '/' before v1 implies that the relative url is absolute and must follow the domain at a root level. This is a problem when the base url is something on the line of
https://base_domain.com/phoenix
because the /phoenix is removed resulting in a final url likehttps://base_domain.com/v1/datasets/example_id/examples
instead of the correct onehttps://base_domain.com/phoenix/v1/datasets/example_id/examples
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The path for get_dataset should include the complete base_path
Screenshots
The text was updated successfully, but these errors were encountered: