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

Sort the inputs of the text classification record on the UI #2233

Closed
bonillam opened this issue Jan 21, 2023 · 6 comments
Closed

Sort the inputs of the text classification record on the UI #2233

bonillam opened this issue Jan 21, 2023 · 6 comments
Assignees
Labels
type: enhancement Indicates new feature requests
Milestone

Comments

@bonillam
Copy link

Is your feature request related to a problem? Please describe.
When I display the inputs={} on the Argilla UI, I would like to have a way to sort the keys:values of the dictionary. I need this feature to help the labeler do the job easier.

Describe the solution you'd like
I want to be able to control the sort criteria for the inputs. Like: Date yymm01: will be shown before Date yymm02:. Or BEFORE: text a can be be shown first and then AFTER: text b

@bonillam bonillam added the type: enhancement Indicates new feature requests label Jan 21, 2023
@davidberenstein1957
Copy link
Member

@frascuchon I suggested to be able to handle this with an OrderedDict, however, I am not sure how this is handled internally.

import collections

collections.OrderedDict()

@Amelie-V Amelie-V added area: ui Indicates that an issue or pull request is related to the User Interface (UI) type: bug Indicates an unexpected problem or unintended behavior type: documentation Improvements or additions to documentation Cloud type: enhancement Indicates new feature requests and removed type: bug Indicates an unexpected problem or unintended behavior type: documentation Improvements or additions to documentation Cloud area: ui Indicates that an issue or pull request is related to the User Interface (UI) type: enhancement Indicates new feature requests labels Jan 23, 2023
@frascuchon
Copy link
Member

We need to validate that UI is not applying any default sort

cc @leiyre @keithCuniah

@leiyre
Copy link
Member

leiyre commented Jan 25, 2023

We need to validate that UI is not applying any default sort

cc @leiyre @keithCuniah

I confirm that there is no default sorting

@frascuchon frascuchon self-assigned this Jan 26, 2023
@frascuchon
Copy link
Member

Refs #1881

@nataliaElv nataliaElv self-assigned this Mar 13, 2023
@frascuchon frascuchon added this to the v1.5.0 milestone Mar 21, 2023
@frascuchon
Copy link
Member

We're using the _source filter when retrieving data, to control info send back as part of the response. When we use this, elasticsearch recreates the internal data structure and the original sort order is not preserved (See here)

To resolve this, we should provide inputs as a list of key-value pairs, or provide a template dataset record settings to show data in the proper order.

frascuchon added a commit that referenced this issue Mar 21, 2023
# Description

Since it's hard to keep the default inputs order (see
[here](#2233 (comment))
and [here](elastic/elasticsearch#17639)), in
this PR we add a default alphabetical short for text classification
inputs in UI.

This behavior can be used to control how record inputs will be shown by
defining the proper keys.


Refs  #2233 

**Type of change**

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

- [x] Refactor (change restructuring the codebase without changing
functionality)
- [x] Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**

Visual manual tests are done.

**Checklist**

- [x] I have merged the original branch into my forked branch
- [ ] 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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
@frascuchon
Copy link
Member

frascuchon commented Mar 22, 2023

PR #2581 helps to control the input visual order

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

No branches or pull requests

7 participants