Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datasets] Fix sort nightly test to skip stats() if exception is raised #32329

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion release/nightly_tests/dataset/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ def make_block(count: int, num_columns: int) -> Block:
num_columns=1,
)
exc = None
ds_stats = None
try:
if args.shuffle:
ds = ds.random_shuffle()
else:
ds = ds.sort(key="c_0")
ds.fully_executed()
ds_stats = ds.stats()
except Exception as e:
exc = e
pass
Expand All @@ -143,7 +145,8 @@ def make_block(count: int, num_columns: int) -> Block:
print(traceback.format_exc())
print("")

print(ds.stats())
if ds_stats is not None:
print(ds_stats)

if "TEST_OUTPUT_JSON" in os.environ:
out_file = open(os.environ["TEST_OUTPUT_JSON"], "w")
Expand Down