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

Auto-register Plan Torchscript translator #3405

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

vvmnnnkv
Copy link
Member

Description

In #3360 torchscript translator is auto-registered on Plan inside syft.execution.translation.torchscript.
This was relying on the fact that PlanTranslatorTorchscript is imported somewhere in __init__.py files when Syft is imported.
At some point PlanTranslatorTorchscript import was removed.
This change registers PlanTranslatorTorchscript inside syft.execution.plan.

Additionally, it fixes FL Training Plan experimental notebooks to use sy.make_hook instead of sy.hook.

Type of change

Please mark options that are relevant.

  • Added/Modified tutorials
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

@vvmnnnkv vvmnnnkv requested a review from a team as a code owner April 25, 2020 02:26
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

@codecov
Copy link

codecov bot commented Apr 25, 2020

Codecov Report

Merging #3405 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3405   +/-   ##
=======================================
  Coverage   94.70%   94.70%           
=======================================
  Files         152      152           
  Lines       16061    16061           
=======================================
  Hits        15211    15211           
  Misses        850      850           
Impacted Files Coverage Δ
syft/execution/translation/torchscript.py 100.00% <ø> (ø)
syft/execution/plan.py 93.60% <100.00%> (+0.05%) ⬆️

Copy link
Member

@Jasopaum Jasopaum left a comment

Choose a reason for hiding this comment

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

Looks good to me!
Just a small question (not sure if it's the best place to ask) but what's the new status with hooks? Does make_hook(globals) looks at all the frameworks it can hook and TorchHook hooks only Torch?

@vvmnnnkv
Copy link
Member Author

Just a small question (not sure if it's the best place to ask) but what's the new status with hooks? Does make_hook(globals) looks at all the frameworks it can hook and TorchHook hooks only Torch?

Frankly, no idea :-)
sy.hook() (which was a shortcut for setting up TorchHook and creating sandbox) was renamed to sy.make_hook(), that's all I know.

@karlhigley karlhigley merged commit 8fdaaaf into master Apr 26, 2020
@karlhigley karlhigley deleted the vvm/torchscript-plan-build-fix branch April 26, 2020 17:44
karlhigley pushed a commit to karlhigley/PySyft that referenced this pull request Apr 28, 2020
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

3 participants