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

[mod] #70

Merged
merged 1 commit into from
Dec 28, 2023
Merged

[mod] #70

merged 1 commit into from
Dec 28, 2023

Conversation

vyomakesh09
Copy link
Contributor

modified:   tests/models/test_navit.py
modified:   tests/models/test_vit.py
modified:   tests/nn/modules/test_linearactivation.py
modified:   tests/structs/test_localtransformer.py
modified:   tests/structs/test_transformer.py
modified:   zeta/nn/modules/test_dense_connect.py


modified:   tests/models/test_vit.py
modified:   tests/nn/modules/test_linearactivation.py
modified:   tests/structs/test_localtransformer.py
modified:   tests/structs/test_transformer.py
modified:   zeta/nn/modules/test_dense_connect.py
@kyegomez kyegomez merged commit eb827d8 into kyegomez:master Dec 28, 2023
6 of 24 checks passed
self.assertTrue(
torch.allclose(output[:, 10:], self.submodule(x))
) # Check submodule output
assert output.shape == (32, 15) # Check output shape

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
torch.allclose(output[:, 10:], self.submodule(x))
) # Check submodule output
assert output.shape == (32, 15) # Check output shape
assert torch.allclose(output[:, :10], x) # Check if input is preserved

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
) # Check submodule output
assert output.shape == (32, 15) # Check output shape
assert torch.allclose(output[:, :10], x) # Check if input is preserved
assert torch.allclose(

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
DenseBlock.forward.__doc__
) # Check if forward has a docstring
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
) # Check if forward has a docstring
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type
assert dense_block.submodule.in_features == 10 # Check input features

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type
assert dense_block.submodule.in_features == 10 # Check input features
assert dense_block.submodule.out_features == 5 # Check output features

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
if __name__ == "__main__":
unittest.main()
def test_docstrings():
assert (

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert (
DenseBlock.__init__.__doc__ is not None
) # Check if __init__ has a docstring
assert (

Check notice

Code scanning / Bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.


def delete_pycache(directory):
for root, dirs, files in os.walk(directory):

Check warning

Code scanning / Prospector (reported by Codacy)

Unused variable 'files' (unused-variable) Warning

Unused variable 'files' (unused-variable)
) # Check submodule output
assert output.shape == (32, 15) # Check output shape
assert torch.allclose(output[:, :10], x) # Check if input is preserved
assert torch.allclose(

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
torch.allclose(output[:, 10:], self.submodule(x))
) # Check submodule output
assert output.shape == (32, 15) # Check output shape
assert torch.allclose(output[:, :10], x) # Check if input is preserved

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
assert (
DenseBlock.__init__.__doc__ is not None
) # Check if __init__ has a docstring
assert (

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
self.assertTrue(
torch.allclose(output[:, 10:], self.submodule(x))
) # Check submodule output
assert output.shape == (32, 15) # Check output shape

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
if __name__ == "__main__":
unittest.main()
def test_docstrings():
assert (

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
DenseBlock.forward.__doc__
) # Check if forward has a docstring
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type
assert dense_block.submodule.in_features == 10 # Check input features
assert dense_block.submodule.out_features == 5 # Check output features

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
) # Check if forward has a docstring
def test_initialization(dense_block):
assert isinstance(dense_block.submodule, nn.Linear) # Check submodule type
assert dense_block.submodule.in_features == 10 # Check input features

Check warning

Code scanning / Bandit (reported by Codacy)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Warning test

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
x = torch.randn(32, 10)
output = self.dense_block(x)
def test_forward(dense_block):
x = torch.randn(32, 10)

Check warning

Code scanning / Pylint (reported by Codacy)

Variable name "x" doesn't conform to snake_case naming style Warning test

Variable name "x" doesn't conform to snake_case naming style
import sys


def delete_pycache(directory):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning

Missing function docstring
print("Usage: python delete_pycache.py <directory>")
sys.exit(1)

directory = sys.argv[1]

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "directory" doesn't conform to UPPER_CASE naming style Warning

Constant name "directory" doesn't conform to UPPER_CASE naming style
@@ -0,0 +1,19 @@
import os

Check warning

Code scanning / Pylint (reported by Codacy)

Missing module docstring Warning

Missing module docstring
self.submodule = nn.Linear(10, 5)
self.dense_block = DenseBlock(self.submodule)
@pytest.fixture
def dense_block():

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning test

Missing function docstring
self.assertIsNotNone(
DenseBlock.forward.__doc__
) # Check if forward has a docstring
def test_initialization(dense_block):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning test

Missing function docstring


if __name__ == "__main__":
unittest.main()
def test_docstrings():

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning test

Missing function docstring
def test_forward(self):
x = torch.randn(32, 10)
output = self.dense_block(x)
def test_forward(dense_block):

Check warning

Code scanning / Pylint (reported by Codacy)

Missing function docstring Warning test

Missing function docstring
@@ -3,7 +3,7 @@
import torch
from zeta.structs import LocalTransformer
from torch.autograd import gradcheck
from zeta.nn.modules.dynamic_module import DynamicPositionBias
from zeta.nn import DynamicPositionBias

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Imports from package zeta are not grouped Warning test

Imports from package zeta are not grouped
self.assertIsNotNone(
DenseBlock.forward.__doc__
) # Check if forward has a docstring
def test_initialization(dense_block):

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning test

Missing function or method docstring
def test_forward(self):
x = torch.randn(32, 10)
output = self.dense_block(x)
def test_forward(dense_block):

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning test

Missing function or method docstring


if __name__ == "__main__":
unittest.main()
def test_docstrings():

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning test

Missing function or method docstring
self.submodule = nn.Linear(10, 5)
self.dense_block = DenseBlock(self.submodule)
@pytest.fixture
def dense_block():

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing function or method docstring Warning test

Missing function or method docstring
@@ -0,0 +1,19 @@
import os

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Missing module docstring Warning

Missing module docstring
self.assertIsNotNone(
DenseBlock.forward.__doc__
) # Check if forward has a docstring
def test_initialization(dense_block):

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Redefining name 'dense_block' from outer scope (line 8) Note test

Redefining name 'dense_block' from outer scope (line 8)
def test_forward(self):
x = torch.randn(32, 10)
output = self.dense_block(x)
def test_forward(dense_block):

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Redefining name 'dense_block' from outer scope (line 8) Note test

Redefining name 'dense_block' from outer scope (line 8)
import sys


def delete_pycache(directory):

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Redefining name 'directory' from outer scope (line 17) Note

Redefining name 'directory' from outer scope (line 17)


def delete_pycache(directory):
for root, dirs, files in os.walk(directory):

Check notice

Code scanning / Pylintpython3 (reported by Codacy)

Unused variable 'files' Note

Unused variable 'files'
kyegomez added a commit that referenced this pull request Sep 3, 2024
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.

2 participants