Skip to content

Commit

Permalink
Rename loggers from YOLOv8 to Ultralytics (ultralytics#16784)
Browse files Browse the repository at this point in the history
Signed-off-by: UltralyticsAssistant <[email protected]>
Co-authored-by: UltralyticsAssistant <[email protected]>
  • Loading branch information
glenn-jocher and UltralyticsAssistant authored Oct 8, 2024
1 parent a6a5779 commit 000095d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ultralytics/utils/callbacks/clearml.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def on_pretrain_routine_start(trainer):
PatchedMatplotlib.update_current_task(None)
else:
task = Task.init(
project_name=trainer.args.project or "YOLOv8",
project_name=trainer.args.project or "Ultralytics",
task_name=trainer.args.name,
tags=["YOLOv8"],
tags=["Ultralytics"],
output_uri=True,
reuse_last_task_id=False,
auto_connect_frameworks={"pytorch": False, "matplotlib": False},
Expand Down
8 changes: 4 additions & 4 deletions ultralytics/utils/callbacks/comet.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Ensures certain logging functions only run for supported tasks
COMET_SUPPORTED_TASKS = ["detect"]

# Names of plots created by YOLOv8 that are logged to Comet
# Names of plots created by Ultralytics that are logged to Comet
EVALUATION_PLOT_NAMES = "F1_curve", "P_curve", "R_curve", "PR_curve", "confusion_matrix"
LABEL_PLOT_NAMES = "labels", "labels_correlogram"

Expand All @@ -31,8 +31,8 @@ def _get_comet_mode():


def _get_comet_model_name():
"""Returns the model name for Comet from the environment variable 'COMET_MODEL_NAME' or defaults to 'YOLOv8'."""
return os.getenv("COMET_MODEL_NAME", "YOLOv8")
"""Returns the model name for Comet from the environment variable COMET_MODEL_NAME or defaults to 'Ultralytics'."""
return os.getenv("COMET_MODEL_NAME", "Ultralytics")


def _get_eval_batch_logging_interval():
Expand Down Expand Up @@ -110,7 +110,7 @@ def _fetch_trainer_metadata(trainer):

def _scale_bounding_box_to_original_image_shape(box, resized_image_shape, original_image_shape, ratio_pad):
"""
YOLOv8 resizes images during training and the label values are normalized based on this resized shape.
YOLO resizes images during training and the label values are normalized based on this resized shape.
This function rescales the bounding box labels to the original image shape.
"""
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/utils/callbacks/mlflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def on_pretrain_routine_end(trainer):
mlflow.set_tracking_uri(uri)

# Set experiment and run names
experiment_name = os.environ.get("MLFLOW_EXPERIMENT_NAME") or trainer.args.project or "/Shared/YOLOv8"
experiment_name = os.environ.get("MLFLOW_EXPERIMENT_NAME") or trainer.args.project or "/Shared/Ultralytics"
run_name = os.environ.get("MLFLOW_RUN") or trainer.args.name
mlflow.set_experiment(experiment_name)

Expand Down
6 changes: 5 additions & 1 deletion ultralytics/utils/callbacks/neptune.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def on_pretrain_routine_start(trainer):
"""Callback function called before the training routine starts."""
try:
global run
run = neptune.init_run(project=trainer.args.project or "YOLOv8", name=trainer.args.name, tags=["YOLOv8"])
run = neptune.init_run(
project=trainer.args.project or "Ultralytics",
name=trainer.args.name,
tags=["Ultralytics"],
)
run["Configuration/Hyperparameters"] = {k: "" if v is None else v for k, v in vars(trainer.args).items()}
except Exception as e:
LOGGER.warning(f"WARNING ⚠️ NeptuneAI installed but not initialized correctly, not logging this run. {e}")
Expand Down
2 changes: 1 addition & 1 deletion ultralytics/utils/callbacks/wb.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _log_plots(plots, step):

def on_pretrain_routine_start(trainer):
"""Initiate and start project if module is present."""
wb.run or wb.init(project=trainer.args.project or "YOLOv8", name=trainer.args.name, config=vars(trainer.args))
wb.run or wb.init(project=trainer.args.project or "Ultralytics", name=trainer.args.name, config=vars(trainer.args))


def on_fit_epoch_end(trainer):
Expand Down

0 comments on commit 000095d

Please sign in to comment.