FIX: Fix error in report when sklearnex has more parameters than sklearn #171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, when creating a report comparing sklearn vs. sklearnex, if some algorithm has more parameters in sklearnex than in sklearn (such as tree-based algorithms like
ExtraTreesClassifier
), an error will occur when trying to generate the excel report from the JSONs, due to being unable to find those sklearnex-specific columns in the data from sklearn.This PR fixes the issue by dropping all parameter columns that are not present in data from all the compared libraries, but I am not sure that this wouldn't break some other use-case, so please give it a thorough review.
PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.
You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
Checklist to comply with before moving PR from draft:
PR completeness and readability
Testing