Skip to content

Conversation

@dalgu90
Copy link
Owner

@dalgu90 dalgu90 commented Aug 16, 2022

Hi team. I changed the module name and the related import statements. This PR also addresses the problem of doing import * for the Config, and reactors DCAN for the.

  • Changed src -> anemic and changed all the statements related.
  • Added the import statements to all the __init__.py. Removed the import statements written just for ConfigMapper.
  • Make the DCAN model self-contained and remove the modules.layers module since it's only used in DCAN.

By the second change, if any of the anemic submodules are imported, then all the classes of anemic will be loaded recursively by the __init__.py files so that the ConfigMapper will get the classes.
FYI, all the import statements are absolute imports, not relative, following this guide.

@dalgu90 dalgu90 changed the title Rename the module to anemic and address the import issue Rename the module to anemic, address the import issue, refactor DCAN Aug 17, 2022
return logits


class WordEmbeddingLayer(nn.Module):
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can reuse this class from other models?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We took a call to follow this design: https://huggingface.co/blog/transformers-design-philosophy. So, every file will have all layers which are used in that model.

Copy link
Collaborator

@abheesht17 abheesht17 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @dalgu90, for working on this. Approved the PR :)

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.

4 participants