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

🍓 Rules page takes lot of time to load #2117

Closed
rhoitjadhav opened this issue Jan 2, 2023 · 2 comments · Fixed by #2607
Closed

🍓 Rules page takes lot of time to load #2117

rhoitjadhav opened this issue Jan 2, 2023 · 2 comments · Fixed by #2607
Assignees
Labels
type: enhancement Indicates new feature requests
Milestone

Comments

@rhoitjadhav
Copy link
Contributor

Description

When we have more rules (e.g 100, 1000), the Rules page takes lot of time to load as it fetches all the rules which are present in the database.̉

To Reproduce

Steps to reproduce the behavior:

  1. Add 100 rules through python client or server api
  2. Go to the corresponding dataset which we add rules.
  3. Enter on Weak Labeling mode, the Manage Rules button would be in disable state since all the rules are not loaded yet. Once they are loaded it will be enabled and we can click on the button.

Expected behavior

It's obvious that it takes lot of time, but to avoid this kind of issues we should implement pagination so that it will fetch only certain amount of records per request.

Screenshots

  1. Fetching all rules at once
    image

  2. Manage Rules button in disable state
    image

Environment (please complete the following information):

  • OS [e.g. iOS]:
  • Browser [e.g. chrome, safari]:
  • Argilla Version [e.g. 1.0.0]:
  • ElasticSearch Version [e.g. 7.10.2]:
  • Docker Image (optional) [e.g. argilla:v1.0.0]:

Additional context
Add any other context about the problem here.

@rhoitjadhav rhoitjadhav added the type: bug Indicates an unexpected problem or unintended behavior label Jan 2, 2023
@rhoitjadhav rhoitjadhav added type: enhancement Indicates new feature requests and removed type: bug Indicates an unexpected problem or unintended behavior labels Jan 9, 2023
@davidberenstein1957
Copy link
Member

@rhoitjadhav wouldn't also be logical to create generalized versions of the rules, whenever possible?

you might be able to generalize some of the rules using wildcard? or by setting up operator like WORD* or WORD~ WORD1 OR WORD2.

@keithCuniah
Copy link
Contributor

It would be interesting to put the loaded rules in a specific vexorm tables (see development in weak labellings)

@frascuchon frascuchon modified the milestones: v1.4.0, v1.5.0 Mar 8, 2023
@frascuchon frascuchon modified the milestones: v1.5.0, v1.6.0 Mar 20, 2023
@Amelie-V Amelie-V changed the title Rules page takes lot of time to load 🍓 Rules page takes lot of time to load Mar 24, 2023
frascuchon added a commit that referenced this issue Apr 9, 2023
##
[1.6.0](v1.6.0...v1.5.1)

### Added

- `ARGILLA_HOME_PATH` new environment variable ([#2564]).
- `ARGILLA_DATABASE_URL` new environment variable ([#2564]).
- Basic support for user roles with `admin` and `annotator` ([#2564]).
- `id`, `first_name`, `last_name`, `role`, `inserted_at` and
`updated_at` new user fields ([#2564]).
- `/api/users` new endpoint to list and create users ([#2564]).
- `/api/users/{user_id}` new endpoint to delete users ([#2564]).
- `/api/workspaces` new endpoint to list and create workspaces
([#2564]).
- `/api/workspaces/{workspace_id}/users` new endpoint to list workspace
users ([#2564]).
- `/api/workspaces/{workspace_id}/users/{user_id}` new endpoint to
create and delete workspace users ([#2564]).
- `argilla.tasks.users.migrate` new task to migrate users from old YAML
file to database ([#2564]).
- `argilla.tasks.users.create` new task to create a user ([#2564]).
- `argilla.tasks.users.create_default` new task to create a user with
default credentials ([#2564]).
- `argilla.tasks.database.migrate` new task to execute database
migrations ([#2564]).
- `release.Dockerfile` and `quickstart.Dockerfile` now creates a default
`argilladata` volume to persist data ([#2564]).
- Add user settings page. Closes
[#2496](#2496)

### Changed

- `ARGILLA_USERS_DB_FILE` environment variable now it's only used to
migrate users from YAML file to database ([#2564]).
- `full_name` user field is now deprecated and `first_name` and
`last_name` should be used instead ([#2564]).
- `password` user field now requires a minimum of `8` and a maximum of
`100` characters in size ([#2564]).
- `quickstart.Dockerfile` image default users from `team` and `argilla`
to `admin` and `annotator` including new passwords and API keys
([#2564]).
- Datasets to be managed only by users with `admin` role ([#2564]).
- The list of rules is now accessible while metrics are computed.
Closes[#2117](#2117)

### Removed

- `email` user field ([#2564]).
- `disabled` user field ([#2564]).
- Support for private workspaces ([#2564]).
- `ARGILLA_LOCAL_AUTH_DEFAULT_APIKEY` and
`ARGILLA_LOCAL_AUTH_DEFAULT_PASSWORD` environment variables. Use `python
-m argilla.tasks.users.create_default` instead ([#2564]).

[#2564]: #2564
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.

4 participants