Showing 50 of 55 total issues
Function download_dataset_md17
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def download_dataset_md17(datadir, dataname, subset, splits=None, cleanup=True):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, num_targets=1,k=150,num_layers=4,sys_dim=2, d=2):
Function farthest_ball_point
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def farthest_ball_point(radius,nsample,xyz,new_xyz,distance=square_distance):
Function WeightNet
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def WeightNet(in_dim,out_dim,act,bn,k=32):
Function download_dataset_md17
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. 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
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"
Further reading
Function download_dataset_qm9
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def download_dataset_qm9(datadir, dataname, splits=None, calculate_thermo=True, exclude=True, cleanup=True):
"""
Download and prepare the QM9 (GDB9) dataset.
"""
# Define directory for which data will be output.
- 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 _get_species
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_species(datasets, ignore_check=False):
"""
Generate a list of all species.
Includes a check that each split contains examples of every species in the
- 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 add_thermo_targets
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_thermo_targets(data, therm_energy_dict):
"""
Adds a new molecular property, which is the thermochemical energy.
Parameters
- 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 get_thermo_dict
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_thermo_dict(gdb9dir, cleanup=True):
"""
Get dictionary of thermochemical energy to subtract off from
properties of molecules.
- 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"