Skip to content

Conversation

sanggusti
Copy link

Fixes #734

Add mechanism to disable external version checks to address #734
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #734 . Implemented optional environment variable LITDATA_DISABLE_VERSION_CHECK=1 that, when set, skips the PyPI API calls entirely. This prevents delays, timeouts, and unexpected network activity in restricted environments while maintaining backward compatibility (i.e., the default behavior remains unchanged unless the flag is explicitly enabled).

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@sanggusti
Copy link
Author

The tests is made by copilot. Seems overtesting but I can delete unnecessary checks if requested.

@tchaton
Copy link
Collaborator

tchaton commented Oct 14, 2025

Hey @sanggusti Thanks for your first contributions. I am curious to hear what you are using LitData for.

Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80%. Comparing base (e69fdd0) to head (7eb5a18).

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #737   +/-   ##
===================================
  Coverage    80%    80%           
===================================
  Files        52     52           
  Lines      7330   7334    +4     
===================================
+ Hits       5868   5876    +8     
+ Misses     1462   1458    -4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@bhimrazy bhimrazy left a comment

Choose a reason for hiding this comment

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

Thanks for the pr, @sanggusti! I’ve added a few suggestions.
Please feel free to reach out if you have any questions.

@sanggusti
Copy link
Author

Hi @tchaton !

I was looking for a tool for curating/transforming/streaming data for my medical llm finetuning project, and it happens that I'm a fan of lightning. I've just used litdata for the past week and even though I can't use lightning cloud (Indonesia(+62) is not supported yet) I happen to find some issue that I think I can contribute.

@sanggusti sanggusti requested a review from bhimrazy October 14, 2025 23:00
@sanggusti sanggusti requested a review from deependujha October 15, 2025 21:30
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.

Add mechanism to disable external version checks (PyPI API calls) for air-gapped environments

4 participants