Showing 44 of 55 total issues
Function conv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def conv2d(in_channels,out_channels,kernel_size=3,coords=False,dilation=1,**kwargs):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,chin,chout,conv,bn=False,act='swish',fill=None):
Function download_dataset_qm9
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def download_dataset_qm9(datadir, dataname, splits=None, calculate_thermo=True, exclude=True, cleanup=True):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,num_species,charge_scale,num_outputs=1,d=3,k=64,num_layers=1):
Function prepare_dataset
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def prepare_dataset(datadir, dataset, subset=None, splits=None, cleanup=True, force_download=False):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, data, included_species=None, num_pts=-1, normalize=True, shuffle=True, subtract_thermo=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, d=2,k=300,num_layers=4,sys_dim=2,**kwargs):
Function forward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, x, edge_index, edge_attr, u, batch):
Function knn_point
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def knn_point(nbhd, xyz, new_xyz, mask, distance=square_distance):
Function download_dataset_md17
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def download_dataset_md17(datadir, dataname, subset, splits=None, cleanup=True):
Function pConvBNrelu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pConvBNrelu(in_channels,out_channels,bn=True,act='swish',**kwargs):
Function forward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, x, edge_index, edge_attr, u, batch):
Function LieConvBNrelu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def LieConvBNrelu(in_channels,out_channels,bn=True,act='swish',**kwargs):
Function forward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, src, dest, edge_attr, u, batch):
Function farthest_ball_point
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def farthest_ball_point(radius,nsample,xyz,new_xyz,distance=square_distance):
Function WeightNet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def WeightNet(in_dim,out_dim,act,bn,k=32):
Function process_xyz_files
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def process_xyz_files(data, process_file_fn, file_ext=None, file_idx_list=None, stack=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, num_targets=1,k=150,num_layers=4,sys_dim=2, d=2):
Function download_dataset_md17
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def download_dataset_md17(datadir, dataname, subset, splits=None, cleanup=True):
"""
Downloads the MD17 dataset.
"""
if subset not in md17_subsets:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function extract_neighborhood
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def extract_neighborhood(self,inp,query_indices):
""" inputs: [pairs_abq (bs,n,n,d), inp_vals (bs,n,c), mask (bs,n), query_indices (bs,m)]
outputs: [neighbor_abq (bs,m,mc_samples,d), neighbor_vals (bs,m,mc_samples,c)]"""
# Subsample pairs_ab, inp_vals, mask to the query_indices
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"