jsonschema.RefResolver
deprecation warnings can be safely ignored, as they don’t impact Neptune’s operation.
neptune-client
usesbravado
, which importsjsonschema
.jsonschema.RefResolver
is imported but not used because we disabled Swagger file validation.- Swagger file validation is not necessary and is a cpu-intensive operation.
- We plan to release neptune-client 2.0 without
bravado
in the future. - Until jsonschema.RefResolver is removed from jsonschema, we won’t be making any changes to the 1.x client.
- Our focus is on developing neptune-client 2.0 to deliver a fully enhanced neptune-client.
When importing libraries in this order:
import torchrl
import neptune
Several deprecation warnings appear, related to jsonschema.RefResolver
:
/core/.venv/lib/python3.10/site-packages/swagger_spec_validator/validator12.py:18: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.
from jsonschema import RefResolver
However, changing the import order eliminates these warnings:
import neptune
import torchrl
By default, deprecation warnings are disabled in Python:
import warnings
warnings.filters
# Output includes: ('ignore', None, <class 'DeprecationWarning'>, None, 0)
torchrl
enables deprecation warnings with this code:
RL_WARNINGS = strtobool(os.environ.get("RL_WARNINGS", "1"))
if RL_WARNINGS:
warnings.simplefilter("once", DeprecationWarning)