Skip to content

Lazy loading is not working properly #44273

@albertvillanova

Description

@albertvillanova

Problem

Lazy loading is not working properly:

  • importing transformers takes ~3.5s

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

time python -c "import transformers"
real	0m3.669s
user	0m4.789s
sys	0m0.311s

Expected behavior

It should take less <0.5s

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions