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

Refactor LPnorm #19

Merged
merged 2 commits into from
Jul 15, 2020
Merged

Refactor LPnorm #19

merged 2 commits into from
Jul 15, 2020

Conversation

larroy
Copy link
Contributor

@larroy larroy commented Jul 10, 2020

Description of changes:

Improve LPnorm documentation and error handling.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

src/famly/bias/metrics/pretraining.py Outdated Show resolved Hide resolved
else:
lp_norm = -1.0
assert False, "Histogram length differ when calculating PDF."
Copy link
Member

Choose a reason for hiding this comment

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

Typo
Histogram length differ => Histogram lengths are different

Also please use "raise ValueError" instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I knew you would comment :-), but it's an assert because it can't happen by user input, as the size of the histogram is fixed by us. If it would happen it would be a bug in our case.

@larroy larroy merged commit f54c238 into aws:master Jul 15, 2020
larroy added a commit that referenced this pull request Nov 10, 2020
* Refactor LPnorm

* CR
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.

2 participants