Skip to content

Conversation

@bmahabirbu
Copy link
Contributor

What does this PR do?

This pr fixes the error

STDERR: [ai-lab] Something went wrong while scanning cache. [Error: ENOENT: no such file or directory, stat '/home/runner/.cache/huggingface/hub'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '/home/runner/.cache/huggingface/hub'
}

during e2e

Screenshot / video of UI

What issues does this PR fix or reference?

How to test this PR?

@bmahabirbu bmahabirbu requested review from a team, benoitf and jeffmaury as code owners January 23, 2026 05:33
Copy link
Collaborator

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

This does not fix correctly the issue as we have Huggingface models in the catalog.
This error is spawned when the Hub cache folder does not exist

Signed-off-by: Brian <bmahabir@bu.edu>
@bmahabirbu bmahabirbu force-pushed the huggingface-cache-fix branch from 460e885 to dd9e883 Compare January 26, 2026 03:20
@bmahabirbu
Copy link
Contributor Author

updated

// Check if cache directory exists before scanning
try {
const cachePath = getHFHubCachePath();
await fs.access(cachePath);
Copy link
Collaborator

Choose a reason for hiding this comment

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

praise: It was once stated that using existsSync should be preferred to async access as the cost of throwing exception could be greater.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants