mfinzi/LieConv

View on GitHub

Showing 44 of 55 total issues

Function conv2d has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def conv2d(in_channels,out_channels,kernel_size=3,coords=False,dilation=1,**kwargs):
Severity: Minor
Found in lie_conv/utils.py - About 45 mins to fix

    Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self,chin,chout,conv,bn=False,act='swish',fill=None):
    Severity: Minor
    Found in lie_conv/lieConv.py - About 45 mins to fix

      Function download_dataset_qm9 has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def download_dataset_qm9(datadir, dataname, splits=None, calculate_thermo=True, exclude=True, cleanup=True):
      Severity: Minor
      Found in corm_data/prepare/qm9.py - About 45 mins to fix

        Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self,num_species,charge_scale,num_outputs=1,d=3,k=64,num_layers=1):
        Severity: Minor
        Found in lie_conv/graphnets.py - About 45 mins to fix

          Function prepare_dataset has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def prepare_dataset(datadir, dataset, subset=None, splits=None, cleanup=True, force_download=False):
          Severity: Minor
          Found in corm_data/prepare/download.py - About 45 mins to fix

            Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(self, data, included_species=None, num_pts=-1, normalize=True, shuffle=True, subtract_thermo=True):
            Severity: Minor
            Found in corm_data/dataset.py - About 45 mins to fix

              Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def __init__(self, d=2,k=300,num_layers=4,sys_dim=2,**kwargs):
              Severity: Minor
              Found in lie_conv/dynamicsTrainer.py - About 35 mins to fix

                Function forward has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def forward(self, x, edge_index, edge_attr, u, batch):
                Severity: Minor
                Found in lie_conv/graphnets.py - About 35 mins to fix

                  Function knn_point has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def knn_point(nbhd, xyz, new_xyz, mask, distance=square_distance):
                  Severity: Minor
                  Found in lie_conv/utils.py - About 35 mins to fix

                    Function download_dataset_md17 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def download_dataset_md17(datadir, dataname, subset, splits=None, cleanup=True):
                    Severity: Minor
                    Found in corm_data/prepare/md17.py - About 35 mins to fix

                      Function pConvBNrelu has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def pConvBNrelu(in_channels,out_channels,bn=True,act='swish',**kwargs):
                      Severity: Minor
                      Found in lie_conv/lieConv.py - About 35 mins to fix

                        Function forward has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def forward(self, x, edge_index, edge_attr, u, batch):
                        Severity: Minor
                        Found in lie_conv/graphnets.py - About 35 mins to fix

                          Function LieConvBNrelu has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def LieConvBNrelu(in_channels,out_channels,bn=True,act='swish',**kwargs):
                          Severity: Minor
                          Found in lie_conv/lieConv.py - About 35 mins to fix

                            Function forward has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def forward(self, src, dest, edge_attr, u, batch):
                            Severity: Minor
                            Found in lie_conv/graphnets.py - About 35 mins to fix

                              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):
                              Severity: Minor
                              Found in lie_conv/utils.py - About 35 mins to fix

                                Function WeightNet has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def WeightNet(in_dim,out_dim,act,bn,k=32):
                                Severity: Minor
                                Found in lie_conv/lieConv.py - About 35 mins to fix

                                  Function process_xyz_files has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def process_xyz_files(data, process_file_fn, file_ext=None, file_idx_list=None, stack=True):
                                  Severity: Minor
                                  Found in corm_data/prepare/process.py - About 35 mins to fix

                                    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):
                                    Severity: Minor
                                    Found in lie_conv/dynamicsTrainer.py - About 35 mins to fix

                                      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:
                                      Severity: Minor
                                      Found in corm_data/prepare/md17.py - About 35 mins to fix

                                      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
                                      Severity: Minor
                                      Found in lie_conv/lieConv.py - About 25 mins to fix

                                      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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language