Skip to content

Commit 88b3ae9

Browse files
awaelchlilexierule
authored andcommitted
Fix neptune-client package available detection (#14714)
1 parent 6bd71be commit 88b3ae9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/pytorch_lightning/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

7+
8+
## [1.7.7] - 2022-09-??
9+
10+
### Fixed
11+
12+
- Fixed the availability check for the neptune-client package ([#14714](https://github.com/Lightning-AI/lightning/pull/14714))
13+
14+
715
## [1.7.6] - 2022-09-13
816

917
### Changed

src/pytorch_lightning/loggers/neptune.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
]
2121

2222
import logging
23+
import operator
2324
import os
2425
import warnings
2526
from argparse import Namespace
@@ -33,13 +34,14 @@
3334
from pytorch_lightning import __version__
3435
from pytorch_lightning.callbacks import Checkpoint
3536
from pytorch_lightning.loggers.logger import Logger, rank_zero_experiment
36-
from pytorch_lightning.utilities.imports import _RequirementAvailable
37+
from pytorch_lightning.utilities.imports import _compare_version, _module_available
3738
from pytorch_lightning.utilities.logger import _add_prefix, _convert_params, _sanitize_callable_params
3839
from pytorch_lightning.utilities.model_summary import ModelSummary
3940
from pytorch_lightning.utilities.rank_zero import rank_zero_only
4041

41-
_NEPTUNE_AVAILABLE = _RequirementAvailable("neptune-client")
42-
_NEPTUNE_GREATER_EQUAL_0_9 = _RequirementAvailable("neptune-client>=0.9.0")
42+
# Note: Do not use RequirementCache. See: https://github.com/Lightning-AI/lightning/issues/14695
43+
_NEPTUNE_AVAILABLE = _module_available("neptune")
44+
_NEPTUNE_GREATER_EQUAL_0_9 = _compare_version("neptune", operator.ge, "0.9.0")
4345

4446

4547
if _NEPTUNE_AVAILABLE and _NEPTUNE_GREATER_EQUAL_0_9:

0 commit comments

Comments
 (0)