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

[FEA] Add a progress bar in Qualification tool when it is running #5988

Merged
merged 6 commits into from
Jul 20, 2022

Conversation

amahussein
Copy link
Collaborator

@amahussein amahussein commented Jul 11, 2022

Signed-off-by: Ahmed Hussein (amahussein) a@ahussein.me

fixes #5911

New Behavior

  • by default, the Qualification displays a progress-bar in the console stdout.
  • Note that the percentage in the progress header is an integer value.
  • example output is as follows:
22/07/11 17:39:04 INFO QualificationAppInfo: Parsing Event Log: file:/Users/ahussein/workspace/repos/rapids-profiling-ui/spark-logs/spark-events/app-20210509200722-0001-tpcds100in1
Qual Tool Progress 70% [============================================>                  ] (82 succeeded + 2 failed) / 119
22/07/11 17:39:15 INFO QualificationAppInfo: Total number of events parsed: 110946 for file:spark-events/app-20220210014716-0238
22/07/11 17:39:15 INFO QualificationAppInfo: file:spark-events/app-20220210014716-0238 has App: app-20220210014716-0238
22/07/11 17:39:15 INFO Qualification: Took 21260ms to process file:spark-events/app-20220210014716-0238
22/07/11 17:39:15 INFO QualificationAppInfo: Parsing Event Log: file:spark-events/local-1650905239440
Qual Tool Progress 71% [=============================================>                 ] (83 succeeded + 2 failed) / 119

Changes

  • added a new class ConsoleProgressBar similar to org.apache.spark.ui.ConsoleProgressBar
  • The PB can be initialized to be updated in a single console line, but this would overlap with other log messages if the LogInfo was enabled and redirected to stdout.

Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>
@amahussein amahussein requested a review from nartal1 July 11, 2022 23:06
@amahussein amahussein self-assigned this Jul 11, 2022
@amahussein
Copy link
Collaborator Author

build

1 similar comment
@nartal1
Copy link
Collaborator

nartal1 commented Jul 12, 2022

build

Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>
@amahussein
Copy link
Collaborator Author

Some of the thoughts to mention:

  • I thought that adding an argument to enable/disable the PB would not add much value.
  • Some users may have the log redirected to STDOUT. That's why I opted to disable inlined PB by default. Otherwise, the user will incur the burden of configuring the log.
  • This PB can be useful for the Profiler tool as well. There are some potential refactoring to be done, but this was not in the scope of this very issue:
    • If we move all logging/output inside the OutWriter, then we can manage having inline progressBar without overlapping with messages displaying the files being processed.

@viadea and @mattahrens are you guys fine with the behavior of the PB as implemented here?

@amahussein
Copy link
Collaborator Author

build

@amahussein
Copy link
Collaborator Author

The failures in the CI seem to be unrelated to the changes.
see #5991

@mattahrens
Copy link
Collaborator

I'm fine with the proposed logic and output for the progress bar 👍

@viadea
Copy link
Collaborator

viadea commented Jul 13, 2022

I am fine with this bar too. thanks!

@amahussein
Copy link
Collaborator Author

Thank you @viadea , @mattahrens and @nartal1 for the feedback!
I will wait until the CI gets fixed, then do another build.

@amahussein
Copy link
Collaborator Author

build

@amahussein
Copy link
Collaborator Author

The CI failures caused by join_test.py are not related.
See the submitted issue #6003

@ttnghia
Copy link
Collaborator

ttnghia commented Jul 18, 2022

build

1 similar comment
@pxLi
Copy link
Collaborator

pxLi commented Jul 18, 2022

build

@amahussein
Copy link
Collaborator Author

The CI is now fixed.
@nartal1 Can you give another thumbs up to merge that PR please?

@amahussein amahussein added this to the Jul 11 - Jul 22 milestone Jul 18, 2022
@amahussein
Copy link
Collaborator Author

I made some changes to the consoleProgressBar.
During runtime, it can be used as a holder for various metrics. This gives more flexibility to use the class without being restricted to hard coded counters defined in the implementations.
At the end of execution, it dumps the counters to the console:

Qual Tool Progress 100% [==================================>] (117 succeeded + 0 failed + 2 N/A) / 119
Qual Tool execution time: 59648ms
	Metrics:
	process.success.count = 117
	process.failure.count = 0
	process.NA.count = 2
	execution.total.count = 119

@amahussein
Copy link
Collaborator Author

build

@amahussein amahussein merged commit fe0236b into NVIDIA:branch-22.08 Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Add a progress bar in Qualification tool when it is running
7 participants