From e25b475cbe7036e7382e445dcd9cb2e23b3e4829 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 19 Jun 2020 10:55:51 +0200 Subject: [PATCH] Avoid SyntaxWarning on Python >= 3.8 (#304) % `python3.8` ``` >>> 0 is 0 :1: SyntaxWarning: "is" with a literal. Did you mean "=="? >>> 'Double' is 'Double' :1: SyntaxWarning: "is" with a literal. Did you mean "=="? ``` --- benchmark/torch/dqn/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/torch/dqn/train.py b/benchmark/torch/dqn/train.py index ba64b95..0579b21 100644 --- a/benchmark/torch/dqn/train.py +++ b/benchmark/torch/dqn/train.py @@ -121,7 +121,7 @@ def main(): model = AtariModel(CONTEXT_LEN, act_dim, args.algo) if args.algo in ['DQN', 'Dueling']: algorithm = DQN(model, gamma=GAMMA, lr=args.lr) - elif args.algo is 'Double': + elif args.algo == 'Double': algorithm = DDQN(model, gamma=GAMMA, lr=args.lr) agent = AtariAgent(algorithm, act_dim=act_dim) -- GitLab