-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add a generic reference histogram comparator #2317
Add a generic reference histogram comparator #2317
Conversation
c18cd63
to
f1e582f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice Andrea. I have only a few comments that I let you review. Nothing big. Thank you
// | ||
// Helper function for retrieving the last MonitorObject for a give run number | ||
|
||
static std::shared_ptr<MonitorObject> getMOFromRun(repository::DatabaseInterface* qcdb, std::string fullPath, uint32_t run, Activity activity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should consider moving this to the Framework probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fullPath could also be a reference here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference added.
// | ||
// Helper function for retrieving the last MonitorObject for a give run number | ||
|
||
static std::shared_ptr<MonitorObject> getMOFromRun(repository::DatabaseInterface* qcdb, std::string fullPath, uint32_t run, Activity activity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fullPath could also be a reference here
The code introduces some tools that allow to compare the plots produced by given task(s) with that of a reference run: - `ReferenceComparatorTask` draws histograms with their reference superimposed, as well as the ratio between histograms and reference - `ReferenceComparatorCheck` compares the histograms with their corresponding reference, and assesses their compatibility. The comparison is performed by a dynamically loadable module that provides the actual comparison algorithm - `ReferenceComparatorPlot` is an utility class to draw the current and reference histograms, and their ratio - `ObjectComparator*` are dynamically loadable modules than implement different histogram comparison methods Three examples are provided: - `ObjectComparatorDeviation` evaluates the average relative difference between the histogram bins - `ObjectComparatorChi2` compares the histograms using a chi2-based test - `ObjectComparatorKolmogorov` compares the histograms using a Kolmogorov test
f1e582f
to
916d1ce
Compare
@Barthelemy I have pushed an update that should address all the comments, let me know if anything is still missing. Thanks a lot! |
all good, thanks ! |
The code introduces some tools that allow to compare the plots produced by given task(s) with that of a reference run:
ReferenceComparatorTask
draws histograms with their reference superimposed, as well as the ratio between histograms and referenceReferenceComparatorCheck
compares the histograms with their corresponding reference, and assesses their compatibility. The comparison is performed by a dynamically loadable module that provides the actual comparison algorithmReferenceComparatorPlot
is an utility class to draw the current and reference histograms, and their ratioObjectComparator*
are dynamically loadable modules than implement different histogram comparison methodsThree examples are provided:
ObjectComparatorDeviation
evaluates the average relative difference between the histogram binsObjectComparatorChi2
compares the histograms using a chi2-based testObjectComparatorKolmogorov
compares the histograms using a Kolmogorov testThis is an example of output of the task and checker, also showing the flags associated to the quality objects: