Showing 50 of 55 total issues
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, root_dir=default_root_dir, train=True, download=True, n_systems=100, regen=False,
Function forward
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def forward(self,inp,withquery=False):
abq_pairs,vals,mask = inp
dist = self.group.distance if self.group else lambda ab: norm(ab,dim=-1)
if self.ds_frac!=1:
if self.cache and self.cached_indices is None:
- 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 process_xyz_files
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def process_xyz_files(data, process_file_fn, file_ext=None, file_idx_list=None, stack=True):
"""
Take a set of datafiles and apply a predefined data processing script to each
one. Data can be stored in a directory, tarfile, or zipfile. An optional
file extension can be added.
- 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 __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, root_dir=default_root_dir, train=True, download=True, n_systems=100, space_dim=2, regen=False,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self,*args,group=T(3),ds_frac=1,fill=1/3,cache=False,knn=False,**kwargs):
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,chin,chout,conv,bn=False,act='swish',fill=None):
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 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 __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 initialize_datasets
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize_datasets(splits, datadir, dataset, subset=None,
Function forward
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def forward(self, src, dest, 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 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, x, edge_index, edge_attr, u, batch):
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, d=2,k=300,num_layers=4,sys_dim=2,**kwargs):
Function pConvBNrelu
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pConvBNrelu(in_channels,out_channels,bn=True,act='swish',**kwargs):