Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into feature/SG-1448-OBB
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/super_gradients/training/utils/distributed_training_utils.py
  • Loading branch information
BloodAxe committed May 16, 2024
2 parents 37665a2 + f8cc94a commit d81d939
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/super_gradients/training/sg_trainer/sg_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,14 @@ def get_finetune_lr_dict(self, lr: float) -> Dict[str, float]:

self.ckpt_best_name = self.training_params.ckpt_best_name

if self.training_params.average_best_models and not self.training_params.save_model:
logger.warning(
"'training_params.average_best_models' is enabled, but 'training_params.save_model' is disabled. \n"
"Model averaging requires saving snapshot checkpoints to function properly. As a result, "
"'training_params.average_best_models' will be disabled. "
)
self.training_params.average_best_models = False

self.max_train_batches = self.training_params.max_train_batches
self.max_valid_batches = self.training_params.max_valid_batches

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from torch import distributed as dist
from torch.cuda.amp import autocast
from torch.distributed import get_rank, all_gather_object
from torch.distributed.elastic.multiprocessing import Std
from torch.distributed.elastic.multiprocessing.errors import record
from torch.distributed.launcher.api import LaunchConfig, elastic_launch

Expand Down Expand Up @@ -345,8 +344,6 @@ def restart_script_with_ddp(num_gpus: int = None):
max_restarts=0,
monitor_interval=5,
start_method="spawn",
redirects=Std.NONE,
tee=Std.NONE,
metrics_cfg={},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,14 @@ def save(
:param show_confidence: Whether to show confidence scores on the image.
:param box_thickness: (Optional) Thickness of bounding boxes. If None, will adapt to the box size.
"""
image = self.draw(box_thickness=box_thickness, show_confidence=show_confidence)
image = self.draw(
edge_colors=edge_colors,
joint_thickness=joint_thickness,
keypoint_colors=keypoint_colors,
keypoint_radius=keypoint_radius,
box_thickness=box_thickness,
show_confidence=show_confidence,
)
save_image(image=image, path=output_path)


Expand Down

0 comments on commit d81d939

Please sign in to comment.