-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix bugs * fix torch backend pytest bugs * update * update * add `Github Action` and update file name * add `gspmm` func * update * [Model] Update Examples * [Model] Update examples --------- Co-authored-by: BuptTab <[email protected]> Co-authored-by: dddg617 <[email protected]>
- Loading branch information
1 parent
c13439c
commit eaa51ac
Showing
75 changed files
with
724 additions
and
466 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build and Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
|
||
- name: Checkout master and HEAD | ||
run: | | ||
git checkout ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r .circleci/requirements.txt | ||
- name: Install TensorLyaerX | ||
run: | | ||
pip install git+https://github.com/dddg617/TensorLayerX.git@nightly | ||
- name: Install PyTorch, torchvision and torchaudio | ||
run: | | ||
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121 | ||
- name: Install llvmlite | ||
run: | | ||
pip install llvmlite | ||
- name: Install package | ||
run: | | ||
python setup.py install build_ext --inplace | ||
- name: Run TF tests | ||
run: | | ||
TL_BACKEND=tensorflow pytest | ||
- name: Run TH tests | ||
run: | | ||
TL_BACKEND=torch pytest |
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,73 @@ | ||
name: Test Pypi Package | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
test-pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r .circleci/requirements.txt | ||
- name: Install TensorLayerx | ||
run: | | ||
pip install git+https://github.com/dddg617/TensorLayerX.git@nightly | ||
- name: Install PyTorch, torchvision and torchaudio | ||
run: | | ||
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121 | ||
- name: Install llvmlite | ||
run: | | ||
pip install llvmlite | ||
- name: Install package | ||
run: | | ||
pip install gammagl | ||
- name: Run Trainer Examples | ||
run: | | ||
FAILURES="" | ||
FILES=$(find examples/ -type f -name "*_trainer.py") | ||
for file in $FILES; do | ||
python "$file" --n_epoch 1 || FAILURES="$FAILURES$file " | ||
done | ||
if [ -n "$FAILURES" ]; then | ||
echo "The following trainer scripts failed: $FAILURES" | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
||
- name: Run Sampler Examples | ||
run: | | ||
FAILURES="" | ||
FILES=$(find examples/ -type f -name "*_sampler.py") | ||
for file in $FILES; do | ||
python "$file" || FAILURES="$FAILURES$file " | ||
done | ||
if [ -n "$FAILURES" ]; then | ||
echo "The following sampler scripts failed: $FAILURES" | ||
exit 1 | ||
fi | ||
shell: bash | ||
|
||
- name: Check for Failures | ||
run: | | ||
if [ -n "$FAILURES" ]; then | ||
echo "Some examples failed to run: $FAILURES" | ||
exit 1 | ||
fi | ||
shell: bash |
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
Oops, something went wrong.