Skip to content

Fix scipy errors fid#3793

Closed
aaishwarymishra wants to merge 1 commit into
pytorch:masterfrom
aaishwarymishra:fix-scipy-errors-fid
Closed

Fix scipy errors fid#3793
aaishwarymishra wants to merge 1 commit into
pytorch:masterfrom
aaishwarymishra:fix-scipy-errors-fid

Conversation

@aaishwarymishra

@aaishwarymishra aaishwarymishra commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pins scipy<=1.17.0 in requirements-dev.txt to fix failing unit tests caused by scipy.linalg.sqrtm removing the disp
parameter in
SciPy 1.18.0 .

Problem

In SciPy 1.16.0 , the disp parameter in scipy.linalg.sqrtm was deprecated, and it was completely removed in SciPy 1.18.0 .
However, the pytorch-fid library (which we use in test_fid.py to validate our FID metric implementation) still passes
disp=False to scipy.linalg.sqrtm .

When running tests with SciPy 1.18.0 or newer, this mismatch results in a TypeError: sqrtm() got an unexpected keyword
argument 'disp' , causing our test suite (specifically FID metric unit tests) to fail.

Solution

Since pytorch-fid is a third-party dependency used primarily for validation in our dev/test environment, we restrict the scipy dependency in requirements-dev.txt to <=1.17.0 . This ensures that the test suite continues to run successfully on environments using the pinned SciPy version.

@github-actions github-actions Bot added the module: metrics Metrics module label Jun 25, 2026
@aaishwarymishra aaishwarymishra marked this pull request as draft June 25, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant