Deactivate plans in plans#2791
Merged
LaRiffle merged 5 commits intoOpenMined:masterfrom Dec 27, 2019
gmuraru:gm-deactivate-plans-in-plans
Merged
Deactivate plans in plans#2791LaRiffle merged 5 commits intoOpenMined:masterfrom gmuraru:gm-deactivate-plans-in-plans
LaRiffle merged 5 commits intoOpenMined:masterfrom
gmuraru:gm-deactivate-plans-in-plans
Conversation
|
Check out this pull request on You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB. |
LaRiffle
suggested changes
Dec 14, 2019
Contributor
LaRiffle
left a comment
There was a problem hiding this comment.
Would you mind adding tests about this feature?
gmuraru
commented
Dec 20, 2019
| from syft.messaging.promise import Promise | ||
|
|
||
| from syft.exceptions import route_method_exception | ||
| from syft.exceptions import TensorsNotCollocatedException |
Member
Author
There was a problem hiding this comment.
I think this was not needed
gmuraru
commented
Dec 20, 2019
| res = plan_2_1(data) | ||
| return plan_2_2(res) | ||
|
|
||
| # (-2 * (x + tensor(3) + 42) + tensor(2) + 1331) |
Member
Author
There was a problem hiding this comment.
I can remove this - It was only a simple way that I thought of to show what each plan/function is doing
LaRiffle
approved these changes
Dec 27, 2019
Contributor
LaRiffle
left a comment
There was a problem hiding this comment.
This looks really great to me :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Solves #2707.
Building a plan that has already a built plan should directly call the function - take into consideration
*args and **kwargs.For doing this, we keep in the owner a state, which would indicate if a plan is already building or not. If a plan is already building, then directly call the function.
Later EDIT
Made this PR to support plans in plans - even if the inner plan is already built (with a state) - for that I had to add more information that is sent to the worker (the states for the first plans)