Transformers Repo Install Error

I’m trying to contribute to this repository. I’ve cloned the repository down. I ran the install scripts from the main page. I went to the docs folder and ran those scripts in the markdown. I ran the pip install -e docs. In the install script I saw that there was no installer for docs, I believe. I ran the script for doc-builder and that ran completely. I tried generating the markdown script immediately after and that failed.

“WARNING: transformers 4.53.0.dev0 does not provide the extra ‘docs’”

Any advice would be helpful

1 Like

I went to the docs folder

There have been reports of installation errors from Transoformers’ GitHub on Discord, so I think there may be an issue.

However, in this case, there is also the possibility that…
It may need to be from the repository root rather than inside the docs folder.

To generate the documentation, you first have to build it. Several packages are necessary to build the doc, you can install them with the following command, at the root of the code repository:
pip install -e “.[docs]”

To trace the problem:

1 Like

I ran the above command in the root and that is what caused the error :(.

Whenever I run this command: doc-builder build transformers docs/source/en/ --build_dir ~/tmp/test-build

This is the output.

ValueError: There was an error when converting docs\source\en\internal\generation_utils.md to the MDX format.
Unable to find generation.TFGreedySearchEncoderDecoderOutput in transformers. Make sure the path to that object is correct.

I’m just trying to trouble shoot this so I can view my model card that I’m contributing.. Thank you for your help so far.

1 Like

Hmm… Possibly a bug in doc-builder…?

On Mac: Cannot build documentation on Mac OS · Issue #32203 · huggingface/transformers · GitHub

1 Like

I’ve made slight progress and now I landed here :frowning:

Unable to find image_processing_utils_fast.BaseImageProcessorFast in transformers. Make sure the path to that object is correct.

1 Like

Unable to find image_processing_utils_fast.BaseImageProcessorFast in transformers.

This class definitely exists unless you are using a very old version, so the program is probably unable to find the path or has found the wrong path.

Personally, I think that if you are just building the documentation, you should be fine without any dependencies, but maybe in this case you need to install PyTorch and Transformers first…

1 Like

I might clear out my env and try installing using WSL and see how that works out in a bit.

1 Like

Yeah. If it’s just a bug in the Windows dependencies, it can be avoided with WSL2…
If we don’t need to use a GPU, installing PyTorch itself is straightforward.
It seems like this could happen on Ubuntu or Mac as well, but it helps narrow down the problem.

1 Like

I had no luck on WSL either :frowning:
I posted in issue on the GitHub page. Hopefully I can get some additional context there or a workaround to preview my markdown.

Thank you very much

1 Like

Oh, I see.

running the doc-builder requires all dependencies installed (here, it seems it’s erroring out as you don’t have TensorFlow installed).