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 Client's handling of Enum Values, to support Python >=3.11 enum handling. #4672

Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ These are the section headers that we use:
- Fixed parsing ranking values in suggestions from HF datasets. ([#4629](https://github.com/argilla-io/argilla/pull/4629))
- Fixed reading description from API response payload. ([#4632](https://github.com/argilla-io/argilla/pull/4632))
- Fixed pulling (n*chunk_size)+1 records when using `ds.pull` or iterating over the dataset. ([#4662](https://github.com/argilla-io/argilla/pull/4662))
- Fixed client's resolution of enum values when calling the Search and Metrics api, to support Python >=3.11 enum handling. ([#4672](https://github.com/argilla-io/argilla/pull/4672))

## [1.25.0](https://github.com/argilla-io/argilla/compare/v1.24.0...v1.25.0)

Expand Down
2 changes: 1 addition & 1 deletion src/argilla/client/apis/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def metric_summary(
query: Optional[str] = None,
**metric_params,
):
url = self._API_URL_PATTERN.format(task=task, name=name, metric=metric)
url = self._API_URL_PATTERN.format(task=task.value, name=name, metric=metric)
metric_params = metric_params or {}
query_params = {k: v for k, v in metric_params.items() if v is not None}
if query_params:
Expand Down
2 changes: 1 addition & 1 deletion src/argilla/client/apis/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def search_records(
else:
raise ValueError(f"Task {task} not supported")

url = self._API_URL_PATTERN.format(name=name, task=task)
url = Search._API_URL_PATTERN.format(name=name, task=task.value)
if size:
url += f"?limit={size}"

Expand Down
Loading