mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Fixes #114591 Version package was removed in this pull request: #114108 but is still used in `torch.utils.tensorboard` causing import errors. The fix removes the import and uses a simpler check. Pull Request resolved: https://github.com/pytorch/pytorch/pull/115598 Approved by: https://github.com/malfet
13 lines
434 B
Python
13 lines
434 B
Python
import tensorboard
|
|
from torch._vendor.packaging.version import Version
|
|
|
|
if not hasattr(tensorboard, "__version__") or Version(
|
|
tensorboard.__version__
|
|
) < Version("1.15"):
|
|
raise ImportError("TensorBoard logging requires TensorBoard version 1.15 or above")
|
|
|
|
del Version
|
|
del tensorboard
|
|
|
|
from .writer import FileWriter, SummaryWriter # noqa: F401
|
|
from tensorboard.summary.writer.record_writer import RecordWriter # noqa: F401
|