-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix read hide files bug for reader bug #174
Conversation
…tils/dataloader_instance.py
…y core/utils/dataloader_instance.py" This reverts commit 348042a.
core/trainers/framework/dataset.py
Outdated
# use files and dirs | ||
for file_name in files: | ||
file_list.append(os.path.join(train_data_path, file_name)) | ||
print(os.path.join(train_data_path, file_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 为什么要print
- 上次说的, 如果有包含隐藏文件,要打个warning, 也没打.
core/trainers/framework/dataset.py
Outdated
for x in os.listdir(train_data_path) | ||
] | ||
# file_list = [ | ||
# os.path.join(train_data_path, x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无用注释删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done
core/utils/dataloader_instance.py
Outdated
for file_name in files: | ||
file_list.append(os.path.join(train_data_path, file_name)) | ||
print(os.path.join(train_data_path, file_name)) | ||
for dirs_name in dirs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done
core/utils/dataloader_instance.py
Outdated
dirs[:] = [d for d in dirs if not d[0] == '.'] | ||
if (files == None and dirs == None): | ||
return None | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同样的代码, 为什么写了3遍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, move this function to util.py
fix read hide files bug for reader bug
add a recursive function for avoiding reading hidden files in readers