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

Add metadata_filters support in filter_by from the Python client #3835

Closed
Tracked by #3748
alvarobartt opened this issue Sep 27, 2023 · 0 comments · Fixed by #3834
Closed
Tracked by #3748

Add metadata_filters support in filter_by from the Python client #3835

alvarobartt opened this issue Sep 27, 2023 · 0 comments · Fixed by #3834
Assignees
Labels
type: enhancement Indicates new feature requests
Milestone

Comments

@alvarobartt
Copy link
Member

alvarobartt commented Sep 27, 2023

Description

As of the recent development of the metadata_properties and metadata_filters in the API, we should ensure that those are covered in the Python client too.

The metadata_properties were already covered at #3818 by @gabrielmbmb, but the metadata_filters were still pending, so this issue is to add those into the filter_by method of RemoteFeedbackDataset datasets i.e. FeedbackDataset datasets pushed to Argilla.

@alvarobartt alvarobartt self-assigned this Sep 27, 2023
@alvarobartt alvarobartt added type: enhancement Indicates new feature requests client labels Sep 27, 2023
@alvarobartt alvarobartt added this to the v1.17.0 milestone Sep 27, 2023
@alvarobartt alvarobartt linked a pull request Sep 27, 2023 that will close this issue
13 tasks
frascuchon added a commit that referenced this issue Sep 28, 2023
# Description

This PR adds the `pydantic.BaseModel` schemas for the `MetadataFilters`
i.e. `TermsMetadataFilter`, `IntegerMetadataFilter`, and
`FloatMetadataFilter` and also adds the arg `metadata_filters` to the
`filter_by` method in the `RemoteFeedbackDataset` to be able to filter
based on the pre-defined conditions for those metadata properties
defined in the `FeedbackDataset` in Argilla.

Closes #3835

**Type of change**

- [X] New feature (non-breaking change which adds functionality)
- [X] Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**

- [x] Add unit tests for `TermsMetadataFilter`, `IntegerMetadataFilter`,
and `FloatMetadataFilter`
- [ ] Add integration tests for the `filter_by` method with arg
`metadata_filters` -> On hold because Elastic Search indexing is not
working fine when triggering the tests
- [ ] Add integration tests for the `get_records` function in the SDK
with the arg `metadata_filters` -> On hold because Elastic Search
indexing is not working fine when triggering the tests

**Checklist**

- [ ] I added relevant documentation
- [X] follows the style guidelines of this project
- [X] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [X] I have added tests that prove my fix is effective or that my
feature works
- [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK)
(see text above)
- [X] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

---------

Co-authored-by: Gabriel Martín Blázquez <[email protected]>
Co-authored-by: Francisco Aranda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@frascuchon frascuchon modified the milestones: v1.17.0, v1.18.0 Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants