IBM / transition-amr-parser

SoTA Abstract Meaning Representation (AMR) parsing with word-node alignments in Pytorch. Includes checkpoints and other tools such as statistical significance Smatch.
Apache License 2.0
231 stars 46 forks source link

adding missing __init__.py to modules #32

Closed chanind closed 1 year ago

chanind commented 1 year ago

This PR adds an empty __init__.py file to the fairseq_ext.modules and several other dirs where this file is missing. Without this, I get errors like No Module Named: fairseq_ext.modules after installing this library via pip install https://github.com/IBM/transition-amr-parser/archive/master.zip and trying to use the parser. I think these files were likely left off as an oversight, since there is correctly an __init__.py file in most (but not all) other relevant folders in this project.

ramon-astudillo commented 1 year ago

The file__init__.py is not needed if you use the --editable flag when installing. Let me check if this update does not mess up with other things. Maybe @jzhou316 has something to say with respect to this. I would favor the use of __init__.

jzhou316 commented 1 year ago

That's right. We only included necessary __init__.py for main modules specified under the fairseq_ext package here. That was the minimum requirement to run with development mode (installed with --editable flag as instructed in the repo). Without the development mode installation, it could need the __init__.py files to recognize the submodules. The update seems no harm (if it passes tests).