Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Access jax.config from jax #2376

Merged
merged 1 commit into from
Nov 4, 2023
Merged

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Nov 4, 2023

Description

As of jax and jaxlib v0.4.20 accessing jax.config from the jax.config submodule is deprecated and it should be accessed from the jax top level API instead.

>>> from jax.config import config
<stdin>:1: DeprecationWarning: Accessing jax.config via the jax.config submodule is deprecated

This doesn't require any change to the lower bounds of jax and jaxlib

pyhf/pyproject.toml

Lines 76 to 79 in aa22be9

jax = [
"jax>=0.4.1", # c.f. PR #2079
"jaxlib>=0.4.1", # c.f. PR #2079
]

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* As of jax and jaxlib v0.4.20 accessing jax.config from the jax.config
  submodule is deprecated and it should be accessed from the jax top
  level API instead.

   ```
   >>> from jax.config import config
   <stdin>:1: DeprecationWarning: Accessing jax.config via the jax.config submodule is deprecated
   ```

* As of jax and jaxlib v0.4.20 accessing jax.config from the jax.config
  submodule is deprecated and it should be accessed from the jax top
  level API instead.

   ```
   >>> from jax.config import config
   <stdin>:1: DeprecationWarning: Accessing jax.config via the jax.config submodule is deprecated
   ```
@matthewfeickert matthewfeickert added fix A bug fix backport Backport PRs from main to release branch labels Nov 4, 2023
@matthewfeickert matthewfeickert self-assigned this Nov 4, 2023
Copy link

codecov bot commented Nov 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aa22be9) 98.28% compared to head (f029794) 98.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2376   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          69       69           
  Lines        4539     4539           
  Branches      803      803           
=======================================
  Hits         4461     4461           
  Misses         45       45           
  Partials       33       33           
Flag Coverage Δ
contrib 97.86% <100.00%> (ø)
doctest 60.71% <100.00%> (ø)
unittests-3.10 96.29% <100.00%> (ø)
unittests-3.11 96.29% <100.00%> (ø)
unittests-3.8 96.32% <100.00%> (ø)
unittests-3.9 96.34% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/pyhf/tensor/jax_backend.py 98.61% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewfeickert matthewfeickert added need-to-backport tmp label until can be backported to patch release branch and removed backport Backport PRs from main to release branch labels Nov 4, 2023
@matthewfeickert matthewfeickert merged commit 899d1fd into main Nov 4, 2023
24 of 25 checks passed
@matthewfeickert matthewfeickert deleted the fix/support-jax-config branch November 4, 2023 07:08
@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label Jan 5, 2024
matthewfeickert added a commit that referenced this pull request Jan 5, 2024
* Backport PR #2376
* As of jax and jaxlib v0.4.20 accessing jax.config from the jax.config
  submodule is deprecated and it should be accessed from the jax top
  level API instead.

   ```
   >>> from jax.config import config
   <stdin>:1: DeprecationWarning: Accessing jax.config via the jax.config submodule is deprecated
   ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A bug fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant