Skip to content

Conversation

@ParagEkbote
Copy link
Contributor

@ParagEkbote ParagEkbote commented Dec 9, 2025

Description

In some of the gh-action test runs, I have observed the following warnings for the model and dataset cache not being saved correctly:

Warning: Failed to restore: The specified blob does not exist.
RequestId:b413aa80-601e-00a4-0531-699e57000000
Time:2025-12-09T17:30:01.1909781Z
Cache not found for input keys: hf-datasets-Linux-1bbd1d207191e929474a58aa111fdace73dbdc6ecb8d25a54146afc370d5d037, hf-datasets-Linux-

The issue stems from setting the cache key in an uncertain manner. When tests get updated or modified, a new key will be assigned and the previous cache will get invalidated.

In the updated key, we use a stable prefix hf-cache-${{ runner.os }}-, which cleanly separates caches by operating system. The addition of ${{ hashFiles('pyproject.toml') }} ensures the cache is only invalidated when your dependency configuration changes. This approach also enables partial key matching through restore keys, allowing gh-actions to fall back to compatible caches when an exact match can't be found.

Could you please review?

cc: @davidberenstein1957

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

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.

1 participant