Showing 14 of 19 total issues
File env.py
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from . import utils, dataset_functions as dset_F
from .pandas_backend import pd
import pickle
from torch.utils.data import Dataset, DataLoader
from sklearn.model_selection import train_test_split
Function bcq_update
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def bcq_update(
batch,
params,
nets,
optimizer,
- 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 bcq_update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def bcq_update(
Function reinforce_update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def reinforce_update(
Function ddpg_update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ddpg_update(
Function value_update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def value_update(
Function td3_update
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def td3_update(
Function _select_action_with_TopK_correction
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _select_action_with_TopK_correction(
Function batch_contstate_discaction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def batch_contstate_discaction(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function _select_action_with_correction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _select_action_with_correction(
Function batch_tensor_embeddings
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def batch_tensor_embeddings(batch, item_embeddings_tensor, frame_size, *args, **kwargs):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function td3_update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def td3_update(
batch,
params,
nets,
optimizer,
- 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"