Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Inference bug, pandas docker version #153

Merged
merged 6 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion micro_dl/utils/aux_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get_sms_im_name(time_idx=None,
"""

im_name = "img"
if np.isnan(channel_name):
if channel_name is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching this bug. The channel_name can actually be a NaN when loading a frames metadata csv file with pandas, so would it work to replace the line with:
if not pd.isnull(channel_name): ?
The reason this bug escaped notice is because there are no tests for get_sms_im_name in aux_utils_tests.py, so bonus points if you add a test. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I replaced the line with if not pd.isnull(channel_name): and added a test. Curious about your feedback! :)

im_name += "_" + str(channel_name)
if time_idx is not None:
im_name += "_t" + str(time_idx).zfill(int2str_len)
Expand Down
2 changes: 1 addition & 1 deletion requirements_docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ natsort==6.0.0
nose==1.3.7
numpy==1.21.0
opencv-python==4.4.0.40
pandas==1.1.5
pandas==0.24.2
jennyfolkesson marked this conversation as resolved.
Show resolved Hide resolved
protobuf==3.20.1
pydot==1.4.1
PyYAML>=5.4
Expand Down