Skip to content

Commit 2e9d35a

Browse files
sourabhrohillafacebook-github-bot
authored andcommitted
Cleanup unused class variable memory_usage_limit_mb as per TODO in torchrec metric_module (#3351)
Summary: As per the TODO, cleaning up memory_usage_limit_mb class variable and associated call sites. Reviewed By: aliafzal Differential Revision: D81322330
1 parent 85ec396 commit 2e9d35a

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

torchrec/metrics/metric_module.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ class RecMetricModule(nn.Module):
147147
throughput_metric (Optional[ThroughputMetric]): the ThroughputMetric.
148148
state_metrics (Optional[Dict[str, StateMetric]]): the dict of StateMetrics.
149149
compute_interval_steps (int): the intervals between two compute calls in the unit of batch number
150-
memory_usage_limit_mb (float): [Unused] the memory usage limit for OOM check
151150
152151
Call Args:
153152
Not supported.
@@ -194,8 +193,6 @@ def __init__(
194193
compute_interval_steps: int = 100,
195194
min_compute_interval: float = 0.0,
196195
max_compute_interval: float = float("inf"),
197-
# Unused, but needed for backwards compatibility. TODO: Remove from callsites
198-
memory_usage_limit_mb: float = 512,
199196
) -> None:
200197
super().__init__()
201198
self.rec_tasks = rec_tasks if rec_tasks else []

torchrec/metrics/tests/test_metric_module.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def __init__(
7373
compute_interval_steps: int = 100,
7474
min_compute_interval: float = 0.0,
7575
max_compute_interval: float = float("inf"),
76-
memory_usage_limit_mb: float = 512,
7776
) -> None:
7877
super().__init__(
7978
batch_size,
@@ -85,7 +84,6 @@ def __init__(
8584
compute_interval_steps=compute_interval_steps,
8685
min_compute_interval=min_compute_interval,
8786
max_compute_interval=max_compute_interval,
88-
memory_usage_limit_mb=memory_usage_limit_mb,
8987
)
9088

9189
def _update_rec_metrics(

0 commit comments

Comments
 (0)