1
0
mirror of https://github.com/ROCm/jax.git synced 2025-04-19 13:26:06 +00:00

Finalize deprecation of the config module.

To configure JAX, use `import jax` and reference the config object via `jax.config`.

PiperOrigin-RevId: 635430169
This commit is contained in:
Jake VanderPlas 2024-05-20 05:48:49 -07:00 committed by jax authors
parent bb616eff8a
commit 4bac10e750
3 changed files with 2 additions and 28 deletions

@ -20,6 +20,8 @@ Remember to align the itemized text with the first line of an item within a list
deprecated and will soon be removed. Use `rtol` instead.
* The ``rcond`` argument of {func}`jax.numpy.linalg.pinv` is being
deprecated and will soon be removed. Use `rtol` instead.
* The deprecated `jax.config` submodule has been removed. To configure JAX
use `import jax` and then reference the config object via `jax.config`.
## jaxlib 0.4.29

@ -178,9 +178,7 @@ from jax._src.array import Shard as Shard
import jax.experimental.compilation_cache.compilation_cache as _ccache
del _ccache
# TODO(jakevdp): remove this when jax/config.py is removed.
from jax._src.deprecations import register as _register_deprecation
_register_deprecation("jax.config", "config-module")
_register_deprecation("jax.experimental", "maps-module")
del _register_deprecation

@ -1,26 +0,0 @@
# Copyright 2018 The JAX Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import warnings
from jax._src import deprecations
# Added February 16, 2024.
_msg = ("Importing the jax.config submodule via `import jax.config` is deprecated."
" To configure JAX use `import jax` and then reference the config object"
" via `jax.config`.")
if deprecations.is_accelerated("jax.config", "config-module"):
raise ImportError(_msg)
else:
warnings.warn(_msg, DeprecationWarning, stacklevel=2)
del deprecations, warnings, _msg