Skip to content

Commit a0175da

Browse files
committed
better fix
1 parent 49190e8 commit a0175da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pytorch_lightning/loggers/tensorboard.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ def _get_next_version(self):
232232
return 0
233233

234234
existing_versions = []
235-
for d in self._fs.listdir(root_dir):
236-
bn = os.path.basename(d["name"])
237-
if self._fs.isdir(d['name']) and bn.startswith("version_"):
235+
for listing in self._fs.listdir(root_dir):
236+
d = listing["name"]
237+
bn = os.path.basename(d)
238+
if self._fs.isdir(d) and bn.startswith("version_"):
238239
dir_ver = bn.split("_")[1].replace('/', '')
239240
existing_versions.append(int(dir_ver))
240241
if len(existing_versions) == 0:

0 commit comments

Comments
 (0)