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] Print out Dataset statistics automatically after execution #29876

Merged
merged 13 commits into from
Nov 4, 2022

Conversation

scottjlee
Copy link
Contributor

@scottjlee scottjlee commented Oct 31, 2022

Why are these changes needed?

Currently, the stats can only be printed manually via the Dataset.stats() method from user side. This is inconvenient during debugging as it adds overhead on the user side. We add functionality to automatically log Dataset summary statistics after execution of each stage, which can be enabled via a new configuration in DatasetContext, enable_auto_log_stats.

Related issue number

Closes #29560

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@scottjlee scottjlee changed the title add context config and initial stats print attempt [WIP] Print out Dataset statistics automatically after execution Oct 31, 2022
@c21 c21 changed the title [WIP] Print out Dataset statistics automatically after execution [WIP][Datasets] Print out Dataset statistics automatically after execution Oct 31, 2022
@c21
Copy link
Contributor

c21 commented Oct 31, 2022

Congrats @scottjlee for the first PR!

As discussed offline, let's do several things:

  • Fill in PR's description
  • Add unit test in test_stats.py
  • Format code with scripts/format.sh under main project before submitting

@c21 c21 self-assigned this Oct 31, 2022
bveeramani and others added 6 commits November 1, 2022 14:02
Signed-off-by: Scott Lee <[email protected]>
Signed-off-by: Scott Lee <[email protected]>
Signed-off-by: Scott Lee <[email protected]>
Signed-off-by: Scott Lee <[email protected]>
@scottjlee scottjlee changed the title [WIP][Datasets] Print out Dataset statistics automatically after execution [Datasets] Print out Dataset statistics automatically after execution Nov 1, 2022
Copy link
Contributor

@c21 c21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @scottjlee! This looks quite solid.

python/ray/data/_internal/stats.py Outdated Show resolved Hide resolved
python/ray/data/_internal/stats.py Outdated Show resolved Hide resolved
python/ray/data/_internal/plan.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
Copy link
Contributor

@c21 c21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@clarkzinzow clarkzinzow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, just a few nits!

python/ray/data/_internal/stats.py Outdated Show resolved Hide resolved
python/ray/data/_internal/stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
python/ray/data/tests/test_stats.py Outdated Show resolved Hide resolved
Copy link
Contributor

@clarkzinzow clarkzinzow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@clarkzinzow
Copy link
Contributor

CI looks good, merging!

@clarkzinzow clarkzinzow merged commit 6024ef1 into ray-project:master Nov 4, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
…ray-project#29876)

Currently, the stats can only be printed manually via the Dataset.stats() method from user side. This is inconvenient during debugging as it adds overhead on the user side. We add functionality to automatically log Dataset summary statistics after execution of each stage, which can be enabled via a new configuration in DatasetContext, enable_auto_log_stats.

Signed-off-by: Weichen Xu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Datasets] Print out dataset statistics automatically after execution
5 participants