Unverified Commit d30a69bf authored by VoVAllen's avatar VoVAllen Committed by GitHub
Browse files

[Backend] TF backend (#978)

* tf

* add builtin support

* fiix

* pytest

* fix

* fix

* fix some bugs

* fix selecting

* fix todo

* fix test

* fix test fail in tf

* fix

* fix

* fix gather row

* fix gather row

* log backend

* fix gather row

* fix gather row

* fix for pytorch

* fix

* fix

* fix

* fix

* fix

* fix tests

* fix

* fix

* fix

* fix

* fix

* fix

* fix convert

* fix

* fix

* fix

* fix inplace

* add alignment setting

* add debug option

* Revert "add alignment setting"

This reverts commit ec63fb3506ea84fff7d447a1fbdfd1d5d1fb6110.

* tf ci

* fix lint

* fix lint

* add tfdlpack

* fix type

* add env

* fix backend

* fix

* fix tests

* remove one_hot

* remove comment

* remove comment

* fix

* use pip to install all

* fix test

* fix base

* fix

* fix

* add skip

* upgrade cmake

* change version

* change ci

* fix

* fix

* fix

* fix

* fix seg fault

* fix

* fix python version

* fix

* try fix

* fix

* fix

* tf takes longer time in ci

* change py version

* fix

* fix

* fix oom

* change kg env

* change kg env

* 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊

* 我再也不搞各种乱七八糟环境了……

* use pytest

* Chang image
parent cf9ba90f
#!/bin/bash
. /opt/conda/etc/profile.d/conda.sh
KG_DIR="./apps/kg/"
function fail {
......@@ -31,12 +31,12 @@ export DGLBACKEND=$1
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=${PWD}/python:$KG_DIR:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}
conda activate ${DGLBACKEND}-ci
# test
pushd $KG_DIR> /dev/null
python3 -m nose -v --with-xunit tests/test_score.py || fail "run test_score.py on $1"
python3 -m pytest tests/test_score.py || fail "run test_score.py on $1"
if [ "$2" == "cpu" ]; then
# verify CPU training DistMult
......
#!/bin/bash
# The working directory for this script will be "tests/scripts"
. /opt/conda/etc/profile.d/conda.sh
conda activate mxnet-ci
TUTORIAL_ROOT="./tutorials"
function fail {
......
#!/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 {
......@@ -16,7 +18,7 @@ export DGL_DOWNLOAD_DIR=${PWD}
pushd ${TUTORIAL_ROOT} > /dev/null
# Install requirements
pip3 install -r requirements.txt || fail "installing requirements"
pip install -r requirements.txt || fail "installing requirements"
# Test
for f in $(find . -name "*.py" ! -name "*_mx.py")
......
......@@ -14,8 +14,9 @@ SET DGLBACKEND=!BACKEND!
SET DGL_LIBRARY_PATH=!CD!\build
SET DGL_DOWNLOAD_DIR=!CD!
python -m nose -v --with-xunit tests\!DGLBACKEND! || EXIT /B 1
python -m nose -v --with-xunit tests\graph_index || EXIT /B 1
python -m nose -v --with-xunit tests\compute || EXIT /B 1
python -m pip install pytest || EXIT /B 1
python -m pytest -v --junitxml=pytest_backend.xml tests\!DGLBACKEND! || EXIT /B 1
python -m pytest -v --junitxml=pytest_gindex.xml tests\graph_index || EXIT /B 1
python -m pytest -v --junitxml=pytest_compute.xml tests\compute || EXIT /B 1
ENDLOCAL
EXIT /B
#!/bin/bash
. /opt/conda/etc/profile.d/conda.sh
function fail {
echo FAIL: $@
exit -1
......@@ -19,11 +21,15 @@ export DGLTESTDEV=$2
export DGL_LIBRARY_PATH=${PWD}/build
export PYTHONPATH=tests:${PWD}/python:$PYTHONPATH
export DGL_DOWNLOAD_DIR=${PWD}
export TF_FORCE_GPU_ALLOW_GROWTH=true
conda activate ${DGLBACKEND}-ci
python3 -m pytest -v --junitxml=pytest_compute.xml tests/compute || fail "compute"
python3 -m pytest -v --junitxml=pytest_gindex.xml tests/graph_index || fail "graph_index"
python3 -m pytest -v --junitxml=pytest_backend.xml tests/$DGLBACKEND || fail "backend-specific"
python3 -m nose -v --with-xunit tests/compute || fail "compute"
python3 -m nose -v --with-xunit tests/graph_index || fail "graph_index"
python3 -m nose -v --with-xunit tests/$DGLBACKEND || fail "backend-specific"
export OMP_NUM_THREADS=1
if [ $2 != "gpu" ]; then
python3 -m nose -v --with-xunit tests/distributed || fail "distributed"
if [ $2 != "gpu" ] && [ $1 != "tensorflow"]; then
python3 -m pytest -v --junitxml=pytest_distributed.xml tests/distributed || fail "distributed"
fi
def test():
pass
if __name__ == "__main__":
test()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment