Skip to content

Commit

Permalink
save test
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Aug 13, 2023
1 parent f5085a6 commit 737cbd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ jobs:
with:
name: video-processor-coverage
path: ./coverage.xml

- name: Commit formatted changes
run: ./scripts/commit-and-push.sh "[CI] update test"

test-engine-and-interface:
name: Test Engine and Interface
Expand Down
8 changes: 4 additions & 4 deletions tests/video_processor/steps/test_detection_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def test_detection_3d():
det_result = FromDetection2DAndRoad.get(output)
assert det_result is not None

# with open(os.path.join(OUTPUT_DIR, f'FromDetection2DAndRoad--{name}.json'), 'w') as f:
# json.dump([(d[0].cpu().numpy().tolist(), d[1], d[2]) for d in det_result], f, indent=1)
# with open(os.path.join(OUTPUT_DIR, f'FromDetection2DAndRoad--{name}.pkl'), 'wb') as f:
# pickle.dump([(d[0].cpu(), d[1], d[2]) for d in det_result], f)
with open(os.path.join(OUTPUT_DIR, f'FromDetection2DAndRoad--{name}.json'), 'w') as f:
json.dump([(d[0].cpu().numpy().tolist(), d[1], d[2]) for d in det_result], f, indent=1)
with open(os.path.join(OUTPUT_DIR, f'FromDetection2DAndRoad--{name}.pkl'), 'wb') as f:
pickle.dump([(d[0].cpu(), d[1], d[2]) for d in det_result], f)

with open(os.path.join(OUTPUT_DIR, f'FromDetection2DAndRoad--{name}.pkl'), 'rb') as f:
det_groundtruth = pickle.load(f)
Expand Down

0 comments on commit 737cbd2

Please sign in to comment.