tensorboard-aggregator
tensorboard-aggregator copied to clipboard
What platform is this code tested on?
Describe the bug I run into several bugs regarding the path variable.
The first attempt:
E:\Program\Anaconda3\envs\Py35\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "aggregator.py", line 142, in <module>
subpaths = [path / dname / subpath for subpath in args.subpaths for dname in os.listdir(path) if dname != FOLDER_NAME]
File "aggregator.py", line 142, in <listcomp>
subpaths = [path / dname / subpath for subpath in args.subpaths for dname in os.listdir(path) if dname != FOLDER_NAME]
TypeError: listdir: illegal type for path parameter
This is because the 'os.listdir' in line 141 complains the Path object should not be used with the os lib, instead, it should be used with its class method Path.iterdir().
Anyway, I give it a second try after fixing this. Again, another bug
Traceback (most recent call last):
File "aggregator.py", line 146, in <module>
if not os.path.exists(subpath):
File "E:\Program\Anaconda3\envs\Py35\lib\genericpath.py", line 19, in exists
os.stat(path)
TypeError: argument should be string, bytes or integer, not WindowsPath
The problem is still related to the wrongly use of Path object with os library.
To Reproduce Steps to reproduce the behavior.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10.0
- python version 3.5
- tensorflow version
- numpy version
Additional context Add any other context about the problem here.
This tool was tested on Windows 10 and python 3.7. That is something I could have documented in the readme. I also just noticed that I did not pin the dependency versions in the requirements.txt file.
I see the problem with the combination of the os
and pathlib
libraries. Would you like to open a pull request to improve on this?