************* Module examples.ddqn_gymnax_catch
examples/ddqn_gymnax_catch.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/ddqn_gymnax_catch.py:28:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/ddqn_gymnax_catch.py:28:9: W0613: Unused argument 'argv' (unused-argument)
examples/ddqn_gymnax_catch.py:22:0: C0411: third party import "import wandb" should be placed before "import helx" (wrong-import-order)
************* Module examples.dqn_bsuite_catch
examples/dqn_bsuite_catch.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/dqn_bsuite_catch.py:28:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/dqn_bsuite_catch.py:28:9: W0613: Unused argument 'argv' (unused-argument)
examples/dqn_bsuite_catch.py:22:0: C0411: third party import "import wandb" should be placed before "import helx" (wrong-import-order)
************* Module examples.dueling_navix_empty
examples/dueling_navix_empty.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/dueling_navix_empty.py:28:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/dueling_navix_empty.py:33:10: E1101: Module 'helx' has no 'environment' member (no-member)
examples/dueling_navix_empty.py:28:9: W0613: Unused argument 'argv' (unused-argument)
examples/dueling_navix_empty.py:22:0: C0411: third party import "import wandb" should be placed before "import helx" (wrong-import-order)
************* Module examples.sac_brax_halfcheetah
examples/sac_brax_halfcheetah.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/sac_brax_halfcheetah.py:24:43: E1101: Module 'helx.agents' has no 'SACHParams' member (no-member)
examples/sac_brax_halfcheetah.py:28:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/sac_brax_halfcheetah.py:42:8: E1101: Module 'helx.agents' has no 'SACDHParams' member (no-member)
examples/sac_brax_halfcheetah.py:60:12: E1101: Module 'helx.agents' has no 'SAC' member (no-member)
examples/sac_brax_halfcheetah.py:28:9: W0613: Unused argument 'argv' (unused-argument)
examples/sac_brax_halfcheetah.py:22:0: C0411: third party import "import wandb" should be placed before "import helx" (wrong-import-order)
************* Module examples.sacd_navix_keydoor
examples/sacd_navix_keydoor.py:1:0: C0114: Missing module docstring (missing-module-docstring)
examples/sacd_navix_keydoor.py:22:43: E1101: Module 'helx.agents' has no 'SACDHParams' member (no-member)
examples/sacd_navix_keydoor.py:26:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/sacd_navix_keydoor.py:43:8: E1101: Module 'helx.agents' has no 'SACDHParams' member (no-member)
examples/sacd_navix_keydoor.py:61:12: E1101: Module 'helx.agents' has no 'SACD' member (no-member)
examples/sacd_navix_keydoor.py:26:9: W0613: Unused argument 'argv' (unused-argument)
examples/sacd_navix_keydoor.py:20:0: C0411: third party import "import wandb" should be placed before "import helx" (wrong-import-order)
************* Module helx.__init__
helx/__init__.py:1:0: C0304: Final newline missing (missing-final-newline)
************* Module helx
helx/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx._version
helx/_version.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.agents
helx/agents/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.agents.agent
helx/agents/agent.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/agent.py:27:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/agent.py:27:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/agent.py:35:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/agent.py:35:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/agent.py:41:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/agent.py:41:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/agent.py:47:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/agent.py:52:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/agent.py:52:4: E0213: Method 'create' should have "self" as first argument (no-self-argument)
helx/agents/agent.py:56:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/agent.py:60:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/agent.py:61:69: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/agent.py:66:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module helx.agents.ddqn
helx/agents/ddqn.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/ddqn.py:26:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/ddqn.py:26:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/ddqn.py:30:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/ddqn.py:30:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/ddqn.py:34:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/ddqn.py:34:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module helx.agents.dqn
helx/agents/dqn.py:133:0: C0301: Line too long (112/100) (line-too-long)
helx/agents/dqn.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/dqn.py:36:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:36:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:57:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:57:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:62:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:62:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:80:4: W0221: Number of parameters was 1 in 'Agent.create' and is now 4 in overriding 'DQN.create' method (arguments-differ)
helx/agents/dqn.py:80:4: W0221: Variadics removed in overriding 'DQN.create' method (arguments-differ)
helx/agents/dqn.py:98:4: W0221: Number of parameters was 3 in 'Agent.init' and is now 3 in overriding 'DQN.init' method (arguments-differ)
helx/agents/dqn.py:121:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'DQN.sample_action' method (arguments-renamed)
helx/agents/dqn.py:122:67: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/dqn.py:136:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/dqn.py:159:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'DQN.update' method (arguments-renamed)
helx/agents/dqn.py:159:4: W0237: Parameter 'timesteps' has been renamed to 'transition' in overriding 'DQN.update' method (arguments-renamed)
helx/agents/dqn.py:175:22: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)
helx/agents/dqn.py:189:12: W0108: Lambda may not be necessary (unnecessary-lambda)
helx/agents/dqn.py:32:0: W0611: Unused losses imported from helx.base (unused-import)
************* Module helx.agents.dueling_dqn
helx/agents/dueling_dqn.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/dueling_dqn.py:26:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:26:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:30:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:30:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:34:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:34:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:38:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:23:0: C0411: first party import "from helx.base.modules import Split, Merge, Parallel" should be placed before "from .dqn import DQNHParams, DQNLog, DQNState, DQN" (wrong-import-order)
************* Module helx.agents.random
helx/agents/random.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/random.py:24:0: W0223: Method 'create' is abstract in class 'Agent' but is not overridden in child class 'Random' (abstract-method)
helx/agents/random.py:24:0: W0223: Method 'init' is abstract in class 'Agent' but is not overridden in child class 'Random' (abstract-method)
helx/agents/random.py:30:4: W0231: __init__ method from base class 'Agent' is not called (super-init-not-called)
helx/agents/random.py:39:4: W0237: Parameter 'agent_state' has been renamed to 'observation' in overriding 'Random.sample_action' method (arguments-renamed)
helx/agents/random.py:39:4: W0237: Parameter 'obs' has been renamed to 'eval' in overriding 'Random.sample_action' method (arguments-renamed)
helx/agents/random.py:39:48: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/random.py:39:28: W0613: Unused argument 'observation' (unused-argument)
helx/agents/random.py:39:0: W0613: Unused argument 'kwargs' (unused-argument)
helx/agents/random.py:42:4: W0221: Number of parameters was 4 in 'Agent.update' and is now 2 in overriding 'Random.update' method (arguments-differ)
helx/agents/random.py:42:21: W0613: Unused argument 'episode' (unused-argument)
helx/agents/random.py:21:0: C0411: first party import "from helx.base.mdp import Timestep" should be placed before "from .agent import Agent, HParams" (wrong-import-order)
************* Module helx.agents.sac
helx/agents/sac.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/sac.py:43:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/sac.py:43:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/sac.py:60:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/sac.py:60:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/sac.py:70:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/sac.py:70:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/sac.py:109:4: W0221: Number of parameters was 1 in 'Agent.create' and is now 5 in overriding 'SAC.create' method (arguments-differ)
helx/agents/sac.py:109:4: W0221: Variadics removed in overriding 'SAC.create' method (arguments-differ)
helx/agents/sac.py:138:4: W0221: Number of parameters was 3 in 'Agent.init' and is now 3 in overriding 'SAC.init' method (arguments-differ)
helx/agents/sac.py:167:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'SAC.sample_action' method (arguments-renamed)
helx/agents/sac.py:168:67: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/sac.py:181:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/sac.py:181:4: R0914: Too many local variables (41/15) (too-many-locals)
helx/agents/sac.py:218:8: C0103: Variable name "qA_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:218:14: C0103: Variable name "qB_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:229:34: E0602: Undefined variable 'probs_a_tm1' (undefined-variable)
helx/agents/sac.py:232:8: C0103: Variable name "qA_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:232:16: C0103: Variable name "qB_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:233:8: C0103: Variable name "qA_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:233:14: C0103: Variable name "qB_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:240:12: E0602: Undefined variable 'discount_t' (undefined-variable)
helx/agents/sac.py:244:8: C0103: Variable name "qA_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:244:16: C0103: Variable name "qB_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:245:8: C0103: Variable name "qA_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:245:14: C0103: Variable name "qB_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sac.py:192:12: W0612: Unused variable 'k2' (unused-variable)
helx/agents/sac.py:214:8: W0612: Unused variable 'a_t' (unused-variable)
helx/agents/sac.py:273:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'SAC.update' method (arguments-renamed)
helx/agents/sac.py:273:4: W0237: Parameter 'timesteps' has been renamed to 'transition' in overriding 'SAC.update' method (arguments-renamed)
helx/agents/sac.py:304:12: W0108: Lambda may not be necessary (unnecessary-lambda)
************* Module helx.agents.sacd
helx/agents/sacd.py:124:0: C0301: Line too long (101/100) (line-too-long)
helx/agents/sacd.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/sacd.py:34:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/sacd.py:34:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/sacd.py:78:67: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/sacd.py:85:4: W0237: Parameter 'timesteps' has been renamed to 'transition' in overriding 'SACD.loss' method (arguments-renamed)
helx/agents/sacd.py:85:4: W0221: Number of parameters was 4 in 'SAC.loss' and is now 3 in overriding 'SACD.loss' method (arguments-differ)
helx/agents/sacd.py:85:4: R0914: Too many local variables (34/15) (too-many-locals)
helx/agents/sacd.py:96:23: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)
helx/agents/sacd.py:115:8: C0103: Variable name "qA_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sacd.py:115:16: C0103: Variable name "qB_tm1" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sacd.py:116:8: C0103: Variable name "qA_t" doesn't conform to snake_case naming style (invalid-name)
helx/agents/sacd.py:116:14: C0103: Variable name "qB_t" doesn't conform to snake_case naming style (invalid-name)
************* Module helx.base
helx/base/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.base.config
helx/base/config.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/config.py:27:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/config.py:28:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:27:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/config.py:62:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/config.py:63:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:62:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/config.py:102:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:103:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/base/config.py:118:25: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/base/config.py:102:0: R0911: Too many return statements (7/6) (too-many-return-statements)
helx/base/config.py:121:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:130:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:130:0: R1711: Useless return at end of function or method (useless-return)
helx/base/config.py:160:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:161:48: W0621: Redefining name 'flags' from outer scope (line 21) (redefined-outer-name)
helx/base/config.py:171:29: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/base/config.py:178:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/config.py:180:4: W0101: Unreachable code (unreachable)
helx/base/config.py:180:4: C0415: Import outside toplevel (yaml) (import-outside-toplevel)
helx/base/config.py:182:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
************* Module helx.base.image
helx/base/image.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/image.py:24:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/image.py:29:7: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/base/image.py:64:12: W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
helx/base/image.py:64:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
************* Module helx.base.losses
helx/base/losses.py:12:0: C0301: Line too long (117/100) (line-too-long)
helx/base/losses.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/losses.py:12:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/losses.py:21:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/losses.py:41:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/losses.py:41:0: R0914: Too many local variables (16/15) (too-many-locals)
helx/base/losses.py:59:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/losses.py:59:0: R0913: Too many arguments (6/5) (too-many-arguments)
helx/base/losses.py:61:4: W0613: Unused argument 'critic' (unused-argument)
helx/base/losses.py:62:4: W0613: Unused argument 'params' (unused-argument)
helx/base/losses.py:63:4: W0613: Unused argument 'params_target' (unused-argument)
helx/base/losses.py:64:4: W0613: Unused argument 'entropy' (unused-argument)
helx/base/losses.py:67:4: W0612: Unused variable 's_tm1' (unused-variable)
helx/base/losses.py:67:11: W0612: Unused variable 's_t' (unused-variable)
helx/base/losses.py:67:16: W0612: Unused variable 'a_tm1' (unused-variable)
helx/base/losses.py:67:23: W0612: Unused variable 'r_t' (unused-variable)
helx/base/losses.py:67:28: W0612: Unused variable 'terminal_tm1' (unused-variable)
helx/base/losses.py:67:42: W0612: Unused variable 'discount_t' (unused-variable)
************* Module helx.base.mdp
helx/base/mdp.py:36:0: C0301: Line too long (105/100) (line-too-long)
helx/base/mdp.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/mdp.py:30:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/mdp.py:30:0: R0903: Too few public methods (0/2) (too-few-public-methods)
************* Module helx.base.memory
helx/base/memory.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.base.modules
helx/base/modules.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/modules.py:25:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/modules.py:25:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:33:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/modules.py:33:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:43:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/modules.py:43:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:51:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/modules.py:51:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:59:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:67:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:75:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/modules.py:75:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:107:8: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate)
helx/base/modules.py:87:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/modules.py:148:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/modules.py:154:11: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/base/modules.py:160:8: W0201: Attribute 'modules' defined outside __init__ (attribute-defined-outside-init)
************* Module helx.base.preprocess
helx/base/preprocess.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.base.spaces
helx/base/spaces.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/base/spaces.py:25:0: W0404: Reimport 'Shape' (imported line 23) (reimported)
helx/base/spaces.py:34:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/spaces.py:40:15: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/base/spaces.py:44:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/base/spaces.py:48:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/spaces.py:48:0: R0903: Too few public methods (1/2) (too-few-public-methods)
helx/base/spaces.py:60:0: C0115: Missing class docstring (missing-class-docstring)
helx/base/spaces.py:60:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module helx.envs
helx/envs/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/__init__.py:17:0: W0404: Reimport 'environment' (imported line 17) (reimported)
************* Module helx.envs.brax
helx/envs/brax.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/brax.py:35:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'BraxWrapper.wraps' method (arguments-differ)
************* Module helx.envs.bsuite
helx/envs/bsuite.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/bsuite.py:42:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/bsuite.py:43:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/bsuite.py:53:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/envs/bsuite.py:62:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'BsuiteWrapper.wraps' method (arguments-differ)
************* Module helx.envs.dm_env
helx/envs/dm_env.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/dm_env.py:45:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/dm_env.py:46:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/dm_env.py:58:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/envs/dm_env.py:62:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/dm_env.py:92:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'DmEnvWrapper.wraps' method (arguments-differ)
************* Module helx.envs.environment
helx/envs/environment.py:31:0: C0115: Missing class docstring (missing-class-docstring)
helx/envs/environment.py:37:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/environment.py:44:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/environment.py:57:0: C0115: Missing class docstring (missing-class-docstring)
helx/envs/environment.py:61:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/environment.py:64:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module helx.envs.gym
helx/envs/gym.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/gym.py:45:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gym.py:46:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/gym.py:56:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/envs/gym.py:60:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gym.py:88:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'GymWrapper.wraps' method (arguments-differ)
helx/envs/gym.py:97:4: W0237: Parameter 'key' has been renamed to 'seed' in overriding 'GymWrapper.reset' method (arguments-renamed)
helx/envs/gym.py:18:0: W0611: Unused Tuple imported from typing (unused-import)
************* Module helx.envs.gymnasium
helx/envs/gymnasium.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/gymnasium.py:43:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gymnasium.py:44:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/gymnasium.py:54:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/envs/gymnasium.py:58:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gymnasium.py:86:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'GymnasiumWrapper.wraps' method (arguments-differ)
helx/envs/gymnasium.py:97:4: W0237: Parameter 'key' has been renamed to 'seed' in overriding 'GymnasiumWrapper.reset' method (arguments-renamed)
helx/envs/gymnasium.py:17:0: W0611: Unused Tuple imported from typing (unused-import)
************* Module helx.envs.gymnax
helx/envs/gymnax.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/gymnax.py:23:0: W0404: Reimport 'EnvParams' (imported line 22) (reimported)
helx/envs/gymnax.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gymnax.py:39:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/gymnax.py:39:0: R0913: Too many arguments (7/5) (too-many-arguments)
helx/envs/gymnax.py:59:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'GymnaxWrapper.wraps' method (arguments-differ)
helx/envs/gymnax.py:81:34: W0612: Unused variable 'info' (unused-variable)
helx/envs/gymnax.py:25:0: C0412: Imports from package jax are not grouped (ungrouped-imports)
************* Module helx.envs.interop
helx/envs/interop.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/interop.py:77:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/interop.py:85:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/interop.py:77:0: R0911: Too many return statements (8/6) (too-many-return-statements)
************* Module helx.envs.navix
helx/envs/navix.py:102:0: C0305: Trailing newlines (trailing-newlines)
helx/envs/navix.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/envs/navix.py:42:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/envs/navix.py:43:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
helx/envs/navix.py:53:12: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/envs/navix.py:62:4: W0221: Number of parameters was 2 in 'EnvironmentWrapper.wraps' and is now 2 in overriding 'NavixWrapper.wraps' method (arguments-differ)
************* Module helx.experiment
helx/experiment/__init__.py:1:0: C0114: Missing module docstring (missing-module-docstring)
************* Module helx.experiment.logging
helx/experiment/logging.py:56:0: C0301: Line too long (126/100) (line-too-long)
helx/experiment/logging.py:62:0: C0301: Line too long (129/100) (line-too-long)
helx/experiment/logging.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/experiment/logging.py:4:0: W0404: Reimport 'logging' (imported line 1) (reimported)
helx/experiment/logging.py:18:0: C0115: Missing class docstring (missing-class-docstring)
helx/experiment/logging.py:18:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/experiment/logging.py:32:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/logging.py:38:12: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
helx/experiment/logging.py:50:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/logging.py:55:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/logging.py:56:4: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
helx/experiment/logging.py:56:44: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/experiment/logging.py:61:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/logging.py:62:4: W1201: Use lazy % formatting in logging functions (logging-not-lazy)
helx/experiment/logging.py:62:44: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
helx/experiment/logging.py:67:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/logging.py:4:0: C0412: Imports from package logging are not grouped (ungrouped-imports)
************* Module helx.experiment.running
helx/experiment/running.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/experiment/running.py:27:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/running.py:31:4: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/experiment/running.py:51:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/running.py:51:0: R0913: Too many arguments (7/5) (too-many-arguments)
helx/experiment/running.py:59:4: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/experiment/running.py:76:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/running.py:104:0: C0116: Missing function or method docstring (missing-function-docstring)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.envs.gym:[48:82]
==helx.envs.gymnasium:[46:80]
return Continuous(
shape=gym_space.shape,
minimum=gym_space.low.min().item(),
maximum=gym_space.high.max().item(),
)
else:
raise NotImplementedError(
"Cannot convert dm_env space of type {}".format(type(gym_space))
)
def timestep_from_gym(gym_step: GymTimestep, action: Array, t: Array) -> Timestep:
obs, reward, terminated, truncated, _ = gym_step
if terminated:
step_type = TERMINATION
elif truncated:
step_type = TRUNCATION
else:
step_type = TRANSITION
obs = jnp.asarray(obs)
reward = jnp.asarray(reward)
action = jnp.asarray(action)
return Timestep(
observation=obs,
reward=reward,
step_type=step_type,
action=action,
t=t,
state=None,
)
(duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.ddqn_gymnax_catch:[32:63]
==examples.dqn_bsuite_catch:[32:63]
env = helx.envs.interop.to_helx(env)
# optimiser
optimiser = optax.rmsprop(
learning_rate=FLAGS.learning_rate,
momentum=FLAGS.gradient_momentum,
eps=FLAGS.min_squared_gradient,
centered=True,
)
# agent
hparams = helx.base.config.hparams_from_flags(
helx.agents.DQNHParams,
obs_space=env.observation_space,
action_space=env.action_space,
replay_start=10,
batch_size=2,
)
backbone = nn.Sequential(
[
helx.base.modules.Flatten(),
helx.base.modules.MLP(features=[32, 16]),
]
)
agent = helx.agents.DQN.create(
hparams=hparams,
optimiser=optimiser,
backbone=backbone,
)
(duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.sac_brax_halfcheetah:[37:59]
==examples.sacd_navix_keydoor:[38:60]
)
# agent
hparams = helx.base.config.hparams_from_flags(
helx.agents.SACDHParams,
obs_space=env.observation_space,
action_space=env.action_space,
replay_start=10,
batch_size=2,
)
actor_backbone = nn.Sequential(
[
helx.base.modules.Flatten(),
helx.base.modules.MLP(features=[32, 16]),
]
)
critic_backbone = nn.Sequential(
[
helx.base.modules.Flatten(),
helx.base.modules.MLP(features=[32, 16]),
]
) (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.envs.bsuite:[62:77]
==helx.envs.dm_env:[92:107]
self = cls(
env=env,
observation_space=to_helx(env.observation_spec()), # type: ignore
action_space=to_helx(env.action_spec()), # type: ignore
reward_space=to_helx(env.reward_spec()), # type: ignore
)
return self
def reset(self, key: int | None = None) -> Timestep:
next_step = self.env.reset()
return timestep_to_helx(next_step, jnp.asarray(-1), jnp.asarray(0))
def _step(self, key: KeyArray, timestep: Timestep, action: Array) -> Timestep:
next_step = self.env.step(action.item())
return timestep_to_helx(next_step, action, timestep.t + 1) (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.dqn:[206:219]
==helx.agents.sac:[318:331]
step_type=transition.step_type[-1],
returns=train_state.log.returns
+ jnp.sum(
self.hparams.discount ** transition.t[:-1] * transition.reward[:-1]
),
buffer_size=buffer.size(),
)
# update train_state
train_state = train_state.replace(
iteration=iteration,
opt_state=opt_state,
params=params, (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.ddqn_gymnax_catch:[45:57]
==examples.dueling_navix_empty:[45:57]
obs_space=env.observation_space,
action_space=env.action_space,
replay_start=10,
batch_size=2,
)
backbone = nn.Sequential(
[
helx.base.modules.Flatten(),
helx.base.modules.MLP(features=[32, 16]),
]
) (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.envs.dm_env:[76:86]
==helx.envs.gym:[72:82]
return Timestep(
observation=obs,
reward=reward,
step_type=step_type,
action=action,
t=t,
state=None,
)
(duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.sac_brax_halfcheetah:[60:71]
==examples.sacd_navix_keydoor:[61:72]
hparams=hparams,
optimiser=optimiser,
actor_backbone=actor_backbone,
critic_backbone=critic_backbone,
)
helx.experiment.jrun(seed=FLAGS.seed, agent=agent, env=env, budget=20)
if __name__ == "__main__":
app.run(main) (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.ddqn_gymnax_catch:[32:44]
==examples.sacd_navix_keydoor:[30:42]
env = helx.envs.interop.to_helx(env)
# optimiser
optimiser = optax.rmsprop(
learning_rate=FLAGS.learning_rate,
momentum=FLAGS.gradient_momentum,
eps=FLAGS.min_squared_gradient,
centered=True,
)
# agent
hparams = helx.base.config.hparams_from_flags( (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.envs.bsuite:[33:47]
==helx.envs.dm_env:[36:50]
...
@overload
def to_helx(dm_space: dm_env.specs.BoundedArray) -> Continuous:
...
def to_helx(dm_space: dm_env.specs.Array) -> Space:
if isinstance(dm_space, dm_env.specs.DiscreteArray):
return Discrete(dm_space.num_values)
elif isinstance(dm_space, dm_env.specs.BoundedArray):
return Continuous(
shape=dm_space.shape, (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.ddqn:[49:57]
==helx.agents.dqn:[141:149]
s_tm1 = timesteps.observation[:-1]
s_t = timesteps.observation[1:]
a_tm1 = timesteps.action[:-1][0] # [0] because scalar
r_t = timesteps.reward[:-1][0] # [0] because scalar
terminal_tm1 = timesteps.step_type[:-1] != TERMINATION
discount_t = self.hparams.discount ** timesteps.t[:-1][0] # [0] because scalar
q_tm1 = jnp.asarray(self.critic.apply(params, s_tm1))
(duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.ddqn_gymnax_catch:[58:68]
==examples.dueling_navix_empty:[58:68]
hparams=hparams,
optimiser=optimiser,
backbone=backbone,
)
helx.experiment.jrun(seed=FLAGS.seed, agent=agent, env=env, budget=20)
if __name__ == "__main__":
app.run(main) (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==examples.ddqn_gymnax_catch:[35:44]
==examples.dueling_navix_empty:[35:44]
optimiser = optax.rmsprop(
learning_rate=FLAGS.learning_rate,
momentum=FLAGS.gradient_momentum,
eps=FLAGS.min_squared_gradient,
centered=True,
)
# agent
hparams = helx.base.config.hparams_from_flags( (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.dqn:[151:166]
==helx.base.losses:[32:47]
td_error = rlax.q_learning(
q_tm1, a_tm1, r_t, discount_t, q_t, stop_target_gradients=True
)
td_error = jnp.asarray(td_error)
td_loss = jnp.mean(0.5 * td_error**2)
return td_loss
def update(
self,
train_state: DQNState,
transition: Timestep,
*,
key: KeyArray,
) -> DQNState:
# update iteration (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.dqn:[187:195]
==helx.agents.sac:[302:310]
cond,
lambda p, o: _sgd_step(p, o),
lambda p, o: (p, o, jnp.asarray(float("inf"))),
train_state.params,
train_state.opt_state,
)
# update target critic (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.dqn:[42:49]
==helx.agents.sac:[47:53]
replay_start: int = 1000
replay_memory_size: int = 1000
update_frequency: int = 1
target_network_update_frequency: int = 10000
discount: float = 0.99
n_steps: int = 1 (duplicate-code)
helx/experiment/running.py:1:0: R0801: Similar lines in 2 files
==helx.agents.ddqn:[49:54]
==helx.base.losses:[12:17]
s_tm1 = timesteps.observation[:-1]
s_t = timesteps.observation[1:]
a_tm1 = timesteps.action[:-1][0] # [0] because scalar
r_t = timesteps.reward[:-1][0] # [0] because scalar
terminal_tm1 = timesteps.step_type[:-1] != TERMINATION (duplicate-code)
Report
======
1272 statements analysed.
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |37 |NC |NC |2.70 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |50 |NC |NC |36.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|method |74 |NC |NC |81.08 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|function |66 |NC |NC |46.97 |3.03 |
+---------+-------+-----------+-----------+------------+---------+
External dependencies
---------------------
::
helx (examples.ddqn_gymnax_catch,examples.dqn_bsuite_catch,examples.dueling_navix_empty,examples.sac_brax_halfcheetah,examples.sacd_navix_keydoor)
\-agents (helx.experiment.logging,helx.experiment.running)
\-base
| \-losses (helx.agents.dqn,helx.agents.sac)
| \-mdp (helx.agents.agent,helx.agents.ddqn,helx.agents.dqn,helx.agents.random,helx.agents.sac,helx.agents.sacd,helx.envs.brax,helx.envs.bsuite,helx.envs.dm_env,helx.envs.environment,helx.envs.gym,helx.envs.gymnasium,helx.envs.gymnax,helx.envs.navix,helx.experiment.logging,helx.experiment.running)
| \-memory (helx.agents.dqn,helx.agents.sac)
| \-modules (helx.agents.dueling_dqn,helx.agents.sac,helx.agents.sacd)
| \-spaces (helx.agents.agent,helx.agents.dqn,helx.agents.sac,helx.agents.sacd,helx.envs.brax,helx.envs.bsuite,helx.envs.dm_env,helx.envs.environment,helx.envs.gym,helx.envs.gymnasium,helx.envs.gymnax,helx.envs.navix)
\-envs
\-environment (helx.experiment.running)
yaml (helx.base.config)
3335 lines have been analyzed
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |2086 |62.55 |NC |NC |
+----------+-------+------+---------+-----------+
|docstring |204 |6.12 |NC |NC |
+----------+-------+------+---------+-----------+
|comment |527 |15.80 |NC |NC |
+----------+-------+------+---------+-----------+
|empty |518 |15.53 |NC |NC |
+----------+-------+------+---------+-----------+
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |NC |NC |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |NC |NC |
+-------------------------+------+---------+-----------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |165 |NC |NC |
+-----------+-------+---------+-----------+
|refactor |63 |NC |NC |
+-----------+-------+---------+-----------+
|warning |74 |NC |NC |
+-----------+-------+---------+-----------+
|error |10 |NC |NC |
+-----------+-------+---------+-----------+
Messages
--------
+-------------------------------+------------+
|message id |occurrences |
+===============================+============+
|missing-function-docstring |49 |
+-------------------------------+------------+
|missing-module-docstring |36 |
+-------------------------------+------------+
|missing-class-docstring |32 |
+-------------------------------+------------+
|too-few-public-methods |30 |
+-------------------------------+------------+
|duplicate-code |17 |
+-------------------------------+------------+
|arguments-differ |15 |
+-------------------------------+------------+
|invalid-name |14 |
+-------------------------------+------------+
|consider-using-f-string |13 |
+-------------------------------+------------+
|unused-argument |12 |
+-------------------------------+------------+
|arguments-renamed |11 |
+-------------------------------+------------+
|unused-variable |9 |
+-------------------------------+------------+
|wrong-import-order |7 |
+-------------------------------+------------+
|redefined-builtin |7 |
+-------------------------------+------------+
|no-member |7 |
+-------------------------------+------------+
|no-else-return |7 |
+-------------------------------+------------+
|line-too-long |6 |
+-------------------------------+------------+
|reimported |4 |
+-------------------------------+------------+
|unused-import |3 |
+-------------------------------+------------+
|too-many-locals |3 |
+-------------------------------+------------+
|too-many-arguments |3 |
+-------------------------------+------------+
|unnecessary-lambda-assignment |2 |
+-------------------------------+------------+
|unnecessary-lambda |2 |
+-------------------------------+------------+
|ungrouped-imports |2 |
+-------------------------------+------------+
|undefined-variable |2 |
+-------------------------------+------------+
|too-many-return-statements |2 |
+-------------------------------+------------+
|logging-not-lazy |2 |
+-------------------------------+------------+
|abstract-method |2 |
+-------------------------------+------------+
|useless-return |1 |
+-------------------------------+------------+
|unspecified-encoding |1 |
+-------------------------------+------------+
|unreachable |1 |
+-------------------------------+------------+
|trailing-newlines |1 |
+-------------------------------+------------+
|super-init-not-called |1 |
+-------------------------------+------------+
|redefined-outer-name |1 |
+-------------------------------+------------+
|no-self-argument |1 |
+-------------------------------+------------+
|missing-final-newline |1 |
+-------------------------------+------------+
|logging-fstring-interpolation |1 |
+-------------------------------+------------+
|logging-format-interpolation |1 |
+-------------------------------+------------+
|import-outside-toplevel |1 |
+-------------------------------+------------+
|consider-using-enumerate |1 |
+-------------------------------+------------+
|attribute-defined-outside-init |1 |
+-------------------------------+------------+
-----------------------------------
Your code has been rated at 7.23/10