Skip to content

Refactoring - #72

Open
someshsingh22 wants to merge 8 commits into
mainfrom
refactor
Open

Refactoring#72
someshsingh22 wants to merge 8 commits into
mainfrom
refactor

Conversation

@someshsingh22

Copy link
Copy Markdown
Member

fixes#70

@codecov

codecovBot commented Aug 30, 2021

Copy link
Copy Markdown

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 FilesCoverage Δ
code_soup/common/vision/models/__init__.py100.00% <ø> (ø)
code_soup/common/perturbation.py100.00% <100.00%> (ø)
code_soup/common/vision/perturbations.py100.00% <100.00%> (ø)
code_soup/common/vision/datasets/vision_dataset.py0.00% <0.00%> (-100.00%)⬇️
...oup/common/vision/datasets/image_classification.py0.00% <0.00%> (-100.00%)⬇️
code_soup/ch5/algorithms/zoo_attack.py7.45% <0.00%> (-92.55%)⬇️
code_soup/common/vision/models/nin.py16.39% <0.00%> (-83.61%)⬇️
code_soup/common/vision/models/allconvnet.py17.64% <0.00%> (-82.36%)⬇️
code_soup/ch5/algorithms/gan.py20.96% <0.00%> (-79.04%)⬇️
code_soup/common/text/utils/perturbations.py24.44% <0.00%> (-75.56%)⬇️
... and 6 more

@someshsingh22

Copy link
Copy Markdown
MemberAuthor

Removing imports

@mehulrastogi

Copy link
Copy Markdown
Contributor

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

@someshsingh22

Copy link
Copy Markdown
MemberAuthor

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 freeto 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

@someshsingh22@mehulrastogi@project-sharingan