transformers
transformers copied to clipboard
added type hints for blip_text model
What does this PR do?
Added type hints for blip_text
pytorch model as tasked in #16059
@Rocketknight1 Could you review this?
Error logs suggest that to use pip install "black[jupyter]"
but unable to understand what to do after that. @Rocketknight1 could you suggest how to fix test failures?
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.
Hi @iamarunbrahma, black
is a code formatting tool. After you've installed it, run make style
or make fixup
in the transformers
directory. This should reformat your file for you and get the tests in the CI to pass.
@Rocketknight1 getting this error while running make fixup
:
/bin/sh: line 3: black: command not found
/bin/sh: line 4: ruff: command not found
make: *** [Makefile:10: modified_only_fixup] Error 127
and while running make style
:
make: black: No such file or directory
make: *** [Makefile:68: style] Error 127
I have installed both black
and ruff
@iamarunbrahma looks like black
wasn't installed after all! The easiest way to get it is to cd
to the transformers
source directory you're working on and pip install .[quality]
. You can also just type pip install transformers[quality]
anywhere, but this may get slightly older versions of the code quality tools (it's usually fine though).
Once the tools you need are installed, make fixup
or make style
should work.