Rename loggers from YOLOv8 to Ultralytics (#16784)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
a6a577961f
commit
000095d600
5 changed files with 13 additions and 9 deletions
|
|
@ -68,9 +68,9 @@ def on_pretrain_routine_start(trainer):
|
||||||
PatchedMatplotlib.update_current_task(None)
|
PatchedMatplotlib.update_current_task(None)
|
||||||
else:
|
else:
|
||||||
task = Task.init(
|
task = Task.init(
|
||||||
project_name=trainer.args.project or "YOLOv8",
|
project_name=trainer.args.project or "Ultralytics",
|
||||||
task_name=trainer.args.name,
|
task_name=trainer.args.name,
|
||||||
tags=["YOLOv8"],
|
tags=["Ultralytics"],
|
||||||
output_uri=True,
|
output_uri=True,
|
||||||
reuse_last_task_id=False,
|
reuse_last_task_id=False,
|
||||||
auto_connect_frameworks={"pytorch": False, "matplotlib": False},
|
auto_connect_frameworks={"pytorch": False, "matplotlib": False},
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ try:
|
||||||
# Ensures certain logging functions only run for supported tasks
|
# Ensures certain logging functions only run for supported tasks
|
||||||
COMET_SUPPORTED_TASKS = ["detect"]
|
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"
|
EVALUATION_PLOT_NAMES = "F1_curve", "P_curve", "R_curve", "PR_curve", "confusion_matrix"
|
||||||
LABEL_PLOT_NAMES = "labels", "labels_correlogram"
|
LABEL_PLOT_NAMES = "labels", "labels_correlogram"
|
||||||
|
|
||||||
|
|
@ -31,8 +31,8 @@ def _get_comet_mode():
|
||||||
|
|
||||||
|
|
||||||
def _get_comet_model_name():
|
def _get_comet_model_name():
|
||||||
"""Returns the model name for Comet from the environment variable 'COMET_MODEL_NAME' or defaults to 'YOLOv8'."""
|
"""Returns the model name for Comet from the environment variable COMET_MODEL_NAME or defaults to 'Ultralytics'."""
|
||||||
return os.getenv("COMET_MODEL_NAME", "YOLOv8")
|
return os.getenv("COMET_MODEL_NAME", "Ultralytics")
|
||||||
|
|
||||||
|
|
||||||
def _get_eval_batch_logging_interval():
|
def _get_eval_batch_logging_interval():
|
||||||
|
|
@ -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):
|
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.
|
This function rescales the bounding box labels to the original image shape.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ def on_pretrain_routine_end(trainer):
|
||||||
mlflow.set_tracking_uri(uri)
|
mlflow.set_tracking_uri(uri)
|
||||||
|
|
||||||
# Set experiment and run names
|
# 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
|
run_name = os.environ.get("MLFLOW_RUN") or trainer.args.name
|
||||||
mlflow.set_experiment(experiment_name)
|
mlflow.set_experiment(experiment_name)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,11 @@ def on_pretrain_routine_start(trainer):
|
||||||
"""Callback function called before the training routine starts."""
|
"""Callback function called before the training routine starts."""
|
||||||
try:
|
try:
|
||||||
global run
|
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()}
|
run["Configuration/Hyperparameters"] = {k: "" if v is None else v for k, v in vars(trainer.args).items()}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOGGER.warning(f"WARNING ⚠️ NeptuneAI installed but not initialized correctly, not logging this run. {e}")
|
LOGGER.warning(f"WARNING ⚠️ NeptuneAI installed but not initialized correctly, not logging this run. {e}")
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ def _log_plots(plots, step):
|
||||||
|
|
||||||
def on_pretrain_routine_start(trainer):
|
def on_pretrain_routine_start(trainer):
|
||||||
"""Initiate and start project if module is present."""
|
"""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):
|
def on_fit_epoch_end(trainer):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue