Repository: OpenMined/PySyft

Issue:
Add DCGAN example Duet Notebooks
## Description
Add two notebook's which reflect the DCGAN example split into DO (Data Owner) and DS (Data Scientist):
https://github.com/pytorch/examples/blob/master/dcgan/

## Definition of Done
The partially runnable DCGAN example notebooks should be in the examples/duet/dcgan folder and a README.md should be added in the parent examples/duet directory with a link to the original example and our notebook.
Add Super Resolution Example Duet Notebooks
## Description
Add two notebook's which reflect the Super Resolution example split into DO (Data Owner) and DS (Data Scientist):
https://github.com/pytorch/examples/blob/master/super_resolution/

## Definition of Done
The partially runnable Super Resolution example notebooks should be in the examples/duet/super_resolution folder and a README.md should be added in the parent examples/duet directory with a link to the original example and our notebook.
Add DCGAN example Duet Notebooks
## Description
Add two notebook's which reflect the DCGAN example split into DO (Data Owner) and DS (Data Scientist):
https://github.com/pytorch/examples/blob/master/dcgan/

## Definition of Done
The partially runnable DCGAN example notebooks should be in the examples/duet/dcgan folder and a README.md should be added in the parent examples/duet directory with a link to the original example and our notebook.


Discussion:
@madhavajay  I am new to this project I have gone through tutorials but didn't come across what are duets as I would like to contribute to this issue 
Hi @ayush12gupta Yes, sorry the Duet stuff is in the code but only referenced from the Duet README currently.
https://github.com/OpenMined/PySyft/tree/dev/examples/duet

This task is to create 2 notebooks for DCGAN the same way we have for MNIST.
You will see the MNIST notebooks in the README.md above and the DCGAN folder already created in examples.
However please be aware that it's entirely possible that all the functionality required to complete the DCGAN notebooks might not exist yet, but an initial attempt is a great way to figure out whats missing and all contributions are greatly appreciated.

If you have any questions feel free to jump into the Slack Channel. 😊
This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the `stale` label to unmark it. Otherwise, this will be closed in 7 days.
Hi, @madhavajay I'm working on this issue, and I almost finished the implementation for MNIST (PR #5071 ). I tested my notebook on both my local laptop and Google Colab, and both of them worked. Then, I have a few questions. 

1. Should I support other datasets like the original example? It seems that remote_torchvision.datasets currently supports only MNIST. 
2. I had to change the structure of the model a bit because pysyft doesn't support transform.resize. Is it OK?
@Koukyosyumei this looks great! Thank you so much for your PR. I will be reviewing this tomorrow. As @tudorcebere says are you able to fix the conflicts?
@madhavajay 
Thanks for your reply! Actually, I'm not familiar with git. Could you show me how to resolve the conflict?
@Koukyosyumei you should be able to do:
```
$ git checkout 0.4
$ git pull
$ git checkout feature_4798
$ get merge 0.4
```

At this point it's going to tell you there are conflicts.
You need to carefully edit the conflicted files and merge the code in places where it doesn't match.

Check out guides like this one:
https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts

Alternatively, if all you have changed are Notebooks then it might be easier to just copy the notebooks out and create a fresh branch from the latest 0.4 and commit them as a single commit.
@madhavajay 
Thank you for your instruction! I somehow solved the conflicts. 
This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the `stale` label to unmark it. Otherwise, this will be closed in 7 days.
@madhavajay 
Hi, I am working on this issue, and I have almost done it. But, I already have a PR (#5071 ) to fix #4798. So, should I wait for #5071 to be finished, or may I create another PR for this issue?  Also, one possible plan is committing the notebooks for this issue within #5071 which I made for the DCGAN issue. I would like to hear your opinion because I'm not familiar with contriution to open source project. Thank you in advance. 
@madhavajay  I am new to this project I have gone through tutorials but didn't come across what are duets as I would like to contribute to this issue 
Hi @ayush12gupta Yes, sorry the Duet stuff is in the code but only referenced from the Duet README currently.
https://github.com/OpenMined/PySyft/tree/dev/examples/duet

This task is to create 2 notebooks for DCGAN the same way we have for MNIST.
You will see the MNIST notebooks in the README.md above and the DCGAN folder already created in examples.
However please be aware that it's entirely possible that all the functionality required to complete the DCGAN notebooks might not exist yet, but an initial attempt is a great way to figure out whats missing and all contributions are greatly appreciated.

If you have any questions feel free to jump into the Slack Channel. 😊
This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the `stale` label to unmark it. Otherwise, this will be closed in 7 days.
Hi, @madhavajay I'm working on this issue, and I almost finished the implementation for MNIST (PR #5071 ). I tested my notebook on both my local laptop and Google Colab, and both of them worked. Then, I have a few questions. 

1. Should I support other datasets like the original example? It seems that remote_torchvision.datasets currently supports only MNIST. 
2. I had to change the structure of the model a bit because pysyft doesn't support transform.resize. Is it OK?
@Koukyosyumei this looks great! Thank you so much for your PR. I will be reviewing this tomorrow. As @tudorcebere says are you able to fix the conflicts?
@madhavajay 
Thanks for your reply! Actually, I'm not familiar with git. Could you show me how to resolve the conflict?
@Koukyosyumei you should be able to do:
```
$ git checkout 0.4
$ git pull
$ git checkout feature_4798
$ get merge 0.4
```

At this point it's going to tell you there are conflicts.
You need to carefully edit the conflicted files and merge the code in places where it doesn't match.

Check out guides like this one:
https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts

Alternatively, if all you have changed are Notebooks then it might be easier to just copy the notebooks out and create a fresh branch from the latest 0.4 and commit them as a single commit.
@madhavajay 
Thank you for your instruction! I somehow solved the conflicts. 

Resolving patch:
diff --git a/src/syft/lib/torch/__init__.py b/src/syft/lib/torch/__init__.py
--- a/src/syft/lib/torch/__init__.py
+++ b/src/syft/lib/torch/__init__.py
@@ -12,7 +12,7 @@
 from . import parameter  # noqa: 401
 from . import uppercase_tensor  # noqa: 401
 from ...ast.globals import Globals
-from ...logger import critical
+from ...logger import info
 from .allowlist import allowlist
 
 TORCH_VERSION = version.parse(torch.__version__.split("+")[0])
@@ -64,7 +64,7 @@ def create_torch_ast(client: Any = None) -> Globals:
                     path=method, framework_reference=torch, return_type_name=return_type
                 )
         else:
-            critical(f"Skipping {method} not supported in {TORCH_VERSION}")
+            info(f"Skipping {method} not supported in {TORCH_VERSION}")
 
     for klass in ast.classes:
         klass.create_pointer_class()


Test patch: