Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@NicolasHug
Copy link
Member

This PR moves all the torchdata imports as lazy imports to avoid import error when torchdata is not present.

Smoke test is passing when torchdata is not present:

(text) ➜  text git:(lajenflajenfljanefljanefljajnef) ✗ python -c "import torchdata"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'torchdata'


(text) ➜  text git:(lajenflajenfljanefljanefljajnef) ✗ python test/smoke_tests/smoke_tests.py
torchtext version is  0.17.0a0+51f373d

@NicolasHug NicolasHug requested a review from atalman March 22, 2024 16:57
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 22, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/text/2242

Note: Links to docs will display an error until the docs builds have been completed.

❌ 9 New Failures, 4 Unrelated Failures

As of commit 7d494b1 with merge base 51f373d (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@NicolasHug NicolasHug merged commit ecb9ebc into pytorch:main Mar 22, 2024
@NicolasHug NicolasHug deleted the lajenflajenfljanefljanefljajnef branch March 22, 2024 17:05
PaliC pushed a commit that referenced this pull request Mar 22, 2024
* Remove stuff

* stuff

* lint
PaliC added a commit that referenced this pull request Mar 22, 2024
PaliC pushed a commit that referenced this pull request Mar 23, 2024
* Remove stuff

* stuff

* lint
huydhn pushed a commit that referenced this pull request Mar 23, 2024
* Remove stuff

* stuff

* lint
huydhn added a commit that referenced this pull request Mar 23, 2024
* Remove torchdata dependency from package and from CI (#2241)

* Fix torchdata import error (#2242)

* Remove stuff

* stuff

* lint

---------

Co-authored-by: Nicolas Hug <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants