Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook failures on Windows using Docker #320

Open
adrianbravo opened this issue Jan 28, 2023 · 3 comments
Open

Notebook failures on Windows using Docker #320

adrianbravo opened this issue Jan 28, 2023 · 3 comments

Comments

@adrianbravo
Copy link

I ran into a couple of issues trying to get the Docker machine generating images on Windows. I'll document both of them, and how I solved them.

First, there were recent changes to the transformers package that causes failures at this step in the notebook:

    encoded_images = p_generate(
        tokenized_prompt,
        shard_prng_key(subkey),
        params,
        gen_top_k,
        gen_top_p,
        temperature,
        cond_scale,
    )

This is downstream of a recent change that was released on tag v4.26.0, PR concerned: huggingface/transformers#20388. What's happening is that a call to _get_logits_warper is failing because the parameters accepted have changed to expect a GenerationConfig object rather than various kwargs. The fix here looks fairly straightforward, import GenerationConfig and wrap the kwargs being passed in to _get_logits_warper with that class for instatiation.

Alternatively, the fix I performed locally was to just pip uninstall transformers and pip install transformers==4.25.1.

Second, I faced an issue with the CUDA version being incompatible. This appears to be possibly fixable in Docker, although it's not as apparent to me exactly how I would do it. Locally, I uninstalled the package that was added with this command: RUN pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html which came out as jaxlib-0.4.2+cuda11.cudnn86 (see: https://github.com/borisdayma/dalle-mini/blob/main/Docker/Dockerfile#L9) and instead installed jaxlib-0.4.2+cuda11.cudnn82. I would have tried jaxlib-0.4.2+cuda11.cudnn84 because the conflict on my machine was between 8.6.0 and 8.4.0, but that package did not exist so I went down further to "cudnn82".

I can try to submit my own PR for this, although obviously it'll take me a bit to figure out how development is done on this repo.

Anyway, thanks for building this and making it fairly simple to set up!

@borisdayma
Copy link
Owner

borisdayma commented Jan 28, 2023

Oh that's very interesting.
I recently updated the dalle-mini package on pypi so hopefully it solves the first error if you upgrade.

For the docker error it's always good if you have a fix to submit for the docker script.

@PlaidJedi
Copy link

I'm experiencing this same issue, I was able to resolve the transformers by following your example. Unsure how to install cudnn82

@borisdayma
Copy link
Owner

I think it should now work. Can you confirm?
I fixed transformers version and updated pypi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants