question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[fixup/style] requires TF but doesn't say that cleanly

See original GitHub issue

It looks like make fixup et al, require tf (and pt), but fail in unexpected way when the requirements are missing:

python utils/check_repo.py
Checking all models are properly tested.
Checking all objects are properly documented.
Checking all models are in at least one auto class.
Traceback (most recent call last):
  File "/home/michael/projects/transformers/utils/check_repo.py", line 481, in <module>
    check_repo_quality()
  File "/home/michael/projects/transformers/utils/check_repo.py", line 477, in check_repo_quality
    check_all_models_are_auto_configured()
  File "/home/michael/projects/transformers/utils/check_repo.py", line 290, in check_all_models_are_auto_configured
    all_auto_models = get_all_auto_configured_models()
  File "/home/michael/projects/transformers/utils/check_repo.py", line 253, in get_all_auto_configured_models
    for attr_name in dir(transformers.models.auto.modeling_tf_auto):
  File "/home/michael/projects/transformers/src/transformers/file_utils.py", line 1690, in __getattr__
    raise AttributeError(f"module {self.__name__} has no attribute {name}")
AttributeError: module transformers.models.auto has no attribute modeling_tf_auto
make: *** [Makefile:35 : extra_quality_checks] Erreur 1

Thank you, @michaelbenayoun for flagging this

Should we add a small script first that checks all the requirements so that the error is not misleading, but something like: “need to install pip install -e .[dev] to develop transformers”?

@sgugger, @LysandreJik

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sguggercommented, May 3, 2021

I don’t think we need a new script for that. Maybe add the check inside the script that fails (check_all_models_are_auto_configured) and issue a warning if not all backends are detected (I don’t think we need to error out, since it’s unlikely the user will bring changes that break a backend when that backend is not even installed)? I can do this later this evening or tomorrow.

1reaction
michaelbenayouncommented, May 3, 2021

The same thing happens with flax.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developing Character through Literature - GovInfo
IDENTIFIERS. Developing Character through Literature: A Teacher's. Resource Book. ERIC Clearinghouse on Reading, English, and Communication,. Bloomington, IN.; ...
Read more >
https://svn.apache.org/repos/asf/httpd/httpd/tags/...
[Scott Lamb <slamb@slamb.org>] *) Make Perchild compile cleanly and serve pages ... We require OpenSSL 0.9.6 or later, but configure doesn't check that...
Read more >
Practical Malware Analysis - Lab Write-up - Jai Minton
This details reverse engineering activities and answers for labs contained in the book 'Practical Malware Analysis' by Michael Sikorski and ...
Read more >
IRC log of houdini on 2015-08-28 - W3C
It would be 200kb for it and takes 1ms to spin up. ... 07:36:13 [dael]: smfr: The spec doesn't address the UI workers...
Read more >
AIX 4.X OpenMail B.05.10 December 00 Periodic Patch
If you wish to restart OpenMail cleanly, run omshut or wait for the ... Such messages will display correctly, but if the Notes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found