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

Refacto various little thing #3943

Merged
merged 6 commits into from
Aug 7, 2020
Merged

Refacto various little thing #3943

merged 6 commits into from
Aug 7, 2020

Conversation

LaRiffle
Copy link
Contributor

@LaRiffle LaRiffle commented Aug 5, 2020

Description

These are remaining few fixes and updates

Checklist

@LaRiffle LaRiffle added the Type: Code Quality 💯 Minor tweaks or style changes label Aug 5, 2020
@LaRiffle LaRiffle requested a review from a team as a code owner August 5, 2020 14:43
@LaRiffle LaRiffle requested review from Prtfw and H4LL August 5, 2020 14:43
@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #3943 into master will decrease coverage by 0.09%.
The diff coverage is 93.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3943      +/-   ##
==========================================
- Coverage   94.94%   94.85%   -0.10%     
==========================================
  Files         197      200       +3     
  Lines       19944    20528     +584     
==========================================
+ Hits        18936    19472     +536     
- Misses       1008     1056      +48     
Impacted Files Coverage Δ
syft/frameworks/torch/he/fv/util/operations.py 94.48% <ø> (+3.51%) ⬆️
test/execution/test_translation.py 100.00% <ø> (ø)
syft/frameworks/torch/he/fv/util/fv_std_param.py 33.33% <33.33%> (ø)
syft/frameworks/torch/he/fv/modulus.py 80.95% <36.36%> (-15.83%) ⬇️
syft/workers/base.py 91.14% <40.00%> (-0.48%) ⬇️
...frameworks/torch/tensors/interpreters/precision.py 97.08% <71.42%> (+0.02%) ⬆️
syft/workers/virtual.py 93.93% <75.00%> (ø)
syft/frameworks/torch/he/fv/context.py 80.55% <79.41%> (-19.45%) ⬇️
syft/frameworks/torch/mpc/fss.py 91.66% <90.11%> (-7.44%) ⬇️
syft/frameworks/torch/mpc/spdz.py 90.36% <90.12%> (-9.64%) ⬇️
... and 42 more

@@ -75,6 +76,13 @@ def apply_no_compression(decompressed_input_bin) -> tuple:
return decompressed_input_bin, NO_COMPRESSION


scheme_to_compression = {
Copy link
Member

Choose a reason for hiding this comment

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

Q: Could we move those default values as the first thing in the file (before function definitions)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gmuraru I wish I could but I need the functions to be defined first before I add them to the dict

Copy link
Member

Choose a reason for hiding this comment

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

Yeah :(

@@ -75,6 +76,13 @@ def apply_no_compression(decompressed_input_bin) -> tuple:
return decompressed_input_bin, NO_COMPRESSION


scheme_to_compression = {
NO_COMPRESSION: apply_no_compression,
LZ4: apply_lz4_compression,
Copy link
Member

Choose a reason for hiding this comment

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

I could not add a comment on that line.
At line 72, there is specified LZ4, but it should have been NO_COMPRESSION.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gmuraru done!

Copy link
Member

@gmuraru gmuraru left a comment

Choose a reason for hiding this comment

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

LGTM!

@LaRiffle LaRiffle merged commit 7e61474 into master Aug 7, 2020
@LaRiffle LaRiffle deleted the ryffel/light_refacto branch September 15, 2020 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Code Quality 💯 Minor tweaks or style changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants