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

FIX: edge case where module.__file__ is None #1307

Merged

Conversation

nikostro
Copy link
Contributor

Address edge case where file attribute exists but is None. This was discovered running ARENA on Colab.

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

  • In rare edge cases inregistry.py, a __file__ attribute may exist but be set to None, causing an AttributeError in file = Path(getattr(module, "__file__"))
module = inspect.getmodule(task_type)
assert module
assert not module

What is the new behavior?

Handle this edge case.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No.

Other information:

…s occurs when running ARENA running on Colab.
@jjallaire jjallaire merged commit af06c23 into UKGovernmentBEIS:main Feb 12, 2025
9 checks passed
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