From 64837f9a737ecaa97226e2bd0dd7c6420264d2c1 Mon Sep 17 00:00:00 2001 From: SandishKumarHN Date: Wed, 28 Feb 2024 17:21:11 -0800 Subject: [PATCH] flake8 errors --- test/test_cost.py | 6 +----- torchrl/objectives/dqn.py | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/test_cost.py b/test/test_cost.py index 088c4f08ed5..dc1ce428844 100644 --- a/test/test_cost.py +++ b/test/test_cost.py @@ -491,13 +491,10 @@ def test_dqn(self, delay_value, double_dqn, device, action_spec_type, td_est): ) loss_fn = DQNLoss( actor, - loss_function="l2", - delay_value=delay_value, - double_dqn=double_dqn, - return_tensorclass=False,, + return_tensorclass=False, ) if td_est in (ValueEstimators.GAE, ValueEstimators.VTrace): with pytest.raises(NotImplementedError): @@ -7035,7 +7032,6 @@ def test_a2c(self, device, gradient_mode, advantage, td_est, functional): value, loss_critic_type="l2", functional=functional, - reduction=reduction, ) # Check error is raised when actions require grads diff --git a/torchrl/objectives/dqn.py b/torchrl/objectives/dqn.py index c2ef432bf69..2fb06c7de17 100644 --- a/torchrl/objectives/dqn.py +++ b/torchrl/objectives/dqn.py @@ -27,7 +27,6 @@ from torchrl.objectives.common import LossModule from torchrl.objectives.utils import ( _GAMMA_LMBDA_DEPREC_ERROR, - _reduce, default_value_kwargs, distance_loss, ValueEstimators,