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

Define interface between a job and the backend #670

Closed
1 task done
njbrake opened this issue Jan 17, 2025 · 3 comments · Fixed by #692
Closed
1 task done

Define interface between a job and the backend #670

njbrake opened this issue Jan 17, 2025 · 3 comments · Fixed by #692
Assignees
Labels
backend enhancement New feature or request schemas Changes to schemas (which may be public facing)

Comments

@njbrake
Copy link
Contributor

njbrake commented Jan 17, 2025

Motivation

Currently, jobs save a results.json file which is loaded by the backend and saved in the database. In order to add a level of abstraction between the job and the backend, let's split this out into a slightly more enforced interface, where the job saves a parameters, artifacts, and metrics json file with a loosely defined schema. The backend then load these files into pydantic validated classes before saving it to the database.

Alternatives

  1. Do nothing
  2. Instead of multiple json files, save everything into a single results.json file

Contribution

I'll do it!

Have you searched for similar issues before submitting this one?

  • Yes, I have searched for similar issues
@njbrake njbrake added the enhancement New feature or request label Jan 17, 2025
@njbrake njbrake self-assigned this Jan 17, 2025
@njbrake njbrake added backend schemas Changes to schemas (which may be public facing) labels Jan 17, 2025
@njbrake
Copy link
Contributor Author

njbrake commented Jan 17, 2025

During investigation I realized that currently there isn't any interface at all between an evaluation/evaluation_lite job and a backend, because the result.json is passed from the s3 bucket to the frontend without it being opened or validated by the backend. So this here issue I think is blocked until we de-couple the frontend and job artifact file structure, see #678

@ividal
Copy link
Contributor

ividal commented Jan 22, 2025

Note that @javiermtorres had proposed a refactoring of jobs that might be relevant here. Just want to link the 2 of you in case it's useful!

@ividal ividal changed the title [FEATURE]: Define interface between a job and the backend Define interface between a job and the backend Jan 22, 2025
@njbrake
Copy link
Contributor Author

njbrake commented Jan 22, 2025

Note that @javiermtorres had proposed a refactoring of jobs that might be relevant here. Just want to link the 2 of you in case it's useful!

thanks! I think this issue is relevant to that refactor request: #706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request schemas Changes to schemas (which may be public facing)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants