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 #72

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Refactoring #72

wants to merge 8 commits into from

Conversation

someshsingh22
Copy link
Member

fixes #70

@someshsingh22 someshsingh22 self-assigned this Aug 30, 2021
@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #72 (95383d3) into main (eec666b) will decrease coverage by 80.48%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##              main      #72       +/-   ##
============================================
- Coverage   100.00%   19.51%   -80.49%     
============================================
  Files           16       17        +1     
  Lines          603      615       +12     
============================================
- Hits           603      120      -483     
- Misses           0      495      +495     
Impacted Files Coverage Δ
code_soup/common/vision/models/__init__.py 100.00% <ø> (ø)
code_soup/common/perturbation.py 100.00% <100.00%> (ø)
code_soup/common/vision/perturbations.py 100.00% <100.00%> (ø)
code_soup/common/vision/datasets/vision_dataset.py 0.00% <0.00%> (-100.00%) ⬇️
...oup/common/vision/datasets/image_classification.py 0.00% <0.00%> (-100.00%) ⬇️
code_soup/ch5/algorithms/zoo_attack.py 7.45% <0.00%> (-92.55%) ⬇️
code_soup/common/vision/models/nin.py 16.39% <0.00%> (-83.61%) ⬇️
code_soup/common/vision/models/allconvnet.py 17.64% <0.00%> (-82.36%) ⬇️
code_soup/ch5/algorithms/gan.py 20.96% <0.00%> (-79.04%) ⬇️
code_soup/common/text/utils/perturbations.py 24.44% <0.00%> (-75.56%) ⬇️
... and 6 more

@someshsingh22
Copy link
Member Author

Removing imports

@mehulrastogi
Copy link
Contributor

did a refactoring @someshsingh22. Do take a look at the code and solve for any merge issues

@someshsingh22
Copy link
Member Author

@mehulrastogi
Can you check the PR and merge the PRs

import numpy as np
import torch

from code_soup.common.perturbation import Perturbation
Copy link
Contributor

Choose a reason for hiding this comment

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

This file according to the factoring will come under vision-> utils. Please do the needful

Also the common perturbation file should come under common->utils

@@ -1,6 +0,0 @@
from code_soup.common.vision.datasets.image_classification import (
Copy link
Contributor

Choose a reason for hiding this comment

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

Will you be importing this directly in the files where required?

@@ -0,0 +1,12 @@
from abc import ABC, abstractmethod
Copy link
Contributor

Choose a reason for hiding this comment

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

This abstract method to be under common-utils now

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.

Refactoring
3 participants