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

Libraries import missing, unable to load image for inference and not able to load pipeline with the trained model #30927

Closed
2 of 4 tasks
dejokz opened this issue May 21, 2024 · 5 comments

Comments

@dejokz
Copy link

dejokz commented May 21, 2024

System Info

Running in google colab

  • transformers version: 4.40.2
  • Platform: Linux-6.1.85+-x86_64-with-glibc2.35
  • Python version: 3.10.12
  • Huggingface_hub version: 0.23.0
  • Safetensors version: 0.4.3
  • Accelerate version: 0.30.1
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.2.1+cu121 (True)
  • Tensorflow version (GPU?): 2.15.0 (True)
  • Flax version (CPU?/GPU?/TPU?): 0.8.3 (gpu)
  • Jax version: 0.4.26
  • JaxLib version: 0.4.26
  • Using GPU in script?: Yes
  • Using distributed or parallel set-up in script?: not sure

Who can help?

@stevhliu

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

copying the latest github notebook and running in google colab

Expected behavior

To run without any import errors, and to train without any errors, and load my trained model without any errors

@amyeroberts
Copy link
Collaborator

Hi @dejokz, thanks for raising an issue!

Could you give some more details about the errors you're experiencing? Specifically the error messages and their full traceback?

@RUFFY-369
Copy link
Contributor

Hi @dejokz, I checked the provided colab notebook and I got the same error and I think that even after running the suggested install of pip install transformers[torch] and pip install accelerate -U in the error traceback you aren't able to resolve the issue, right?

So, for fixing that just restart the colab session and after that without rerunning the !pip install code cells just run all the rest of the other code cells back 'cause Colab has a script that appends metadata of pip-installed packages to a list-like object during runtime and imports only the search function from the top of this list so, we need to restart the session after !pip install

Cheers!

@stevhliu
Copy link
Member

Hi, I recommend copying/pasting the code from the docs on the main version for now. I think these issues should've been resolved in #30132, but the doc-builder is not converting the latest changes to the notebooks for some reason.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

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

4 participants