-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Good first issue 🎓Perfect for beginners, welcome to OpenMined!Perfect for beginners, welcome to OpenMined!
Description
Describe the bug
At present, when we serialize a plan, we simplify the .readable_plan object, which has already been simplified. This leads to a much larger serialization than is necessary. We should modify the simplifier for plans to simply take the readable_plan object as is.
To Reproduce
@sy.func2plan()
def plan_double_abs(x):
x = x + x
x = torch.abs(x)
return x
plan_double_abs.build(torch.tensor([1., -2.]))
print("This plan is clearly already simplified...")
print(plan_double_abs.readable_plan)
print("...which we can verify by detailing it...")
print(sy.serde._detail(sy.local_worker, plan_double_abs.readable_plan[0]))
print("and when we simplify again (as the serializer does, it gets HUGE")
print(sy.serde._simplify(plan_double_abs))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Good first issue 🎓Perfect for beginners, welcome to OpenMined!Perfect for beginners, welcome to OpenMined!