-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Closed
Labels
module: tensorboardtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 The feature, motivation and pitch
Importing the tensorboard writer yields a deprecation warning from distutils
in python 3.10, i.e.,
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
This can be easily fixed as mentioned in the deprecation warning. One needs to replace the current lines 2 - 9 (https://github.com/pytorch/pytorch/blob/master/torch/utils/tensorboard/__init__.py#L2)
from distutils.version import LooseVersion
if not hasattr(tensorboard, "__version__") or LooseVersion(
tensorboard.__version__
) < LooseVersion("1.15"):
raise ImportError("TensorBoard logging requires TensorBoard version 1.15 or above")
del LooseVersion
with
import packaging
if not hasattr(tensorboard, "__version__") or packaging.version.parse(
tensorboard.__version__
) < packaging.version.Version("1.15"):
raise ImportError("TensorBoard logging requires TensorBoard version 1.15 or above")
del packaging
I am happy to submit the PR but I do not know how to test against all supported python versions and changing all requirements correctly in all different build targets.
Alternatives
No response
Additional context
No response
Jasha10
Metadata
Metadata
Assignees
Labels
module: tensorboardtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module