Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce system metrics logging frequency #3604

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions composer/loggers/mlflow_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ def __init__(

if log_system_metrics:
# Set system metrics sampling interval and samples before logging so that system metrics
# are collected every 5s, and aggregated over 3 samples before being logged
# (logging per 15s).
mlflow.set_system_metrics_samples_before_logging(3)
# are collected every 5s, and aggregated over 6 samples before being logged
# (logging per 30s).
mlflow.set_system_metrics_samples_before_logging(6)
mlflow.set_system_metrics_sampling_interval(5)

self._rank_zero_only = rank_zero_only
Expand Down Expand Up @@ -545,7 +545,11 @@ def register_model_with_run_id(
"""
if self._enabled:
from mlflow.exceptions import MlflowException
from mlflow.protos.databricks_pb2 import ALREADY_EXISTS, RESOURCE_ALREADY_EXISTS, ErrorCode
from mlflow.protos.databricks_pb2 import (
ALREADY_EXISTS,
RESOURCE_ALREADY_EXISTS,
ErrorCode,
)

full_name = f'{self.model_registry_prefix}.{name}' if len(self.model_registry_prefix) > 0 else name

Expand Down
Loading