Allow dataset builds to reuse downloaded raw source data - #322
Draft
florian6973 wants to merge 1 commit into
Draft
Allow dataset builds to reuse downloaded raw source data#322florian6973 wants to merge 1 commit into
florian6973 wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a configurable
raw_input_dirtomeds-dev-datasetso users can reuse source data that has already been downloaded.For example:
MIMIC-IV now uses the new
{raw_input_dir}dataset-command placeholder.Motivation
Dataset paths represent two distinct artifacts:
output_diralready controls where the generated MEDS cohort is stored, but dataset recipes currently hard-code raw downloads under{temp_dir}/raw. This makes it difficult to reuse large downloads across runs or separate MEDS-DEV output directories.This is particularly relevant for credentialed datasets such as MIMIC-IV, where downloading the source data can be expensive.
Behavior
raw_input_diris supplied, the dataset ETL receives that path.{temp_dir}/raw.output_dircontinues to identify the MEDS cohort being produced.output_dir/.done, allowing later invocations with the sameoutput_dirto return without rerunning the ETL.do_overwrite=Truecontinues to apply tooutput_dir; it does not remove a separateraw_input_dir.The raw input and output paths should remain separate:
This change does not introduce a new registration mechanism for externally obtained MEDS cohorts. Those can continue to be passed directly as
dataset_dirto task and model commands.Changes
raw_input_dirto the dataset-builder Hydra configuration.{raw_input_dir}when formatting dataset build commands.{temp_dir}/rawfor backward compatibility.Testing
pytest --doctest-modules -m "not integration" -x: 55 passed.pre-commit run --all-files: all hooks passed.devto 81.098%; the number of missing statements remained 148.