-
Notifications
You must be signed in to change notification settings - Fork 19
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
Backend should return results data in a task agnostic format for frontend consumption #678
Comments
I think @george-mzai is the right person to ask about what he needs the new file to contain so that he can access everything he needs to display the content? I'm thinking that this restructure will make your life on the frontend much easier, but let me know if that's not the case 😆 I think @peteski22 may be the right person to pull in to ask about whether this API makes sense from the backend perspective? Right now as I understand it, the backend doesn't do any validation of the artifact I think @ividal or @veekaybee or @aittalam may be the ones to comment about whether this makes sense to alter the job output to conform to this output? |
My 2 cents, this makes perfect sense. Two upcoming bigger bodies of work will be:
We just need to keep an eye out on how we show experiments that contain different sets of metrics (e.g. once we have summarization, translation, etc.). |
I think having task-agnostic visualization of results will help a lot with generalizing our evals! What'd be the best place to store this mapping information?
WDYT? |
Thank you for the feedback! You made good points that I hadn't considered. It sounds like:
With this in mind, it seems like the design I propose in the original post on this thread is mostly good, with the exception that I shouldn't add that |
Motivation
I believe this is also a relevant issue for the task that @HareeshBahuleyan is working on:
As I understand it currently, the metric names and settings are hardcoded into the frontend, e.g. https://github.com/mozilla-ai/lumigator/blob/main/lumigator/frontend/src/components/molecules/LExperimentResults.vue#L69
As we support new metrics and custom user metrics in the future, I'm thinking that the frontend should be able to remain ignorant about what the specific metric is.
In order to support this, I think we need to restructure the file whose path we provide to the frontend, which relates to #670.
Currently, the file that the eval job creates and saves to S3 (which then the backend creates a presigned url so that the frontend can download the file) looks like this:
Can we re-org this to something that looks more like
This would be the first step towards a more structured output. As I understand it, the backend is agnostic about what is in the output result.json from a job, and the frontend relies upon the job to create the result.json in the right format. My thought was that it would help if the backend was responsible for ensuring that the job output conforms to the standards that the frontend requires.
I think(?) this should help to make our code more flexible to handle new tasks.
In order to make this backwards compatible at first, we can overhaul each job to save both the existing result.json file in addition to a new file that conforms to our new agreed upon format. This way we don't need to as tightly coordinate the backend with frontend changes.
Alternatives
This is more of an incremental step. We could try to take a more massive bite and try to completely overhaul how files are saved and provided to the frontend, for example, saving and providing 3+ files to the frontend instead of the single results.json.
Contribution
Happy to help work on this if this direction sounds good.
Have you searched for similar issues before submitting this one?
The text was updated successfully, but these errors were encountered: