Skip to content

Conversation

ethanbwaite
Copy link
Contributor

Summary:
Lazy import matplotlib to avoid lockfile issues with some of the font files when importing captum library in multithreaded environments eg:

[2025-10-01T04:02:13.219-07:00] TimeoutError: Lock error: Matplotlib failed to acquire the following lock file:
[2025-10-01T04:02:13.219-07:00]     /var/twsvcscm/.cache/matplotlib/fontlist-v330.json.matplotlib-lock
[2025-10-01T04:02:13.219-07:00] This maybe due to another process holding this lock file.  If you are sure no
[2025-10-01T04:02:13.219-07:00] other Matplotlib process is running, remove this file and try again.

Differential Revision: D83707766

Summary:
Lazy import matplotlib to avoid lockfile issues with some of the font files when importing captum library in multithreaded environments eg:

```
[2025-10-01T04:02:13.219-07:00] TimeoutError: Lock error: Matplotlib failed to acquire the following lock file:
[2025-10-01T04:02:13.219-07:00]     /var/twsvcscm/.cache/matplotlib/fontlist-v330.json.matplotlib-lock
[2025-10-01T04:02:13.219-07:00] This maybe due to another process holding this lock file.  If you are sure no
[2025-10-01T04:02:13.219-07:00] other Matplotlib process is running, remove this file and try again.
```

Differential Revision: D83707766
Copy link
Contributor

meta-codesync bot commented Oct 2, 2025

@ethanbwaite has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83707766.

@meta-codesync meta-codesync bot closed this in faac087 Oct 2, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in faac087.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants