Skip to content

fix(analysis): rerun a job on its own data files - #26

Merged
eprifti merged 1 commit into
mainfrom
fix/rerun-original-files
Nov 26, 2026
Merged

eprifti merged 1 commit into
mainfrom
fix/rerun-original-files

Conversation

@eprifti

@eprifti eprifti commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Problem

POST /analysis/{project}/jobs/{job}/rerun ignored which files the original job used. It took the most recently uploaded file of each role (xtrain, ytrain, xtest, ytest) across all datasets of the project. In a project holding several datasets, for example one per cross-validation split, a rerun trained and tested on different data than the original, and nothing said so.

Found while running a parameter sweep over 30 splits in one project.

Change

  • New _original_job_files(): reads the data paths from the original job's param.yaml (written at launch) and maps them back to the project's DatasetFile rows. The project-membership check stays, and the duplicate-detection hash now uses the original file ids.
  • If the original training files are no longer in the project, the rerun returns 409 ("launch a new run instead") rather than falling back to other files.

Tests

  • test_rerun_uses_the_original_jobs_files: a second dataset is uploaded after the first job; the rerun must use the first job's files and hash.
  • test_rerun_refuses_when_original_files_are_gone: datasets unassigned from the project → 409.

Both fail on the previous code. Backend suite: 563 passed, 6 skipped.

Rerun resolved the project's latest upload of each role instead of the
files the original job used, so in a project with several datasets (e.g.
one per CV split) a rerun silently trained and tested on other data.

The files are now read back from the original job's param.yaml and matched
to the project's dataset files (keeping the project-membership check and
the duplicate-detection hash). If they were removed from the project, the
rerun is refused with 409 instead of switching data.
@eprifti
eprifti merged commit 20e8455 into main Nov 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant