Running custom modifications in modeling_bart.py
Hi,I am planning to modify the output attention weights from the decoder in modeling_bart.py for conditional abstractive summarization. To achieve this I changed the transformers module to mytransformers and made the changes I wanted in the modeling_bart.py script. Now, when I run the run_summarization.py, I cannot import the mytransformers with a FILENOTFOUND Error and I am prompted to install transformers. If I install/import transformers I will be running the original bart instead of my modified code. Can you help me understand how to run my custom code changes in the transformers library ?
2021-06-28T12:09:24Z
You can’t add files to the library like that, but you can have your updated model in the same folder as your example script with the namemytransformers.pywhich will then allow you to import from it.
2021-06-29T05:13:15Z
Oh okay that makes sense. Thank you for clarifying that.I was also trying to recreate the transformers package with my custom changes to achieve the same. Even though I can create the package I am not able to import them. Is there any documentation around how the codebase handles packages ?
2021-06-29T12:02:10Z
This is standard Python, so any Python tutorial on how to build a package/module will help.