Skip to content

Commit

Permalink
⚡📝 make ci more robust to installation issues, update README for Mac …
Browse files Browse the repository at this point in the history
…M1 chicps
  • Loading branch information
Henry committed Jun 10, 2024
1 parent 9a3691c commit 98f60f1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,25 @@ jobs:
mkdir runs
papermill 04_1_train_pimms_models.ipynb runs/04_1_train_pimms_models.ipynb
papermill 04_1_train_pimms_models.ipynb runs/04_1_train_pimms_models_no_val.ipynb -p sample_splits False
- name: Run demo workflow (integration test)
- name: Dry-Run demo workflow (integration test)
continue-on-error: true
run: |
cd project
snakemake -p -c1 --configfile config/single_dev_dataset/example/config.yaml -n
- name: Run demo workflow (integration test)
continue-on-error: true
run: |
cd project
snakemake -p -c4 -k --configfile config/single_dev_dataset/example/config.yaml
- name: Run demo workflow again (in case of installation issues)
continue-on-error: true
run: |
cd project
snakemake -p -c1 -n --configfile config/single_dev_dataset/example/config.yaml
snakemake -p -c4 -k --configfile config/single_dev_dataset/example/config.yaml
- name: Run demo workflow again (in case of installation issues) - one thread
run: |
cd project
snakemake -p -c1 --configfile config/single_dev_dataset/example/config.yaml
- name: Archive results
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/workflow_website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ jobs:
cd project
snakemake -s workflow/Snakefile_v2.smk --configfile config/alzheimer_study/config.yaml -p -c4 -k
- name: Run demo workflow again (in case of installation issues)
continue-on-error: true
run: |
cd project
snakemake -s workflow/Snakefile_v2.smk --configfile config/alzheimer_study/config.yaml -p -c4 -k
- name: Run demo workflow again (in case of installation issues) with one thread
continue-on-error: true
run: |
cd project
snakemake -s workflow/Snakefile_v2.smk --configfile config/alzheimer_study/config.yaml -p -c1 -k
- name: Run differential analysis workflow
run: |
cd project
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,24 @@ mamba env create -n pimms -f environment.yml # faster, less then 5mins

If on Mac M1, M2 or having otherwise issue using your accelerator (e.g. GPUs): Install the pytorch dependencies first, then the rest of the environment:

### Install pytorch first (M-chips)
### Install pytorch first

> :warning: We currently see that fastai is not compatible with the M1 chip. M2 chips are working fine.
>
> The ARM architecture seems to cause issues with some packages (fastai and potentiall others).
> :warning: We currently see issues with some installations on M1 chips. A dependency
> for one workflow is polars, which causes the issue. This should be [fixed now](https://github.com/RasmussenLab/njab/pull/13)
> for general use by delayed import
> of `mrmr-selection` in `njab`. If you encounter issues, please open an issue.
Check how to install pytorch for your system [here](https://pytorch.org/get-started).

- select the version compatible with your cuda version if you have an nvidia gpu or a Mac M-chip.

```bash
conda create -n vaep python=3.9 pip
conda activate vaep
conda create -n pimms python=3.9 pip
conda activate pimms
# Follow instructions on https://pytorch.org/get-started:
# CUDA is not available on MacOS, please use default package
# pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
conda install pytorch::pytorch torchvision torchaudio fastai -c pytorch -c fastai
conda install pytorch::pytorch torchvision torchaudio fastai -c pytorch -c fastai -y
pip install pimms-learn
pip install jupyterlab papermill # use run notebook interactively or as a script

Expand Down

0 comments on commit 98f60f1

Please sign in to comment.