From 6560ae99524b54970285e7395edacf75523bf081 Mon Sep 17 00:00:00 2001 From: Noah Dormann Date: Thu, 5 Dec 2019 08:52:26 +0100 Subject: [PATCH] using other_file instead of other_files --- torchy_baselines/common/base_class.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torchy_baselines/common/base_class.py b/torchy_baselines/common/base_class.py index 680ac17..8f0acca 100644 --- a/torchy_baselines/common/base_class.py +++ b/torchy_baselines/common/base_class.py @@ -330,11 +330,11 @@ class BaseRLModel(object): file_content.seek(0) params = th.load(file_content) # check for all other .pth files - other_files = [file_name for file_name in namelist if + other_file = [file_name for file_name in namelist if os.path.splitext(file_name)[1] == ".pth" and file_name != "params.pth"] - if len(other_files) > 0: + if len(other_file) > 0: opt_params = dict() - for file in other_files: + for file in other_file: with file_.open(file, mode="r") as opt_param_file: # File has to be seekable so load in BytesIO first file_content = io.BytesIO()