Closed danrgll closed 10 months ago
This seems to be a similar issue to the one reported on PyTorch (https://github.com/pytorch/pytorch/issues/84712). They addressed it in the latest release (torch==2.1.0), but unfortunately, we don't currently support that version (https://github.com/automl/neps/blob/master/pyproject.toml#L58).
I've looked into their solution (https://github.com/pytorch/pytorch/blob/main/torch/utils/tensorboard/__init__.py#L2). The issue seems to be a deprecation warning related to the use of the distutils.version
module's LooseVersion
class for version comparison, which is now replaced with the Version
class from the packaging.version
module in the current code to resolve the deprecation warning.
I'm unsure how we could address this in our context. @Neeratyoy Do you have any suggestions or insights on how we might tackle this issue given our current constraints?
We could have a branch to test this explicitly, that is, Torch dependencies.
Alternatively, we could make torch or especially tensorboard a conditional dependency.
That won't solve this warning issue but suppress it for most use.
What do you think?
we don't currently support that version (https://github.com/automl/neps/blob/master/pyproject.toml#L58)
Given that the main issue here is Poetry and these torch versions, can we try to see if there are newer Torch or poetry updates and this issue no longer persists?
Also, we should make tensorboard
and deepgp
conditional perhaps. deegp
can even go under a broader tag of experimental
to keep the core NePS installation cleaner. Any dependencies required for active projects can go under experimental
.
We could also make Lightning and PyTorch conditional like they do [here](we don't currently support that version (https://github.com/automl/neps/blob/master/pyproject.toml#L58).) with examples/notebooks
.
can we try to see if there are newer Torch or poetry updates and this issue no longer persists?
I've tested the issue with a newer version of Torch, specifically version 2.1.0, and can confirm that the problem no longer persists.
The limitation with conditioning PyTorch and Tensorboard is tied to their presence in the API's post-training processing, which you can find in the code snippet here. This restriction is currently crucial for maintaining the incumbent graph
, as it's a post-training step necessary after the configuration has completed training.
Shown Warning:
...python3.9/site-packages/torch/utils/tensorboard/init.py:4: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if not hasattr(tensorboard, "version") or LooseVersion( DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. ) < LooseVersion("1.15"):