Skip to content

Conversation

cyyever
Copy link
Contributor

@cyyever cyyever commented Sep 7, 2025

What does this PR do?

Always import torch in some source files that are PT only.

@cyyever cyyever force-pushed the assume_torch branch 4 times, most recently from 5edf8a7 to d0a30b9 Compare September 7, 2025 06:38
Signed-off-by: Yuanyuan Chen <[email protected]>
@Rocketknight1
Copy link
Member

This is definitely something that'll need a core maintainer, since it's part of the transition to being Torch-only. cc @ArthurZucker @Cyrilvallez !

Copy link
Member

@Cyrilvallez Cyrilvallez left a comment

Choose a reason for hiding this comment

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

cc @ArthurZucker, there are quite some places where we could start to import without protection I think, but it's not obvious where/when we want to change it

extras["quality"] = deps_list("datasets", "ruff", "GitPython", "urllib3", "libcst", "rich", "pandas")
extras["quality"] = deps_list("datasets", "ruff", "GitPython", "urllib3", "libcst", "rich", "pandas", "torch")
Copy link
Member

Choose a reason for hiding this comment

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

We don't want to change this

Copy link
Contributor Author

@cyyever cyyever Sep 9, 2025

Choose a reason for hiding this comment

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

Without it quality check fails with torch import errors. As we are moving to a more PyTorch centric position, it is acceptable.

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.

3 participants