huggingface / dataset-viewer

Lightweight web API for visualizing and exploring any dataset - computer vision, speech, text, and tabular - stored on the Hugging Face Hub
https://huggingface.co/docs/datasets-server
Apache License 2.0
640 stars 65 forks source link

Add `started_at` field to cached response documents #2908

Closed polinaeterna closed 1 day ago

polinaeterna commented 3 weeks ago

Will close https://github.com/huggingface/dataset-viewer/issues/2892

To pass started_at field from Job to CachedResponse, I updated JobInfo class so that it stores started_at info too. It is None by default (and set to actual time by Queue._start_newest_job_and_delete_others()). Maybe there is better way to pass this information? I think alternatively I can get a new timestamp inside worker's Loop.process_next_job and pass it to finish to avoid changing dtos, but I don't know if it's better.

polinaeterna commented 1 day ago

closing in favor of https://github.com/huggingface/dataset-viewer/pull/2967