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

Static typing for profilers #663

Merged
merged 8 commits into from
Sep 27, 2022

Conversation

tonywu315
Copy link
Contributor

@@ -336,9 +336,11 @@ def diff(self, other_profile: DataLabelerColumn, options: Dict = None) -> Dict:

differences = {
"data_label": utils.find_diff_of_lists_and_sets(labels, other_labels),
"avg_predictions": utils.find_diff_of_dicts(avg_preds, other_avg_preds),
"avg_predictions": utils.find_diff_of_dicts(
avg_preds, other_avg_preds # type: ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

why does this need # type: ignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

avg_preds and other_avg_preds can both be None and utils.find_diff_of_dicts does not take in None

Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this not indicate a code bug if find_diff_of_dicts cannot handle None, but we might be inserting it?

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 changed find_diff_of_dicts to handle None in the same way that the other find_diff functions do.

Copy link
Collaborator

@JGSweets JGSweets left a comment

Choose a reason for hiding this comment

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

Few changes requested

auto-merge was automatically disabled September 26, 2022 15:21

Head branch was pushed to by a user without write access

@taylorfturner taylorfturner added the static_typing mypy static typing issues label Sep 27, 2022
@JGSweets JGSweets enabled auto-merge (squash) September 27, 2022 16:44
auto-merge was automatically disabled September 27, 2022 17:18

Head branch was pushed to by a user without write access

@JGSweets JGSweets enabled auto-merge (squash) September 27, 2022 17:40
auto-merge was automatically disabled September 27, 2022 18:49

Head branch was pushed to by a user without write access

@JGSweets JGSweets enabled auto-merge (squash) September 27, 2022 19:10
@JGSweets JGSweets merged commit b90e21f into capitalone:main Sep 27, 2022
@tonywu315 tonywu315 deleted the static_typing/profilers/all branch September 27, 2022 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static_typing mypy static typing issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants