Skip to content

Commit

Permalink
fixing the path separator for the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
killyosur committed Oct 9, 2023
1 parent 48815b7 commit ab239cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlrose_hiive/runners/_nn_runner_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ def _tear_down(self):

filename_root = super()._get_pickle_filename_root('')

path = os.path.join(*filename_root.split('/')[:-1])
filename_part = filename_root.split('/')[-1]
if path[0] != '/':
path = f'/{path}'
path = os.path.join(*filename_root.split(os.pathsep)[:-1])
filename_part = filename_root.split(os.pathsep)[-1]
if path[0] != os.pathsep:
path = f'{os.pathsep}{path}'
# find all data frames output by this runner
filenames = [fn for fn in os.listdir(path) if (filename_part in fn
and fn.endswith('.p')
Expand Down

0 comments on commit ab239cf

Please sign in to comment.