Skip to content

Commit

Permalink
test XPARL_igonre_core
Browse files Browse the repository at this point in the history
  • Loading branch information
rical730 committed Apr 19, 2024
1 parent 6c17d7b commit 7fbfc99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 82 deletions.
77 changes: 0 additions & 77 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ on:

jobs:

CheckStyle:
name: CheckStyle
runs-on: ubuntu-20.04
steps:
- name: Checkout PR code
uses: actions/checkout@v3

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Check Style
run: |
ls
pwd
cat .github/workflows/*.yml
bash .teamcity/action_build.sh check_style
PaddleTest:
name: UnitTest for Paddle
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -53,61 +34,3 @@ jobs:
- name: Run Paddle tests
run: |
bash .teamcity/action_build.sh test_paddle
TorchTest:
name: UnitTest for Troch
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checkout PR code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Package
run: |
sudo apt-get update
sudo apt-get install -y cmake
sudo apt-get install -y libgflags-dev libunwind-dev libgoogle-glog-dev libomp-dev unzip
sudo apt-get install -y libgtest-dev && cd /usr/src/gtest && sudo mkdir build && cd build && sudo cmake ..
sudo make && ls -l lib && sudo cp lib/libgtest*.a /usr/local/lib
md5sum /usr/src/googletest/googletest/build/lib/*.a && md5sum lib/*.a
- name: Run Torch tests
run: |
bash .teamcity/action_build.sh test_torch
ExampleTest:
name: Test for Examples
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]

steps:
- name: Checkout PR code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Package
run: |
sudo apt-get update
sudo apt-get install -y cmake
sudo apt-get install -y libgflags-dev libunwind-dev libgoogle-glog-dev libomp-dev unzip
sudo apt-get install -y libgtest-dev && cd /usr/src/gtest && sudo mkdir build && cd build && sudo cmake ..
sudo make && ls -l lib && sudo cp lib/libgtest*.a /usr/local/lib
md5sum /usr/src/googletest/googletest/build/lib/*.a && md5sum lib/*.a
- name: Run Example tests
run: |
bash .teamcity/action_build.sh example
8 changes: 4 additions & 4 deletions .teamcity/action_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ function run_all_test_with_paddle {
# pip install paddlepaddle==2.3.1 -f https://www.paddlepaddle.org.cn/whl/linux/openblas/noavx/stable.html --no-index --no-deps

run_test_with_cpu
# run_test_with_cpu "DIS_TESTING_SERIALLY" # TODO: raise Timeout Error
run_test_with_cpu "DIS_TESTING_REMOTE"
xparl stop
python -m pip uninstall -r .teamcity/requirements.txt -y
# # run_test_with_cpu "DIS_TESTING_SERIALLY" # TODO: raise Timeout Error
# run_test_with_cpu "DIS_TESTING_REMOTE"
# xparl stop
# python -m pip uninstall -r .teamcity/requirements.txt -y
}

function run_all_test_with_torch {
Expand Down
2 changes: 1 addition & 1 deletion parl/utils/tests/not_import_dl_framework_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_import(self):
# remove the environment vaiable and reimport the lib
del os.environ['XPARL_igonre_core']
importlib.reload(parl)
#self.assertTrue('paddle' in sys.modules)
self.assertTrue('paddle' in sys.modules)

if __name__ == '__main__':
unittest.main()

0 comments on commit 7fbfc99

Please sign in to comment.