Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
PatBall1 committed Sep 16, 2024
1 parent 31d4000 commit e753c1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions detectree2/models/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def build_test_loader(cls, cfg, dataset_name):
"""
return build_detection_test_loader(cfg, dataset_name, mapper=FlexibleDatasetMapper(cfg, is_train=False))

def get_tree_dicts(directory: str, class_mapping = None) -> List[Dict]:
def get_tree_dicts(directory: str, class_mapping: Dict[str, int] = None) -> List[Dict]:
"""Get the tree dictionaries.
Args:
Expand Down Expand Up @@ -608,7 +608,7 @@ def get_tree_dicts(directory: str, class_mapping = None) -> List[Dict]:
def combine_dicts(root_dir: str,
val_dir: int,
mode: str = "train",
class_mapping = None) -> List[Dict]:
class_mapping: Dict[str, int] = None) -> List[Dict]:
"""
Combine dictionaries from different directories based on the specified mode.
Expand Down Expand Up @@ -976,7 +976,7 @@ def modify_conv1_weights(model, num_input_channels):
model.backbone.bottom_up.stem.conv1.weight.copy_(new_weights)


def get_latest_model_path(output_dir) -> str:
def get_latest_model_path(output_dir: str) -> str:
"""
Find the model file with the highest index in the specified output directory.
Expand Down

0 comments on commit e753c1a

Please sign in to comment.