-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
I'm not sure if this has been discussed yet, but how about naming external submodules in the form
This is how |
I was avoiding that structure because it did not seem like it would work if, e.g., you pip-installed several allennlp packages. Does it work? That seems totally crazy. How does python manage resolution? E.g., I'm not opposed to this on principle if it works, though it'd be helpful to think through the pros and cons of this setup. |
One con: we were intending these separate packages to be examples of how someone might use allennlp in their own modeling project. There's no need to duplicate allennlp's package structure in your own project, and it's overly confusing if we have all of these nested packages in a separate repo, just to keep things in line with how they were when they were all combined in the main repo. |
You would have to import it as |
Even that confuses me, I would expect the lookup on |
I just double-checked for sanity, and yes, it really does work :) |
c29f7d7
to
f25ad04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo hoo, nice one 🎆
Can you also remove the now unneeded libraries from setup.py
too?
|
||
# Used by semantic parsing code to format and postprocess SQL | ||
sqlparse>=0.2.4 | ||
|
||
# For text normalization | ||
ftfy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These text normalisation libraries can also go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is actually used by the OpenAI word splitter, not the semparse code.
requirements.txt
Outdated
@@ -49,12 +49,6 @@ gevent>=1.3.6 | |||
# Used by semantic parsing code to strip diacritics from unicode strings. | |||
unidecode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this unidecode library apart from for the semparse code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one could have been removed when we got rid of the SEMPRE integration, looks like. Removing it now.
@brendan-ai2, with this merged, we're now in a position to set up CI for sniff tests on the sub-repos. |
@matt-gardner, that's great! Could you temporarily add me as an admin on https://github.com/allenai/allennlp-semparse so I can look at how the CI is configured there? I'll try to replicate Github's CI in TC. |
I just gave you admin privileges, but I don't think you actually need it - you can just look here: https://github.com/allenai/allennlp-semparse/blob/master/.github/workflows/main.yml. Though, thinking about this more, I think the right thing to do is to create a single |
Sounds like a good plan. Thanks for laying it out! I've assigned myself to #3351. |
* Remove semantic parsing code * Fix module imports, remove more tests * More fixes * fix predict test * fix another test * remove more docs * last doc errors, i think... * Remove unnecessary requirements * Removing some fixutre data that I missed earlier * Fix merge conflicts with black * More merge conflicts, pin to pytorch 1.2 * black merge conflicts * Remove unidecode
I've started setting up github.com/allenai/allennlp-semparse (not ready yet, but working on it). Once we're ready, this PR will remove all semantic parsing code, dependencies, and tests from the main allennlp repo. This should happen when we're ready for a 1.0 release. I think we should have a 0.9 release before that with the interpret code and other stuff, so it'll be a little bit before this should be merged. Just seeing what this does to CI.