Skip to content

Add JSON artifact reader for inference #87

Add JSON artifact reader for inference

Add JSON artifact reader for inference #87

Workflow file for this run

name: Check Models
on:
push:
branches:
- main
paths:
- 'flexynesis/**'
- '.github/workflows/models.yml'
- './pyproject.toml'
- './manifest.scm'
- './guix.scm'
pull_request:
branches:
- main
paths:
- 'flexynesis/**'
- '.github/workflows/models.yml'
- 'pyproject.toml'
- 'manifest.scm'
- 'guix.scm'
jobs:
run_package:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"] # Exclude 3.14 due to qdldl build failure
runs-on: ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install OpenMP (macOS only)
if: runner.os == 'macOS'
run: brew install libomp
- name: Install my package from source
run: python -m pip install -e .
- name: Download dataset1
run: |
curl -L -o dataset1.tgz https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis-benchmark-datasets/dataset1.tgz
tar -xzvf dataset1.tgz
- name: Download dataset2
run: |
curl -L -o dataset2.tgz https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis-benchmark-datasets/dataset2.tgz
tar -xzvf dataset2.tgz
- name: Download LGG_GBM_dataset
run: |
curl -L -o lgggbm_tcga_pub_processed.tgz https://bimsbstatic.mdc-berlin.de/akalin/buyar/flexynesis-benchmark-datasets/lgggbm_tcga_pub_processed.tgz
tar -xzvf lgggbm_tcga_pub_processed.tgz
- name: Run DirectPred
shell: bash -l {0}
run: |
flexynesis --data_path dataset1 --model_class DirectPred --target_variables Erlotinib --fusion_type early --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types gex,cnv --outdir . --prefix erlotinib_direct --early_stop_patience 3 --use_loss_weighting False
flexynesis --pretrained_model erlotinib_direct.final_model.pth --artifacts erlotinib_direct.artifacts.joblib --data_path_test dataset1/test --target_variables Erlotinib
- name: Run DirectPred_TestSurvival
shell: bash -l {0}
run: |
flexynesis --data_path lgggbm_tcga_pub_processed --model_class DirectPred --target_variables STUDY --fusion_type intermediate --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types mut,cna --outdir . --prefix lgg_surv --early_stop_patience 3 --use_loss_weighting False --surv_event_var OS_STATUS --surv_time_var OS_MONTHS
flexynesis --pretrained_model lgg_surv.final_model.pth --artifacts lgg_surv.artifacts.joblib --data_path_test lgggbm_tcga_pub_processed/test --target_variables STUDY,OS_STATUS
- name: Run DirectPred_TestCovariates
shell: bash -l {0}
run: |
flexynesis --data_path lgggbm_tcga_pub_processed --model_class DirectPred --target_variables STUDY --fusion_type intermediate --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types mut --outdir . --prefix lgg_surv --early_stop_patience 3 --use_loss_weighting False --covariates BCR_STATUS
flexynesis --pretrained_model lgg_surv.final_model.pth --artifacts lgg_surv.artifacts.joblib --data_path_test lgggbm_tcga_pub_processed/test --target_variables STUDY
- name: Run DirectPred_Test_Explainers
shell: bash -l {0}
run: |
flexynesis --data_path lgggbm_tcga_pub_processed --model_class DirectPred --target_variables STUDY --fusion_type intermediate --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types mut --outdir . --prefix lgg_surv --early_stop_patience 3 --use_loss_weighting False --feature_importance_method Both
flexynesis --pretrained_model lgg_surv.final_model.pth --artifacts lgg_surv.artifacts.joblib --data_path_test lgggbm_tcga_pub_processed/test --target_variables STUDY
- name: Run supervised_vae
shell: bash -l {0}
run: |
flexynesis --data_path dataset1 --model_class supervised_vae --target_variables Erlotinib,Crizotinib --fusion_type early --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types gex,cnv --outdir . --prefix erlotinib_svae --early_stop_patience 3 --use_loss_weighting True
flexynesis --pretrained_model erlotinib_svae.final_model.pth --artifacts erlotinib_svae.artifacts.joblib --data_path_test dataset1/test --target_variables Erlotinib,Crizotinib
- name: Run CrossModalPred
shell: bash -l {0}
run: |
flexynesis --data_path dataset1 --model_class CrossModalPred --target_variables Erlotinib --fusion_type intermediate --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types gex,cnv --input_layers gex --output_layers cnv --outdir . --prefix erlotinib_crossmodal --early_stop_patience 3 --use_loss_weighting True
flexynesis --pretrained_model erlotinib_crossmodal.final_model.pth --artifacts erlotinib_crossmodal.artifacts.joblib --data_path_test dataset1/test --target_variables Erlotinib
- name: Run MultiTripletNetwork
shell: bash -l {0}
run: |
flexynesis --data_path dataset2 --model_class MultiTripletNetwork --target_variables y --fusion_type early --hpo_iter 1 --features_min 50 --features_top_percentile 5 --log_transform False --data_types gex,meth --outdir . --prefix msi_triplet --early_stop_patience 3
flexynesis --pretrained_model msi_triplet.final_model.pth --artifacts msi_triplet.artifacts.joblib --data_path_test dataset2/test --target_variables y
- name: Run GNN
shell: bash -l {0}
run: |
export FLEXYNESIS_CACHE=./dataset1
flexynesis --data_path dataset1 --model_class GNN --target_variables Erlotinib --fusion_type intermediate --hpo_iter 1 --features_top_percentile 10 --log_transform False --data_types gex --outdir . --prefix erlotinib_gnn --early_stop_patience 3 --use_loss_weighting False --subsample 50
flexynesis --pretrained_model erlotinib_gnn.final_model.pth --artifacts erlotinib_gnn.artifacts.joblib --data_path_test dataset1/test --target_variables Erlotinib