Skip to content

Commit

Permalink
Switch to using native traceback (#16851)
Browse files Browse the repository at this point in the history
This PR switches pytest traceback to `native` instead of prettified pytest traceback that takes longer to finish and spits out the source code of the file where the error happens too which is not needed given the time savings.

With pytest traceback:
<img width="1063" alt="Screenshot 2024-09-19 at 2 34 57 PM" src="https://github.com/user-attachments/assets/9658dd5a-eeb9-4ded-8c77-21b71c74d0a5">
<img width="1073" alt="Screenshot 2024-09-19 at 2 35 07 PM" src="https://github.com/user-attachments/assets/b8500e8a-9d7d-4c0d-8b9a-b2546a0741ee">
<img width="1065" alt="Screenshot 2024-09-19 at 2 35 20 PM" src="https://github.com/user-attachments/assets/a7c2925d-f94d-4b74-97a5-e3d2a0ebf36c">

With `native` traceback:
<img width="713" alt="Screenshot 2024-09-19 at 2 34 04 PM" src="https://github.com/user-attachments/assets/e540bc4b-c351-4815-b2dd-dfe4bb491ecb">

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Richard (Rick) Zamora (https://github.com/rjzamora)

URL: #16851
  • Loading branch information
galipremsagar authored Sep 20, 2024
1 parent dc57c1b commit 2676924
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/test_wheel_cudf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ rapids-logger "pytest pylibcudf"
pushd python/pylibcudf/pylibcudf/tests
python -m pytest \
--cache-clear \
--numprocesses=8 \
--dist=worksteal \
.
popd
Expand Down
2 changes: 2 additions & 0 deletions ci/test_wheel_dask_cudf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pushd python/dask_cudf/dask_cudf
DASK_DATAFRAME__QUERY_PLANNING=True python -m pytest \
--junitxml="${RAPIDS_TESTS_DIR}/junit-dask-cudf.xml" \
--numprocesses=8 \
--dist=worksteal \
.
popd

Expand All @@ -50,5 +51,6 @@ pushd python/dask_cudf/dask_cudf
DASK_DATAFRAME__QUERY_PLANNING=False python -m pytest \
--junitxml="${RAPIDS_TESTS_DIR}/junit-dask-cudf-legacy.xml" \
--numprocesses=8 \
--dist=worksteal \
.
popd
1 change: 1 addition & 0 deletions python/cudf/benchmarks/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ python_classes = Bench
python_functions = bench_*
markers =
pandas_incompatible: mark a benchmark that cannot be run with pandas
addopts = --tb=native
1 change: 1 addition & 0 deletions python/cudf/cudf/tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ filterwarnings =
ignore:Passing a BlockManager to DataFrame is deprecated:DeprecationWarning
# PerformanceWarning from cupy warming up the JIT cache
ignore:Jitify is performing a one-time only warm-up to populate the persistent cache:cupy._util.PerformanceWarning
addopts = --tb=native
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
xfail_strict=true
markers=
assert_eq: custom binary asserter for a test
xfail_gold: this test is expected to fail in the gold pass
xfail_cudf_pandas: this test is expected to fail in the cudf_pandas pass
xfail_compare: this test is expected to fail in the comparison pass
addopts = --tb=native
4 changes: 4 additions & 0 deletions python/cudf_kafka/cudf_kafka/tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native
4 changes: 4 additions & 0 deletions python/cudf_polars/tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native
4 changes: 4 additions & 0 deletions python/custreamz/custreamz/tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native
4 changes: 4 additions & 0 deletions python/dask_cudf/dask_cudf/tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native
1 change: 1 addition & 0 deletions python/pylibcudf/pylibcudf/tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ filterwarnings =
error
ignore:::.*xdist.*
ignore:::.*pytest.*
addopts = --tb=native

0 comments on commit 2676924

Please sign in to comment.