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

[BUG-UI/UX] Filtering by vectors #4655

Closed
damianpumar opened this issue Mar 13, 2024 · 5 comments · Fixed by #4856
Closed

[BUG-UI/UX] Filtering by vectors #4655

damianpumar opened this issue Mar 13, 2024 · 5 comments · Fixed by #4856
Assignees
Labels
area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints area: ui Indicates that an issue or pull request is related to the User Interface (UI) severity: major Indicates that the issue is blocking for users or needs to be addressed soon team: frontend Indicates that the issue or pull request is owned by the frontend team type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@damianpumar
Copy link
Contributor

Try to find a similar record I get this error.

Screen.Recording.2024-03-13.at.16.27.14.mov
@damianpumar damianpumar added the area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints label Mar 13, 2024
Copy link

dosubot bot commented Mar 13, 2024

Hey @damianpumar! Great to see you diving into the depths of Argilla again. Hope you're ready for another adventure in bug squashing! 🐛🔨

Based on the context provided, it seems like you're encountering an issue with the "Filtering by vectors" feature in the Argilla platform. However, without the exact error message, it's difficult to pinpoint the exact problem.

The "Filtering by vectors" feature allows users to filter datasets or records based on specific vector attributes. Each vector is uniquely identified by a combination of vector_name, dataset_id, and record_id, serving as its primary key. Vectors are associated with particular records within datasets, and each vector has a name and a set of values (vector_values). The is_active attribute suggests that vectors can be toggled on or off, possibly affecting their inclusion in filtering operations.

The structure and data type of vector_values in the Vector.js model is an array. This is indicated by the use of this.attr([]) in the model definition, where [] denotes an empty array as the default value.

The data that the "Filtering by vectors" feature is expected to handle includes Vector Settings, Feedback Records, Vector Values, and Operations on Vectors.

There are known issues or bugs related to the "Filtering by vectors" feature in the Argilla platform. Specifically, the test case marked with @pytest.mark.skip highlights a problem related to the order of tests affecting the outcome unexpectedly. The comment within the @pytest.mark.skip decorator mentions, "Review this test since this is the ONLY order where all tests pass. If you change the order, some of those tests will fail with unexpected vector names." This suggests that there is a dependency or side effect between tests that is not intended, which can be considered a bug or issue in the context of software testing and stability of the "Filtering by vectors" feature.

To better assist you, could you please provide more details about the error you're encountering? Specifically, the exact error message and the steps to reproduce the error would be very helpful. This will allow us to understand the issue more clearly and provide a more accurate solution.

For reference, here are the sources I used to gather this information:

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added area: ui Indicates that an issue or pull request is related to the User Interface (UI) severity: major Indicates that the issue is blocking for users or needs to be addressed soon team: frontend Indicates that the issue or pull request is owned by the frontend team type: bug Indicates an unexpected problem or unintended behavior labels Mar 13, 2024
@jfcalvo jfcalvo self-assigned this Mar 13, 2024
@frascuchon
Copy link
Member

Thanks @damianpumar!!

I need to do some tests by I think the problem is because this specific record doesn't contain a vector with that name since vector values are optional, even if vector settings are defined.

@damianpumar
Copy link
Contributor Author

Yes! I understood, but I'm not sure if we should handle it or not, because I don't know if this is a SDK issue or we can handle it in the frontend side.

Thanks!

@nataliaElv nataliaElv added this to the v1.29.0 milestone May 7, 2024
@nataliaElv
Copy link
Member

Proposal for the toast message:

{vector_name} not found for record {id}

@damianpumar
Copy link
Contributor Author

Final message:
{vector_name} not found for the selected record.

jfcalvo added a commit that referenced this issue May 23, 2024
…or (#4856)

# Description

An error is raised from backend when trying to find similar records when
the vector is not defined for the used record. The error is fine but an
additional attribute is needed on the front to support mapping that
specific error to a translated message to the user.

This PR adds a new custom error using `message` and `code` attributes to
be rendered as a JSON response.

Closes #4655 

**Type of change**

(Please delete options that are not relevant. Remember to title the PR
according to the type of change)

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactor (change restructuring the codebase without changing
functionality)
- [ ] Improvement (change adding some improvement to an existing
functionality)
- [ ] Documentation update

**How Has This Been Tested**

(Please describe the tests that you ran to verify your changes. And
ideally, reference `tests`)

- [ ] Modifying existents tests.

**Checklist**

- [ ] I added relevant documentation
- [ ] follows the style guidelines of this project
- [ ] I did a self-review of my code
- [ ] I made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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)
- [ ] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)

## Frontend handling


![Argilla](https://github.com/argilla-io/argilla/assets/7398909/38123437-4d8b-4e7b-9de5-fabc46b6823e)

---------

Co-authored-by: Damián Pumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Indicates that an issue or pull request is related to the Fast API server or REST endpoints area: ui Indicates that an issue or pull request is related to the User Interface (UI) severity: major Indicates that the issue is blocking for users or needs to be addressed soon team: frontend Indicates that the issue or pull request is owned by the frontend team type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants