Showing 367 of 369 total issues
File graph_visualizer.py
has 4976 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module with embedding visualization tools."""
import functools
import inspect
import itertools
import math
File abstract_classifier_model.py
has 2643 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing abstract classes for classification models."""
import functools
import json
import os
import platform
File edge_prediction_model.py
has 1870 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing abstract edge prediction model."""
import math
import gc
import warnings
from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union
File abstract_gcn.py
has 1116 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Kipf GCN model for node-label prediction."""
import copy
import warnings
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
File abstract_edge_gcn.py
has 838 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""GCN model for edge prediction."""
from typing import Any, Dict, List, Optional, Type, Union
import numpy as np
import pandas as pd
File abstract_model.py
has 720 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing generic abstract model."""
from typing import Callable
from embiggen.utils.abstract_models.list_formatting import format_list
from typing import Dict, Any, Type, List, Optional
from dict_hash import Hashable, sha256
Function __init__
has 100 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 97 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 95 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
File edge_transformer.py
has 606 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""EdgeTransformer class to convert edges to edge embeddings."""
from typing import List, Optional, Union, Optional
import numpy as np
import pandas as pd
Function _build_model
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
Open
def _build_model(
self,
graph: Graph,
graph_convolution_model: Model,
edge_type_features: List[np.ndarray],
- 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
File sklearn_like_edge_prediction_adapter.py
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing adapter class making edge prediction possible in sklearn models."""
from typing import Type, List, Optional, Dict, Any, Union, Tuple
import numpy as np
import math
import compress_pickle
Function predict_proba
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
Open
def predict_proba(
self,
graph: Graph,
support: Optional[Graph] = None,
node_features: Optional[
- 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
File hyper_sketching.py
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing HyperSketching implementation."""
import json
import warnings
from typing import Any, Dict, List, Optional, Tuple
File dag_resnik.py
has 399 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from typing import List, Optional, Union, Dict, Tuple
import pandas as pd
import numpy as np
from ensmallen import models, Graph
File gcn.py
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""GCN model for edge prediction."""
from typing import List, Union, Optional, Dict, Any, Type
import numpy as np
from tensorflow.keras.optimizers import (
File gcn_edge_prediction_sequence.py
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Keras Sequence for Open-world assumption GCN."""
from typing import List, Optional, Tuple, Type, Union
import numpy as np
import tensorflow as tf
File sklearn_like_edge_label_prediction_adapter.py
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Module providing adapter class making edge-label prediction possible in sklearn models."""
from typing import Type, List, Dict, Optional, Any, Union
import numpy as np
import copy
import compress_pickle
Function __init__
has 41 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 41 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(