From bd715503643aa9efc54fdf60b29e2939d52762e5 Mon Sep 17 00:00:00 2001 From: RainRat Date: Tue, 28 May 2024 13:47:05 -0700 Subject: [PATCH 1/2] fix typos no functional change --- segment/train.py | 2 +- utils/augmentations.py | 2 +- utils/dataloaders.py | 2 +- utils/loggers/clearml/hpo.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/segment/train.py b/segment/train.py index 5a6e9afb8ec0..a0d0c5119639 100644 --- a/segment/train.py +++ b/segment/train.py @@ -746,7 +746,7 @@ def run(**kwargs): """ Executes YOLOv5 training with given parameters, altering options programmatically; returns updated options. - Example: mport train; train.run(data='coco128.yaml', imgsz=320, weights='yolov5m.pt') + Example: import train; train.run(data='coco128.yaml', imgsz=320, weights='yolov5m.pt') """ opt = parse_opt(True) for k, v in kwargs.items(): diff --git a/utils/augmentations.py b/utils/augmentations.py index 3025ebdb7092..3556bffeda18 100644 --- a/utils/augmentations.py +++ b/utils/augmentations.py @@ -353,7 +353,7 @@ def classify_albumentations( if vflip > 0: T += [A.VerticalFlip(p=vflip)] if jitter > 0: - color_jitter = (float(jitter),) * 3 # repeat value for brightness, contrast, satuaration, 0 hue + color_jitter = (float(jitter),) * 3 # repeat value for brightness, contrast, saturation, 0 hue T += [A.ColorJitter(*color_jitter, 0)] else: # Use fixed crop for eval set (reproducibility) T = [A.SmallestMaxSize(max_size=size), A.CenterCrop(height=size, width=size)] diff --git a/utils/dataloaders.py b/utils/dataloaders.py index 04420c77a673..7ca451aa0929 100644 --- a/utils/dataloaders.py +++ b/utils/dataloaders.py @@ -136,7 +136,7 @@ def __iter__(self): g = torch.Generator() g.manual_seed(self.seed + self.epoch) - # determine the the eventual size (n) of self.indices (DDP indices) + # determine the eventual size (n) of self.indices (DDP indices) n = int((len(self.dataset) - self.rank - 1) / self.num_replicas) + 1 # num_replicas == WORLD_SIZE idx = torch.randperm(n, generator=g) if not self.shuffle: diff --git a/utils/loggers/clearml/hpo.py b/utils/loggers/clearml/hpo.py index 4e314ea868df..d3e7469150cb 100644 --- a/utils/loggers/clearml/hpo.py +++ b/utils/loggers/clearml/hpo.py @@ -58,7 +58,7 @@ # now we decide if we want to maximize it or minimize it (accuracy we maximize) objective_metric_sign="max", # let us limit the number of concurrent experiments, - # this in turn will make sure we do dont bombard the scheduler with experiments. + # this in turn will make sure we do don't bombard the scheduler with experiments. # if we have an auto-scaler connected, this, by proxy, will limit the number of machine max_number_of_concurrent_tasks=1, # this is the optimizer class (actually doing the optimization) From 8de2b30b2b1beacdd82f6b7ceba84d6e52845ca3 Mon Sep 17 00:00:00 2001 From: RainRat Date: Tue, 28 May 2024 13:51:22 -0700 Subject: [PATCH 2/2] Update hpo.py better fix for typo no functional change --- utils/loggers/clearml/hpo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/loggers/clearml/hpo.py b/utils/loggers/clearml/hpo.py index d3e7469150cb..aa1b7ab9494d 100644 --- a/utils/loggers/clearml/hpo.py +++ b/utils/loggers/clearml/hpo.py @@ -58,7 +58,7 @@ # now we decide if we want to maximize it or minimize it (accuracy we maximize) objective_metric_sign="max", # let us limit the number of concurrent experiments, - # this in turn will make sure we do don't bombard the scheduler with experiments. + # this in turn will make sure we don't bombard the scheduler with experiments. # if we have an auto-scaler connected, this, by proxy, will limit the number of machine max_number_of_concurrent_tasks=1, # this is the optimizer class (actually doing the optimization)