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

Support offline mode with tests #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Support offline mode with tests #5

wants to merge 6 commits into from

Conversation

ardaatahan
Copy link

This PR aims to add offline mode to swift-transformers:

  • Allows developers to call snapshot safely with an offline mode parameter, preventing unnecessary downloads while ensuring local models are up to date.
  • Introduces a NetworkMonitor class, which automatically sets the useOfflineMode parameter based on internet availability or whether the connection is expensive/constrained.
  • Enables validation of local files without triggering downloads, ensuring models remain usable even on limited or expensive network connections.
  • Adds additional tests to verify offline mode logic.

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