Skip to content

Commit

Permalink
[Data] Log full tracebacks in tests (#46101)
Browse files Browse the repository at this point in the history
#43251 added a feature where Ray Data doesn't print internal stack traces to make errors easier to read for users. However, this information is useful for development, so this PR disables the feature in CI.

Signed-off-by: Balaji Veeramani <[email protected]>
  • Loading branch information
bveeramani authored Jul 19, 2024
1 parent 6b1fc0a commit a5c9760
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/data/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def handle_trace(*args, **kwargs):
# via DataContext, or when the Ray Debugger is enabled.
# The full stack trace will always be emitted to the Ray Data log file.
log_to_stdout = DataContext.get_current().log_internal_stack_trace_to_stdout
if _is_ray_debugger_enabled() or log_to_stdout:
if _is_ray_debugger_enabled():
logger.exception("Full stack trace:")
raise e

Expand Down
5 changes: 5 additions & 0 deletions python/ray/data/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,3 +775,8 @@ def _assert(last_snapshot):
)

return last_snapshot


@pytest.fixture(autouse=True, scope="function")
def log_internal_stack_trace_to_stdout(restore_data_context):
ray.data.context.DataContext.get_current().log_internal_stack_trace_to_stdout = True

0 comments on commit a5c9760

Please sign in to comment.