Skip to content

Commit 25c238f

Browse files
committed
merge filter into sampler
1 parent a480bde commit 25c238f

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

src/forge/observability/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
SampleAccumulator,
2929
StdAccumulator,
3030
SumAccumulator,
31-
TopBottomKFilter,
3231
WandbBackend,
3332
)
3433
from .perf_tracker import trace, Tracer

src/forge/observability/metric_actors.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@
99
import uuid
1010
from typing import Any, Union
1111

12-
from monarch.actor import (
13-
context,
14-
endpoint,
15-
get_or_spawn_controller,
16-
ProcMesh,
17-
this_proc,
18-
)
19-
2012
from forge.controller.actor import ForgeActor
2113

2214
from forge.env import FORGE_DISABLE_METRICS
@@ -30,6 +22,14 @@
3022
reduce_metrics_states,
3123
)
3224

25+
from monarch.actor import (
26+
context,
27+
endpoint,
28+
get_or_spawn_controller,
29+
ProcMesh,
30+
this_proc,
31+
)
32+
3333

3434
logger = logging.getLogger(__name__)
3535

@@ -437,15 +437,9 @@ def extract_values_from_valuemesh(results) -> list[dict[str, Any]]:
437437
scalar_metrics = [
438438
m for m in reduced_metrics if m.reduction != Reduce.SAMPLE
439439
]
440-
<<<<<<< HEAD
441440
sample_metrics = [
442441
m for m in reduced_metrics if m.reduction == Reduce.SAMPLE
443442
]
444-
=======
445-
sample_metrics = {
446-
m.key: m.value for m in reduced_metrics if m.reduction == Reduce.SAMPLE
447-
}
448-
>>>>>>> a8be76e (functions, tests)
449443

450444
# Log to global backends
451445
for backend_name, backend in self.global_logger_backends.items():

0 commit comments

Comments
 (0)