-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Display insight / predictions etc for a product or a particular filter #618
Comments
yeah, its good to have an html page that shows all predictions/insights . It could be also used to show the recent updates and changes in the system |
I am interested to work on this issue, if no one is currently working on it |
No let's go @ram690514 I think it's a good issue to start with ! |
Hey @alexgarel , is ram working on this, if not I can take it up, I will be able to manage all the insights and prediction stuff, just would need help at the last to post it in HTML. |
I don't think @ram690514 is currently working on this. I think the best is to have the data as json + as html on another endpoint (the html view can just exploit the same method to get data and build the html) Here are the point from most difficult to least difficult (you can start doing them incrementally and submit the PR as draft). For the json:
For the html, you should find a way to present it all (sortable table ? Should we use vuejs ? Maybe @alexfauquette has a though on this). It would be better to be able to filter on the type. |
@alexgarel Is that what you want? https://hunger.openfoodfacts.org/insights# If you click on a code (not the eye or the pen) you will filter by code The associated request to robotoff: |
Thanks @alexgarel I will work it on and get back to u, if any queries. |
Alex, I am not able to understand what exactly is the output required, should I be working on the data extraction from the link that [Alexandre Fauquette] commented ? |
I think the first part is to be done first. Create a new API route that return a json with
So it's all about doing right request in the database and putting info in nested dicts. (and the https://robotoff.openfoodfacts.org/api/v1/insights?barcode=4026913121706&page=1&count=25 api is a good starting point) For the second part, it should be done in hungergame, completing what is already done to add those new data (prediction, logo annotation, image prediction) --> we should open a new ticket. |
I completely changes the ticket description, I think going for separate api is more simple and more compatible with what exists in hungergame. So please refer to current ticket description. |
Comment to @Jagrutiti (already told on slack) In image list (ImageCollection)
The only other filter you can put there is the barcode |
Let's move to ImagePredictionCollection ! This is the same pattern as with ImageCollection.
Should be really the same id as for ImageCollection. |
Next is LogoAnnotationCollection It's the same thing, with as previous view but for LogoAnnotation:
|
We identified with @Jagrutiti that we have to:
|
@alexfauquette I verified, we have pagination on all those APIs, thanks to @Jagrutiti 😎 But we forgot to add the documentation ! Opened #896 for that… |
This issue is finished :-) thank @Jagrutiti 🎉 |
What
Proposed solution
Also which were applied, when etc.
But we would like to add predictions and all things related to images.
Add apis akin to
/api/v1/insights
(ProductInsightResource), with compatible filters (on product and type) for:The idea would be to use those APIs to append more tables in hunger game to have a complete view of why robotoff is predicting something.
Also add those filters to specific views:
Those filters will avoid repeating informations that are already in ImagePrediction or LogoAnnontation in hunger game.
The text was updated successfully, but these errors were encountered: