Skip to content

Raise exception when a module is not found #885

Open
@MurphyAdam

Description

@MurphyAdam

from transformers import TFAutoModelForSequenceClassification

As an example above, you could see that we are wrapping an import in a try-except block, but we only use the except for printing that the module doesn't exists..which seems a little redundant since that's what you'd get anyways if a module doesn't exist. In the same file, we are using such import as if they're guaranteed to be imported? What's the logic here?
Either have defaults, or let the the python import do it's job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityTypos, lint errors, style issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions