Skip to content

Conversation

@Hanyu-Liu-123
Copy link
Collaborator

What does this PR do?

Summary

When running in Google Colab, the logger initiation line returns an Attribution error like the following:

AttributeError: module 'textattack' has no attribute 'shared'

This is probably due to the ambiguous path that the current logger initiation uses, or an issue with the import loop that was also encountered in this issue.

Changes

Change from logger = textattack.shared.logger to logger = textattack.shared.utils.logger

Checklist

  • The title of your pull request should be a summary of its contribution.
  • Please write detailed description of what parts have been newly added and what parts have been modified. Please also explain why certain changes were made.
  • If your pull request addresses an issue, please mention the issue number in the pull request description to make sure they are linked (and people consulting the issue know you are working on it)
  • To indicate a work in progress please mark it as a draft on Github.
  • Make sure existing tests pass.
  • Add relevant tests. No quality testing = no merge.
  • All public methods must have informative docstrings that work nicely with sphinx. For new modules/files, please add/modify the appropriate .rst file in TextAttack/docs/apidoc.'

@Hanyu-Liu-123 Hanyu-Liu-123 self-assigned this Oct 5, 2021
@Hanyu-Liu-123 Hanyu-Liu-123 added the bug Something isn't working label Oct 5, 2021
@Hanyu-Liu-123 Hanyu-Liu-123 linked an issue Oct 5, 2021 that may be closed by this pull request
@qiyanjun qiyanjun merged commit 907ec46 into master Oct 12, 2021
@qiyanjun qiyanjun deleted the fix-'textattack'-has-no-attribute-'shared'-bug branch November 9, 2021 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot import CLAREAugmenter

3 participants