Skip to content

Commit

Permalink
Extract task for MIMIC-IV demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilest committed Dec 16, 2024
1 parent 5eb8714 commit 8732fa0
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions demo/workflow.py → demo/extract_task_mimic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#%%
# MEDS_DEV_DEMO_CONDA_ENV = "meds-dev-demo"
MEDS_DEV_DEMO_CONDA_ENV = "meds-dev"
# MEDS_DEV_DEMO_CONDA_ENV = "meds-dev"

#%%
# !conda init bash
Expand All @@ -10,21 +10,13 @@
#%% [markdown]
# Install MEDS-DEV and dependencies

#%%
!pwd
#%%
!git clone https://github.com/mmcdermott/MEDS-DEV.git
!cd ./MEDS-DEV && pip install -e .

#%% [markdown]
# TODO Install any model-related dependencies.

#%% [markdown]
# TODO Install MEDS Evaluation
#%%
# !git clone https://github.com/kamilest/meds-evaluation.git
# !cd ./meds-evaluation && pip install -e .

# %%
MEDS_DEV_PROJECT_ROOT = "."
DATASET_NAME = "MIMIC-IV"
Expand All @@ -37,20 +29,3 @@

# %%
!./MEDS-DEV/src/MEDS_DEV/helpers/extract_task.sh {MEDS_DEV_PROJECT_ROOT} {DATASET_NAME} {TASK_NAME}

# %% [markdown]
# ## Training MEDS-TAB

# %%
!pip uninstall es-aces -y # TODO ???
!pip install meds-tab

# %%
MIMICIV_MEDS_DIR = "./content/meds/"
OUTPUT_TABULARIZATION_DIR="./content/tabularized/"
TASK_DIR="./content/tasks/"
TASK_NAME="in_hospital_3d_los_after_48h"
OUTPUT_MODEL_DIR="./content/output/meds_tab/"

# %%
!meds-tab-describe input_dir={MIMICIV_MEDS_DIR}/data output_dir={OUTPUT_TABULARIZATION_DIR}

0 comments on commit 8732fa0

Please sign in to comment.