Rewrite or reimplement a given pytorch Deep Learning Algorithm to a non-distributed Version (modify an existent and completed project)
Budget: €30 – €250 EUR
You get the detailed description of a deep learning method.
It is from the paper here: https://arxiv.org/abs/2110.07402.
The project is already completely implemented and available on gitHub.
--> https://github.com/bytedance/TWIST
It contains a pytorch model with a loss function and some code specific for the method.
BUT the code only works for distributed machines using "torch.distributed".
I neither understand nor can I run the distributed Version code.
Even the model components are only for distributed execution.
I need the model parameters of a training run to load them in a model that
uses only non-distributed modules. For instance, the model I need to extract uses
"nn.Batchnorm1D" instead of "torch.nn.SyncBatchNorm".
I want to load the state_dict of the trained model to a model I reuse in another method.
This requires compatibility of the model objects.
I add a template of the model architecture I need to be trained.
I even tried to remove all parts of the original code I do not need, especially
the "torch.distributed" relevant code but it does not work.
You can use this modified code as an orientation and to understand what I have in mind.
There are two ways to solve the task.
Understand the Code on GitHub and rewrite the application to a Version
working only on a single device ('cuda') with all distributed or parallel code
converted to a sequential, single device non-distributed code that's functional
equivalent.
You also can reimplement the method of the paper as single device (process) Version
implementing all details and features described in the paper.
No matter how, please do not forget to comment and explain your code verbose and comprehensive.
The using purpose of the project is only for one scientific study without further use.
The file "non_distributed_singleNode_template.py" is a try to adapt the code of "train.py" for my purposes.
I use the architecture from the TWIST-class for a CNN of another project so the keys in "load_state_dict()" must match. Instead of using "argparse.ArgumentParser" to gather the execution parameters I strore them
in a python dictionary.
The maximum amount of time for this work should be a week.
Please answer as soon as possible.
It is from the paper here: https://arxiv.org/abs/2110.07402.
The project is already completely implemented and available on gitHub.
--> https://github.com/bytedance/TWIST
It contains a pytorch model with a loss function and some code specific for the method.
BUT the code only works for distributed machines using "torch.distributed".
I neither understand nor can I run the distributed Version code.
Even the model components are only for distributed execution.
I need the model parameters of a training run to load them in a model that
uses only non-distributed modules. For instance, the model I need to extract uses
"nn.Batchnorm1D" instead of "torch.nn.SyncBatchNorm".
I want to load the state_dict of the trained model to a model I reuse in another method.
This requires compatibility of the model objects.
I add a template of the model architecture I need to be trained.
I even tried to remove all parts of the original code I do not need, especially
the "torch.distributed" relevant code but it does not work.
You can use this modified code as an orientation and to understand what I have in mind.
There are two ways to solve the task.
Understand the Code on GitHub and rewrite the application to a Version
working only on a single device ('cuda') with all distributed or parallel code
converted to a sequential, single device non-distributed code that's functional
equivalent.
You also can reimplement the method of the paper as single device (process) Version
implementing all details and features described in the paper.
No matter how, please do not forget to comment and explain your code verbose and comprehensive.
The using purpose of the project is only for one scientific study without further use.
The file "non_distributed_singleNode_template.py" is a try to adapt the code of "train.py" for my purposes.
I use the architecture from the TWIST-class for a CNN of another project so the keys in "load_state_dict()" must match. Instead of using "argparse.ArgumentParser" to gather the execution parameters I strore them
in a python dictionary.
The maximum amount of time for this work should be a week.
Please answer as soon as possible.