Skip to content

Commit

Permalink
Merge pull request #23 from killyosaur/runners-not-os-independant
Browse files Browse the repository at this point in the history
  • Loading branch information
hiive authored Dec 7, 2023
2 parents 48815b7 + 0d879de commit 64d39c1
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.sep)[:-1])
filename_part = filename_root.split(os.sep)[-1]
if not os.path.isdir(path) and path[0] != os.sep:
path = f'{os.sep}{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 64d39c1

Please sign in to comment.