Improve the error message for installing tensorboardx (#17053)
This commit is contained in:
parent
550fa5fec0
commit
a22242b7f2
|
@ -76,6 +76,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
- Fixed issue where the wrapped dataloader `iter()` would be called twice ([#16841](https://github.com/Lightning-AI/lightning/pull/16841))
|
||||
|
||||
- Improved the error message for installing tensorboard or tensorboardx ([#17053](https://github.com/Lightning-AI/lightning/pull/17053))
|
||||
|
||||
|
||||
## [1.9.4] - 2023-03-01
|
||||
|
||||
|
|
|
@ -91,7 +91,8 @@ class TensorBoardLogger(Logger):
|
|||
):
|
||||
if not _TENSORBOARD_AVAILABLE and not _TENSORBOARDX_AVAILABLE:
|
||||
raise ModuleNotFoundError(
|
||||
"Neither `tensorboard` nor `tensorboardX` is available. Try `pip install`ing either."
|
||||
"Neither `tensorboard` nor `tensorboardX` is available. Try `pip install`ing either.\n"
|
||||
f"{str(_TENSORBOARDX_AVAILABLE)}\n{str(_TENSORBOARD_AVAILABLE)}"
|
||||
)
|
||||
super().__init__()
|
||||
root_dir = os.fspath(root_dir)
|
||||
|
|
|
@ -439,6 +439,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
|||
- Fixed an issue with comparing torch versions when using a version of torch built from source ([#17030](https://github.com/Lightning-AI/lightning/pull/17030))
|
||||
|
||||
|
||||
- Improved the error message for installing tensorboard or tensorboardx ([#17053](https://github.com/Lightning-AI/lightning/pull/17053))
|
||||
|
||||
|
||||
## [1.9.4] - 2023-03-01
|
||||
|
||||
### Added
|
||||
|
|
|
@ -117,7 +117,10 @@ class TensorBoardLogger(Logger, FabricTensorBoardLogger):
|
|||
**kwargs,
|
||||
)
|
||||
if log_graph and not _TENSORBOARD_AVAILABLE:
|
||||
rank_zero_warn("You set `TensorBoardLogger(log_graph=True)` but `tensorboard` is not available.")
|
||||
rank_zero_warn(
|
||||
"You set `TensorBoardLogger(log_graph=True)` but `tensorboard` is not available.\n"
|
||||
f"{str(_TENSORBOARD_AVAILABLE)}"
|
||||
)
|
||||
self._log_graph = log_graph and _TENSORBOARD_AVAILABLE
|
||||
self.hparams: Union[Dict[str, Any], Namespace] = {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue