argilla icon indicating copy to clipboard operation
argilla copied to clipboard

[BUG-python/deployment] subsequent calls to `/api/v1/metadata-properties/<id>/metrics` are slow

Open davidberenstein1957 opened this issue 1 year ago • 6 comments

Describe the bug When loading the dataset there are subsequent call to the /api/v1/metadata-properties/<id>/metrics-endpoint where the server takes up to 6 seconds to respond, which is too slow to wait with a blank and unresponsive screen.

Stacktrace and Code to create the bug N.A.

Expected behavior I would expect this to be faster

Environment:

  • Argilla Version [e.g. 1.0.0]: 1.18
  • ElasticSearch Version [e.g. 7.10.2]: N.A.
  • Docker Image (optional) [e.g. argilla:v1.0.0]: 1.18

Additional context N.A.

davidberenstein1957 avatar Oct 28 '23 11:10 davidberenstein1957

I would like to talk about this, because i detected this little thing some days ago, and it affects the frontend performance.

damianpumar avatar Oct 28 '23 11:10 damianpumar

Not sure if this will improve the slowness but we can reduce the number of requests to only one creating a new GET /api/v1/datasets/:dataset_id/metadata-properties/metrics returning all the metrics at once.

What do you think @frascuchon ?

jfcalvo avatar Oct 29 '23 08:10 jfcalvo

This is also related to the nature of the data. @davidberenstein1957, Which kind of properties are taking slower? how can we reproduce it?

frascuchon avatar Oct 30 '23 09:10 frascuchon

Hi @frascuchon , I was using the https://huggingface.co/datasets/argilla/text-descriptives-metadata/discussions dataset.

davidberenstein1957 avatar Oct 30 '23 11:10 davidberenstein1957

  • Data fetching too slow, not only for metadata metrics.
  • Spike new way to load the metrics.
  • Understand why the metrics are too slow.
  • Why the metadata-properties does not have the "metrics" why we need to consume other endpoint.
  • Query params to load all metrics in same endpoint?
  • Set metadata properties by default using "metrics" endpoint on initialization step from SDK ?

@davidberenstein1957 @frascuchon @jfcalvo

damianpumar avatar Oct 30 '23 12:10 damianpumar

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Apr 02 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar May 03 '24 01:05 github-actions[bot]