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

Refactoring #70

Open
3 of 6 tasks
someshsingh22 opened this issue Aug 30, 2021 · 4 comments · Fixed by #83 · May be fixed by #72
Open
3 of 6 tasks

Refactoring #70

someshsingh22 opened this issue Aug 30, 2021 · 4 comments · Fixed by #83 · May be fixed by #72
Assignees
Labels
Core Core developer should use this tag Modification Modify some features Priority:High High Priority

Comments

@someshsingh22
Copy link
Member

someshsingh22 commented Aug 30, 2021

Some tweaks and design changes

  • Remove pre-trained models from init and call from libraries
  • Remove pre-defined dataset implementation from torchvision
  • Remove utils from chapters folder
  • Remove step Analogy from common models
  • Uniform Documentation
  • Remove Benchmark from Implemented Models and Attacks

@mehulrastogi can you recall anything else?

@someshsingh22 someshsingh22 added Modification Modify some features Priority:High High Priority Core Core developer should use this tag labels Aug 30, 2021
@someshsingh22 someshsingh22 self-assigned this Aug 30, 2021
@someshsingh22 someshsingh22 linked a pull request Aug 30, 2021 that will close this issue
@mehulrastogi
Copy link
Contributor

mehulrastogi commented Aug 31, 2021

  • We do need to rename some of the folders for better representation.
  • Link this has good standards for python docs. We can discuss and decide accordingly

@someshsingh22 what do you mean by removing step analogy?

@someshsingh22
Copy link
Member Author

@mehulrastogi Step analogy is good for iterative attacks, but for training normal modules like ResNet / NiN / AllConvNet it looks unnecessary. So we should use the torchvision's pattern for them

@mehulrastogi
Copy link
Contributor

.code-soup/code_soup/
+-- common/ #Used across the package, parallel to glossary
|   |   +-- models/ #Commonly used models for eg GPT-2
|   |     +-- vision/
|   |     +-- text/ 
|   |     +-- rl/
|   |   +-- utils/ #Commonly used utils like accuracy metric etc
|   |   +-- dataset/ #Datasets used in the chapter
# For every chapter ->
+-- ch{Chapter_Number}/ #Code refering to a particular chapter
|   +-- attacks/ #Attackers or Defenders used in the chapter
|   |   +--{Name_of_Attack/Defense}.py
# There will be exactly one file pertaining to the agents.
# This is supposed to be parallel to the pseudcode in a book.
# Therefore only model states and step functions for attack/defense should be here

How is the above struc?

  • Deleted the utils from chapters.
  • Also now models have the 3 areas instead of the other way round. corresponding inits can have the package wide imports. Also this allows streamlined inclusion of any common files in utils (like the seeding)
  • renamed models to attacks. can include defence as another folder and import through init

@mehulrastogi mehulrastogi linked a pull request Sep 6, 2021 that will close this issue
@mehulrastogi
Copy link
Contributor

mehulrastogi commented Sep 19, 2021

With my PR I majorly did some reorganization on the commons folder to package files together logically

The following tasks still need attention:-

  • Remove step Analogy from common models / attack
  • Uniform Documentation
  • Remove Benchmark from Implemented Models and Attacks

@mehulrastogi mehulrastogi reopened this Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Core developer should use this tag Modification Modify some features Priority:High High Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants