-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from HERA-Team/clean-gpu
Updated vis_gpu API to match vis_cpu
- Loading branch information
Showing
44 changed files
with
3,451 additions
and
1,484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Run Notebooks | ||
|
||
# Test on all pushes, except when the push is literally just a tag (because we | ||
# tag automatically via CI, and therefore there's no extra code in that push). | ||
# Also, only test on pull requests into master/dev. | ||
on: | ||
push: | ||
tags-ignore: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
notebooks: | ||
name: Running Docs Notebooks | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
# Adding -l {0} ensures conda can be found properly in each step | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@main | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Cache conda | ||
uses: actions/cache@v2 | ||
env: | ||
# Increase this value to reset cache if ci/test-env.yml has not changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ matrix.python-version }}-${{ hashFiles('ci/test-env.yml', 'setup.cfg') }} | ||
|
||
- name: Setup Miniconda | ||
uses: conda-incubator/setup-miniconda@v2.1.1 | ||
with: | ||
# auto-update-conda: true | ||
miniconda-version: "latest" | ||
python-version: '3.10' | ||
environment-file: ci/notebook-env.yml | ||
activate-environment: viscpu | ||
channels: conda-forge,defaults | ||
channel-priority: strict | ||
use-only-tar-bz2: true | ||
|
||
- name: Conda Info | ||
run: | | ||
conda info -a | ||
conda list | ||
- name: Install | ||
run: | | ||
echo $(which pip) | ||
pip install .[test] | ||
- name: Install ipykernel | ||
run: python -m ipykernel install --user --name viscpu --display-name "viscpu" | ||
|
||
- name: Run Notebooks | ||
run: | | ||
papermill -k viscpu docs/tutorials/vis_cpu_tutorial.ipynb tmp.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: GPU Tests | ||
|
||
# Test on all pushes, except when the push is literally just a tag (because we | ||
# tag automatically via CI, and therefore there's no extra code in that push). | ||
# Also, only test on pull requests into master/dev. | ||
on: | ||
push: | ||
tags-ignore: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
tests: | ||
env: | ||
ENV_NAME: tests | ||
PYTHON: "3.10" | ||
OS: Ubuntu | ||
name: Self-Hosted Tests (GPU) | ||
runs-on: [self-hosted, gpu] | ||
defaults: | ||
run: | ||
# Adding -l {0} ensures conda can be found properly in each step | ||
shell: bash -l {0} | ||
steps: | ||
- name: Add Home to PATH | ||
run: | | ||
echo "/home/locoadmin/bin" >> $GITHUB_PATH | ||
echo "/usr/local/cuda/bin" >> $GITHUB_PATH | ||
echo "LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | ||
- uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cache conda | ||
uses: actions/cache@v2 | ||
env: | ||
# Increase this value to reset cache if ci/test-env.yml has not changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: | ||
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ env.PYTHON }}-${{ hashFiles('ci/test-env.yml', 'setup.cfg') }} | ||
|
||
- name: Setup Miniconda | ||
uses: conda-incubator/setup-miniconda@v2.1.1 | ||
with: | ||
# auto-update-conda: true | ||
miniconda-version: "latest" | ||
python-version: ${{ env.PYTHON }} | ||
environment-file: ci/test-env.yml | ||
activate-environment: tests | ||
channels: conda-forge,defaults | ||
channel-priority: strict | ||
use-only-tar-bz2: true | ||
|
||
- name: Conda Info | ||
run: | | ||
conda info -a | ||
conda list | ||
PYVER=`python -c "import sys; print('{:d}.{:d}'.format(sys.version_info.major, sys.version_info.minor))"` | ||
if [[ $PYVER != $PYTHON ]]; then | ||
exit 1; | ||
fi | ||
- name: Install | ||
run: | | ||
echo $(which pip) | ||
pip install .[test,gpu] | ||
- name: Run Tests | ||
run: | | ||
python -m pytest --cov=vis_cpu --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --log-cli-level=DEBUG | ||
- uses: codecov/codecov-action@v2 | ||
if: success() | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true | ||
file: ./coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: viscpu | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- mpi4py>=3.0 # Required here so that we get | ||
- astropy>=4 | ||
- numpy>=1.20 | ||
- scipy>=1.6 | ||
- pip>=21.1 | ||
- pytest>=6.2.4 | ||
- pytest-cov>=2.11.1 | ||
- matplotlib>=3.3.4 | ||
- ipython>=7.22 | ||
- h5py>=3.2 | ||
- ffmpeg | ||
- pyuvdata # For testing when using UVBeam object | ||
- jupyter | ||
- ipykernel | ||
- papermill | ||
- pip: | ||
- pyuvsim[sim]>=1.2 | ||
- pyradiosky>=0.1.1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.