Skip to content

This PR causes Transformers to error out when a model is using Tensorflow and the environment does not provide torch in any way #37679

@rishic3

Description

@rishic3
          This PR causes Transformers to error out when a model is using Tensorflow and the environment does not provide `torch` in any way

transformers/src/transformers/pipelines/base.py:

        if torch.distributed.is_initialized():

Source

Originally posted by @radoslav-dimitrov-indeavr in #37307 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions