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

Wrong formula for percentual difference in profiling #46578

Closed
felicepantaleo opened this issue Nov 1, 2024 · 19 comments
Closed

Wrong formula for percentual difference in profiling #46578

felicepantaleo opened this issue Nov 1, 2024 · 19 comments

Comments

@felicepantaleo
Copy link
Contributor

felicepantaleo commented Nov 1, 2024

It is calculated as (PR-baseline)/PR while it should be calculated as (PR-baseline)/baseline. It is wrong in all the columns cpu time percent diff, allocated memory percent diff, deallocated memory percent diff

From a PR: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d4760a/42504/profiling/29834.21/diff-step3_cpu.resources.json.html
I see:
image

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2024

A new Issue was created by @felicepantaleo.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor

assign core

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2024

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

@smuzaffar
Copy link
Contributor

@gartung , can you please look in to this?

@gartung
Copy link
Member

gartung commented Nov 4, 2024

@smuzaffar can profiling be run on the baseline release. Part of the problem is that the "baseline" in this instance is the profiling for the last IB.

@smuzaffar
Copy link
Contributor

sorry @gartung , I did not get your point ? PR profiling job should use the same IB for which the the PR tests were run.

@gartung
Copy link
Member

gartung commented Nov 4, 2024

I need to set the number of events to 100 and I wanted to avoid running that many for every IB.

@gartung
Copy link
Member

gartung commented Nov 4, 2024

Step 1 and step 2 are run for each job so technically the input for step3 RECO is different. On average the results should be the same but not with the limited stats of 10 events.

@smuzaffar
Copy link
Contributor

smuzaffar commented Nov 4, 2024

ah ok, I thought we were doign it already. Aren't we downloading baseline results during the PR profiling job here https://github.com/cms-sw/cms-bot/blob/master/pr_testing/run-pr-profiling.sh#L50-L54 and here https://github.com/cms-sw/cms-bot/blob/master/pr_testing/run-pr-profiling.sh#L98 ?

@gartung
Copy link
Member

gartung commented Nov 4, 2024

No, it is pulling the data from the IB.

@smuzaffar
Copy link
Contributor

sorry, can you please explain with an example e.g for PR1 if we have used IBa then IBa is baseline and profiling comparison should use the profiling data from IBa ... right? Are you saying that we use IBa for PR tests but downloaded profiling data for IBb ?

@smuzaffar
Copy link
Contributor

smuzaffar commented Nov 4, 2024

shouldn't we just change https://github.com/cms-sw/cms-bot/blob/master/comparisons/resources-diff.py#L18-L19 to following?
I think data[metric] is for IB and dest[metric] is for Pr ... right ?

        if not data[metric] == 0.0:
            pdmetric = 100 * dmetric / data[metric]

@gartung
Copy link
Member

gartung commented Nov 4, 2024

Yes. I made that change and will submit a PR.

@gartung
Copy link
Member

gartung commented Nov 4, 2024

cms-sw/cms-bot#2365
It's failing black checks for code not touched by this PR.

@smuzaffar
Copy link
Contributor

cms-sw/cms-bot#2365 is merged now. @gartung , please open a separate issue for #46578 (comment)

@makortel
Copy link
Contributor

makortel commented Nov 8, 2024

+core

@makortel
Copy link
Contributor

makortel commented Nov 8, 2024

@cmsbuild, please close

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2024

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants