Skip to content

Commit

Permalink
Update testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nnn911 committed Apr 29, 2024
1 parent bf94a70 commit 0b93578
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 17 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest] #, macos-latest, windows-latest]
python-version: ["3.8"] #, "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
Expand All @@ -31,11 +31,27 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
check-latest: true
- name: Install python dependencies
- name: setup mamba
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: ovito_test
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
- name: Install python dependencies conda
shell: bash -el {0}
if: matrix.os == 'macos-latest'
run: |
mamba install -y -c conda-forge pytest
mamba install -y --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito
mamba install -y pytorch pytorch -c pytorch -c conda-forge
else:
run: |
mamba install -y -c conda-forge pytest
mamba install -y --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito
mamba install -y pytorch pytorch-cuda=12.1 -c pytorch -c nvidia -c conda-forge
- name: Install python dependencies pip
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install --pre ovito
python -m pip install .
- name: Test with pytest
run: |
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ The modifier can be found under the label "Denoise particle positions" in the OV
![Score-based denoising](examples/fcc_gb_example_comparison.png)

## Installation

> [!IMPORTANT]
> This approach might not work depending on your plattform
> Please use conda if you encounter any issues
- OVITO Pro [integrated Python interpreter](https://docs.ovito.org/python/introduction/installation.html#ovito-pro-integrated-interpreter):
```
ovitos -m pip install --user git+https://github.com/ovito-org/ScoreBasedDenoising.git
Expand All @@ -45,23 +50,23 @@ On Mac, the `mps` backend will also be presented. This is mostly for future proo

On other platforms you can install the cuda accelelerated versions of PyTorch and PyG yourself. At this point, you should be able to select `cuda` in the modifier device selection to run model inference on GPU.

### Conda (Micromamba) + cuda on Windows 11 install example
### Conda + cuda on Windows 11 example

```
micromamba create -n denoise -c conda-forge python=3.10
micromamba activate denoise
micromamba install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito==3.9.1
micromamba install pytorch pytorch-cuda=11.8 -c pytorch -c nvidia -c conda-forge
micromamba install pyg -c pyg -c conda-forge
micromamba install -c conda-forge ase pandas e3nn
conda create -n denoise -c conda-forge python=3.10
conda activate denoise
conda install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito==3.10.5
conda install install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia -c conda-forge
conda install pyg -c pyg -c conda-forge
conda install -c conda-forge ase pandas e3nn
pip install git+https://github.com/nnn911/ScoreBasedDenoising.git
```

## Technical information / dependencies
Tested on:
- OVITO == 3.9.1
- torch == 1.11.0 | 2.0.1
- torch-geometric == 2.0.4 | 2.3.1
Tested on (using conda):
- OVITO == 3.10.5
- torch == 2.2.2
- torch-geometric == 2.5.3

## Contact
Daniel Utt [email protected]

0 comments on commit 0b93578

Please sign in to comment.