Skip to content

Commit

Permalink
better fix
Browse files Browse the repository at this point in the history
  • Loading branch information
f4hy committed Oct 2, 2020
1 parent 49190e8 commit a0175da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pytorch_lightning/loggers/tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ def _get_next_version(self):
return 0

existing_versions = []
for d in self._fs.listdir(root_dir):
bn = os.path.basename(d["name"])
if self._fs.isdir(d['name']) and bn.startswith("version_"):
for listing in self._fs.listdir(root_dir):
d = listing["name"]
bn = os.path.basename(d)
if self._fs.isdir(d) and bn.startswith("version_"):
dir_ver = bn.split("_")[1].replace('/', '')
existing_versions.append(int(dir_ver))
if len(existing_versions) == 0:
Expand Down

0 comments on commit a0175da

Please sign in to comment.