We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ed2756 commit e615d02Copy full SHA for e615d02
1 file changed
detectree2/models/train.py
@@ -824,10 +824,10 @@ def combine_dicts(root_dir: str,
824
Returns:
825
List of combined dictionaries from the specified directories.
826
"""
827
- # Get the list of directories within the root directory
828
- train_dirs = [
+ # Get the list of directories within the root directory, sorted alphabetically
+ train_dirs = sorted([
829
os.path.join(root_dir, dir) for dir in os.listdir(root_dir) if os.path.isdir(os.path.join(root_dir, dir))
830
- ]
+ ])
831
# Handle the different modes for combining dictionaries
832
if mode == "train":
833
# Exclude the validation directory from the list of directories
0 commit comments