Views
No views yet
| File | Contents |
|---|---|
pretrained_decoder.pt | Decoder pretrained to predict the next clinical event code |
best_model.pt | Full decoder and multi-label classification head selected by validation mean average precision |
Research use only. This model is not a medical device or clinical decision-support system. Its outputs must not be used to diagnose, treat, or make decisions about patients.
state_dict checkpoints saved with torch.save(model.state_dict(), ...). They are not Hugging Face Transformers AutoModel checkpoints and cannot be loaded with AutoModel.from_pretrained() or the hosted inference widget.1git clone <git@github.com:Salma-Jamal/Forecasting_Future_Conditions.git>
2
3python -m venv .venv
4source .venv/bin/activate
5python -m pip install --upgrade pip
6python -m pip install torch pandas numpy scikit-learn tqdm huggingface_hubSalmaJamal/Forecasting_Future_Conditions1from huggingface_hub import hf_hub_download
2
3repo_id = "SalmaJamal/Forecasting_Future_Conditions"
4
5best_model_path = hf_hub_download(
6 repo_id=repo_id,
7 filename="best_model.pt",
8)
9pretrained_decoder_path = hf_hub_download(
10 repo_id=repo_id,
11 filename="pretrained_decoder.pt",
12)
13
14print(best_model_path)
15print(pretrained_decoder_path)1hf download SalmaJamal/Forecasting_Future_Conditions \
2 best_model.pt pretrained_decoder.pt \
3 --local-dir ./checkpointspretrained_decoder.pt to initialize fine-tuning:1python run.py \
2 --data-dir ./data \
3 --output-dir ./outputs/finetune \
4 --skip-pretrain \
5 --pretrain-ckpt ./checkpoints/pretrained_decoder.pt1data/
2├── patient_splits.csv
3├── target_conditions.csv
4├── test_anchors.csv # optional
5├── train_val/
6│ ├── patients.csv
7│ ├── encounters.csv
8│ ├── conditions.csv
9│ ├── observations.csv
10│ ├── medications.csv
11│ ├── procedures.csv
12│ ├── immunizations.csv
13│ └── careplans.csv
14└── test/
15 └── ...same table names...patient_splits.csv requires Id and split columns. target_conditions.csv requires a CODE column. Event tables use PATIENT, CODE, and their source-specific date column. See the source project's README for the complete schema.