mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/157985 Approved by: https://github.com/svekars, https://github.com/anijain2305
16 lines
377 B
Python
16 lines
377 B
Python
import functools
|
|
import os
|
|
|
|
import torch
|
|
|
|
|
|
# to lower notebook execution time while hiding backend="eager"
|
|
torch.compile = functools.partial(torch.compile, backend="eager")
|
|
|
|
# to clear torch logs format
|
|
os.environ["TORCH_LOGS_FORMAT"] = ""
|
|
torch._logging._internal.DEFAULT_FORMATTER = (
|
|
torch._logging._internal._default_formatter()
|
|
)
|
|
torch._logging._internal._init_logs()
|