Skip to content
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
11 changes: 9 additions & 2 deletions src/forge/observability/perf_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@

import torch

from forge.env_constants import DISABLE_PERF_METRICS, METRIC_TIMER_USES_GPU
from forge.env_constants import (
DISABLE_PERF_METRICS,
FORGE_DISABLE_METRICS,
METRIC_TIMER_USES_GPU,
)
from forge.observability.metrics import record_metric, Reduce

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -108,7 +112,10 @@ def __init__(
self.prefix = prefix
self.track_memory = track_memory
self.time_with_gpu = timer == "gpu"
self._disable = os.getenv(DISABLE_PERF_METRICS, "false") == "true"
self._disable = (
os.getenv(DISABLE_PERF_METRICS, "false").lower() == "true"
or os.getenv(FORGE_DISABLE_METRICS, "false").lower() == "true"
)
self._active = False

# Timing state
Expand Down
Loading