Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quality of life improvements related to importing mmda types, predictors, etc. #141

Merged
merged 12 commits into from
Sep 23, 2022

Conversation

kyleclo
Copy link
Collaborator

@kyleclo kyleclo commented Sep 22, 2022

  1. make from mmda.types|predictors|parsers import * possible
  2. migrate api to ai2 internal

@kyleclo kyleclo requested review from cmwilhelm and soldni September 22, 2022 21:23
@kyleclo kyleclo changed the title make from mmda.types|predictors|parsers import * possible quality of life improvements related to importing mmda types, predictors, etc. Sep 23, 2022
import PysbdSentenceBoundaryPredictor
__all__.append('PysbdSentenceBoundaryPredictor')

with necessary(["layoutparser", "torch", "torchvision", "effdet"], soft=True) as PYTORCH_AVAILABLE:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to not have to define this in three places:

  1. setup extras_require
  2. required_backends on the predictor itself
  3. here

But I don't have a good suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah :/ ive created an issue here: #144

i need to think a bit more how this would be resolved. a reasonable stop-gap could be defining a top-level config that all 3 locations imports from; reserve for next PR

Copy link
Contributor

@cmwilhelm cmwilhelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all makes sense. You'll want to bump setup.py version +0.0.1 again because I think @geli-gel beat you to the punch with v0.0.36.

Putting the api types into ai2_internal also seems like a good move but note it will be breaking for the parsers/models still operationalized in spp instead of TIMO. Should be relatively easy to fix if/when we upgrade them though, I think.

@kyleclo kyleclo merged commit b7ee06c into main Sep 23, 2022
@kyleclo kyleclo deleted the kylel/2022-10/qol-type-import branch September 23, 2022 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants