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 the doc error: module 'scipy.misc' has no attribute 'face' #25728

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

zhenying-liu
Copy link
Contributor

@zhenying-liu zhenying-liu commented Jan 6, 2025

The error we have is due to recent changes in the SciPy library, upgrading from 1.15.0 to 1.17.0. The scipy.misc.face() function has been deprecated and removed from the scipy.misc module. To resolve this issue, we use the updated method for accessing the face image dataset. And add the dependency of pooch for scipy.datasets module.

Copy link
Collaborator

@dfm dfm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you add more details about why we need the added pinned dependency?

@@ -8,6 +8,7 @@ sphinx-remove-toctrees
sphinx-design
sphinxext-rediraffe
myst-nb>=1.0.0
pooch==1.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this pin really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried below locally which requires pooch, but it might not the case for the CI. I removed this requirement in the latest commit.

from scipy import datasets
face = datasets.face(gray=True).astype('float64')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/readthedocs.org:jax failed with the below error message:
Missing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'.
So I need to add it back.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Yeah it looks like we do need to add this requirement here as you originally did, but maybe just pooch rather than pinning to that specific old version? If we really do need such an old version, can you add a comment with justification? Thanks!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. We don't need a specific version for pooch. Fixed.

@dfm
Copy link
Collaborator

dfm commented Jan 6, 2025

Thank you! This looks good to me. Can you squash these commits into one and rebase onto the main branch? Then I'll merge. Thanks again!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Jan 6, 2025
@copybara-service copybara-service bot merged commit 7997f08 into jax-ml:main Jan 7, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants