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

Add default synthetic sample size to DiagnosticReport #248

Merged
merged 3 commits into from Oct 20, 2022

Conversation

katxiao
Copy link
Contributor

@katxiao katxiao commented Oct 18, 2022

No description provided.

@katxiao katxiao requested a review from a team as a code owner October 18, 2022 16:20
@katxiao katxiao requested review from pvk-developer and removed request for a team October 18, 2022 16:20
@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2022

Codecov Report

Base: 74.35% // Head: 74.42% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (3f2bdfe) compared to base (8038b11).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   74.35%   74.42%   +0.06%     
==========================================
  Files          74       74              
  Lines        2924     2932       +8     
==========================================
+ Hits         2174     2182       +8     
  Misses        750      750              
Impacted Files Coverage Δ
sdmetrics/multi_table/multi_single_table.py 82.55% <100.00%> (ø)
sdmetrics/reports/multi_table/diagnostic_report.py 97.12% <100.00%> (+0.08%) ⬆️
...dmetrics/reports/single_table/diagnostic_report.py 97.24% <100.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -33,6 +33,10 @@ class DiagnosticReport():
'Boundaries': [BoundaryAdherence],
}

_METRIC_ARGS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to make this a class attribute instead of an instance attribute? I just wonder because if you change the values in one then I think the next DiagnosticReport created will also have the changed value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see, I can move it to an instance attribute, good call

Copy link
Contributor

@amontanez24 amontanez24 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
Member

@pvk-developer pvk-developer left a comment

Choose a reason for hiding this comment

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

I left a suggestion on renaming the args to metric_args other than that it looks good to merge.


for metric in tqdm.tqdm(metrics, desc='Creating report'):
metric_name = metric.__name__
try:
args = self._metric_args.get(metric_name, {})
Copy link
Member

Choose a reason for hiding this comment

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

The parameter args confuses me since it's a special key or in some cases it can be reserved for the method definition eg: def func(*args, **kwargs) .I would suggest to change args to something like metric_args or similar just to avoid this type of confusion.

@katxiao katxiao merged commit 074abcb into master Oct 20, 2022
@katxiao katxiao deleted the add-default-sample-size branch October 20, 2022 00:03
@katxiao katxiao added this to the 0.8.0 milestone Nov 2, 2022
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.

None yet

4 participants