Skip to content

Commit

Permalink
fix unittest & whl (#6819)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywgz authored Aug 31, 2022
1 parent d2c20b5 commit cd8671e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ppdet/modeling/tests/test_mstest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ppdet.core.workspace import load_config
from ppdet.engine import Trainer


class TestMultiScaleInference(unittest.TestCase):
def setUp(self):
self.set_config()
Expand Down Expand Up @@ -48,12 +49,13 @@ def test_infer_mstest(self):
tests_img_root = os.path.join(os.path.dirname(__file__), 'imgs')

# input images to predict
imgs = ['coco2017_val2017_000000000139.jpg', 'coco2017_val2017_000000000724.jpg']
imgs = [
'coco2017_val2017_000000000139.jpg',
'coco2017_val2017_000000000724.jpg'
]
imgs = [os.path.join(tests_img_root, img) for img in imgs]
trainer.predict(imgs,
draw_threshold=0.5,
output_dir='output',
save_txt=True)
trainer.predict(
imgs, draw_threshold=0.5, output_dir='output', save_results=False)


if __name__ == '__main__':
Expand Down
2 changes: 2 additions & 0 deletions scripts/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ EGG_DIR="paddledet.egg-info"

CFG_DIR="configs"
TEST_DIR=".tests"
DATA_DIR="dataset"

# command line log config
RED='\033[0;31m'
Expand Down Expand Up @@ -86,6 +87,7 @@ function unittest() {
# make sure installed paddledet is used
mkdir $TEST_DIR
cp -r $CFG_DIR $TEST_DIR
cp -r $DATA_DIR $TEST_DIR
cd $TEST_DIR

if [ $? != 0 ]; then
Expand Down

0 comments on commit cd8671e

Please sign in to comment.