epignatelli / helx

Interoperating between (Deep) Reiforcement Learning libraries
Apache License 2.0
10 stars 6 forks source link

Dueling #66

Closed epignatelli closed 10 months ago

github-actions[bot] commented 10 months ago
************* 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: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 helx.agents.dqn
helx/agents/dqn.py:132: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:35:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:35:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:56:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:56:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:61:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dqn.py:61:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dqn.py:79: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:79:4: W0221: Variadics removed in overriding 'DQN.create' method (arguments-differ)
helx/agents/dqn.py:97: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:120:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'DQN.sample_action' method (arguments-renamed)
helx/agents/dqn.py:121:67: W0622: Redefining built-in 'eval' (redefined-builtin)
helx/agents/dqn.py:135:4: C0116: Missing function or method docstring (missing-function-docstring)
helx/agents/dqn.py:158:4: W0237: Parameter 'agent_state' has been renamed to 'train_state' in overriding 'DQN.update' method (arguments-renamed)
helx/agents/dqn.py:158:4: W0237: Parameter 'timesteps' has been renamed to 'transition' in overriding 'DQN.update' method (arguments-renamed)
helx/agents/dqn.py:174:22: C3001: Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (unnecessary-lambda-assignment)
helx/agents/dqn.py:188:12: W0108: Lambda may not be necessary (unnecessary-lambda)
************* Module helx.agents.dueling_dqn
helx/agents/dueling_dqn.py:1:0: C0114: Missing module docstring (missing-module-docstring)
helx/agents/dueling_dqn.py:25:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:25:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:29:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:29:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:33:0: C0115: Missing class docstring (missing-class-docstring)
helx/agents/dueling_dqn.py:33:0: R0903: Too few public methods (0/2) (too-few-public-methods)
helx/agents/dueling_dqn.py:22: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.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.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)

Report
======
193 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |5      |NC         |NC         |0.00        |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |17     |NC         |NC         |35.29       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |16     |NC         |NC         |87.50       |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |2      |NC         |NC         |50.00       |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies
---------------------
::

    helx (examples.dueling_navix_empty)
      \-base 
        \-mdp (helx.agents.dqn)
        \-memory (helx.agents.dqn)
        \-modules (helx.agents.dueling_dqn)
        \-spaces (helx.agents.dqn)

572 lines have been analyzed

Raw metrics
-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |362    |63.29 |NC       |NC         |
+----------+-------+------+---------+-----------+
|docstring |48     |8.39  |NC       |NC         |
+----------+-------+------+---------+-----------+
|comment   |79     |13.81 |NC       |NC         |
+----------+-------+------+---------+-----------+
|empty     |83     |14.51 |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 |25     |NC       |NC         |
+-----------+-------+---------+-----------+
|refactor   |14     |NC       |NC         |
+-----------+-------+---------+-----------+
|warning    |11     |NC       |NC         |
+-----------+-------+---------+-----------+
|error      |0      |NC       |NC         |
+-----------+-------+---------+-----------+

Messages
--------

+-------------------------------+------------+
|message id                     |occurrences |
+===============================+============+
|too-few-public-methods         |14          |
+-------------------------------+------------+
|missing-class-docstring        |11          |
+-------------------------------+------------+
|missing-module-docstring       |5           |
+-------------------------------+------------+
|missing-function-docstring     |3           |
+-------------------------------+------------+
|arguments-renamed              |3           |
+-------------------------------+------------+
|arguments-differ               |3           |
+-------------------------------+------------+
|wrong-import-order             |2           |
+-------------------------------+------------+
|unused-argument                |1           |
+-------------------------------+------------+
|unnecessary-lambda-assignment  |1           |
+-------------------------------+------------+
|unnecessary-lambda             |1           |
+-------------------------------+------------+
|reimported                     |1           |
+-------------------------------+------------+
|redefined-builtin              |1           |
+-------------------------------+------------+
|line-too-long                  |1           |
+-------------------------------+------------+
|consider-using-f-string        |1           |
+-------------------------------+------------+
|consider-using-enumerate       |1           |
+-------------------------------+------------+
|attribute-defined-outside-init |1           |
+-------------------------------+------------+

-----------------------------------
Your code has been rated at 7.41/10