Skip to content

Commit

Permalink
Merge pull request #29 from mmcdermott/reusable_interface
Browse files Browse the repository at this point in the history
Making the interface re-usable and importable.
  • Loading branch information
mmcdermott authored Jul 16, 2024
2 parents ff1f6c4 + b44f315 commit 38eb09d
Show file tree
Hide file tree
Showing 56 changed files with 1,558 additions and 1,348 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,14 @@ To use either of these, you need to install additional optional dependencies:
files. Similar to task configuration files, but for models.
2. Figure out how to ensure that each pre-processing step reads from the right prior files. Likely need some
kind of a "prior stage name" config variable.
## Notes:
You can overwrite the `stages` parameter on the command line to run a dynamic pipeline with just a subset of
options (the `--cfg job --resolve` is just to make hydra show the induced, resolved config instead of trying
to run anything):
```bash
MEDS_polars_functions on  reusable_interface [$⇡] is 󰏗 v0.0.1 via  v3.12.4 via  MEDS_fns
❯ ./src/MEDS_polars_functions/scripts/preprocessing/normalize.py input_dir=foo cohort_dir=bar 'stages=["normalize", "tensorize"]' --cfg job --resolve
```
89 changes: 0 additions & 89 deletions configs/extraction.yaml

This file was deleted.

69 changes: 0 additions & 69 deletions configs/preprocess.yaml

This file was deleted.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -16,7 +16,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = ["polars", "pyarrow", "nested_ragged_tensors", "loguru", "hydra-core", "numpy"]
dependencies = ["polars>=1.1.0", "pyarrow", "nested_ragged_tensors", "loguru", "hydra-core", "numpy"]

[project.optional-dependencies]
examples = ["rootutils"]
Expand All @@ -25,6 +25,13 @@ tests = ["pytest", "pytest-cov", "rootutils"]
local_parallelism = ["hydra-joblib-launcher"]
slurm_parallelism = ["hydra-submitit-launcher"]

[project.scripts]
MEDS_extract-split_and_shard_patients = "MEDS_polars_functions.extraction.split_and_shard_patients:main"
MEDS_extract-shard_events = "MEDS_polars_functions.extraction.shard_events:main"
MEDS_extract-convert_to_sharded_events = "MEDS_polars_functions.extraction.convert_to_sharded_events:main"
MEDS_extract-merge_to_MEDS_cohort = "MEDS_polars_functions.extraction.merge_to_MEDS_cohort:main"
MEDS_transform-aggregate_code_metadata = "MEDS_polars_functions.aggregate_code_metadata:main"

[project.urls]
Homepage = "https://github.com/mmcdermott/MEDS_polars_functions"
Issues = "https://github.com/mmcdermott/MEDS_polars_functions/issues"
89 changes: 0 additions & 89 deletions scripts/extraction/collect_code_metadata.py

This file was deleted.

95 changes: 0 additions & 95 deletions scripts/extraction/convert_to_sharded_events.py

This file was deleted.

Loading

0 comments on commit 38eb09d

Please sign in to comment.