mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Revert "Call internal log_compilation_event if it exists (#164855)"
This reverts commit 98a081a24c22072362dc536afd39a469e28939d4. Reverted https://github.com/pytorch/pytorch/pull/164855 on behalf of https://github.com/albanD due to We should not land this kind of code in core ([comment](https://github.com/pytorch/pytorch/pull/164855#issuecomment-3387692988))
This commit is contained in:
@ -13,13 +13,6 @@ import torch
|
||||
from torch._strobelight.compile_time_profiler import StrobelightCompileTimeProfiler
|
||||
|
||||
|
||||
try:
|
||||
from pt2_internal import ( # type: ignore[import-not-found]
|
||||
log_compilation_event as internal_log_compilation_event,
|
||||
)
|
||||
except ImportError:
|
||||
internal_log_compilation_event = None
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
@ -135,9 +128,6 @@ def add_mlhub_insight(category: str, insight: str, insight_description: str):
|
||||
|
||||
|
||||
def log_compilation_event(metrics):
|
||||
if internal_log_compilation_event:
|
||||
internal_log_compilation_event(vars(metrics))
|
||||
else:
|
||||
log.info("%s", metrics)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user