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

Python 3.6.9 (Colab) doesn't handle circular imports properly #1167

Open
zphang opened this issue Aug 23, 2020 · 1 comment
Open

Python 3.6.9 (Colab) doesn't handle circular imports properly #1167

zphang opened this issue Aug 23, 2020 · 1 comment
Labels
keep-in-view Keep in view for future fix/improvement

Comments

@zphang
Copy link
Collaborator

zphang commented Aug 23, 2020

We primarily develop against Python 3.7, but Colab uses 3.6.9, which handles circular imports a little differently.

This currently causes problem with our jiant.tasks imports. We run into the following issue with 3.6.9 (as one example)

  1. jiant.tasks: from .retrieval import *
  2. jiant.retrieval:
  • from jiant.tasks.lib.glue_diagnostics import GlueDiagnosticsTask
  • from jiant.tasks.lib.mnli import MnliTask
  1. jiant.tasks.lib.glue_diagnostics: import jiant.tasks.lib.mnli as mnli

This causes Python 3.6.9 to fail to import tasks.

I am pushing a temporary fix to convert all derivative tasks to do a relative import (#150)

  • jiant.tasks.lib.glue_diagnostics
  • jiant.tasks.lib.mnli_mismatched
  • jiant.tasks.lib.superglue_axg
  • jiant.tasks.lib.superglue_axb

while we pursue a longer term solution.

@jeswan jeswan transferred this issue from jiant-dev/jiant-dev Oct 14, 2020
@zphang zphang added the keep-in-view Keep in view for future fix/improvement label Oct 16, 2020
@zphang
Copy link
Collaborator Author

zphang commented Feb 23, 2021

Colab has apparently updated to 3.7, so moving forward this should no longer be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-in-view Keep in view for future fix/improvement
Projects
None yet
Development

No branches or pull requests

1 participant