项目文件夹

文件
Da Zheng b1628f2398 [Tutorial] Distributed node classification. (#2969)
* add init version.

* fix build.

* fix format.

* fix.

* fix.

* fix format.

* update README.

* avoid running CI on distributed training tutorials.

* Update tutorials/dist/1_node_classification.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>

* fix.

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-06-04 21:50:16 +08:00

31 行
687 B
Bash

#!/bin/bash
# The working directory for this script will be "tests/scripts"
. /opt/conda/etc/profile.d/conda.sh
conda activate pytorch-ci
TUTORIAL_ROOT="./tutorials"
function fail {
echo FAIL: $@
exit -1
}
export MPLBACKEND=Agg
export DGLBACKEND=pytorch
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=${PWD}/python:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}
pushd ${TUTORIAL_ROOT} > /dev/null
# Install requirements
pip install -r requirements.txt || fail "installing requirements"
# Test
for f in $(find . -path ./dist -prune -false -o -name "*.py" ! -name "*_mx.py")
do
echo "Running tutorial ${f} ..."
python3 $f || fail "run ${f}"
done
popd > /dev/null