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

Fix/studio #1

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Fix/studio #1

merged 4 commits into from
Nov 4, 2024

Conversation

Erland366
Copy link
Contributor

@Erland366 Erland366 commented Oct 22, 2024

There are several issue in the studio. The issue was issued by user in the discord.

image

This issue is trigger when importing unsloth, but somehow the issue didn't happen inside finetune notebook. But Colab in general still using huggingface_hub version where there is no EntryNotErrorFound (so finetune notebook never call huggingface_hub.errors.EntryNotErrorFound). So what I did is to upgrade huggingface_hub as the last step of installation

Loading model ... Please wait 1 more minute! ...
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-1-d1dd531f71ba>](https://localhost:8080/#) in <cell line: 20>()
     18 get_ipython().system('git clone https://github.com/unslothai/studio > /dev/null 2>&1')
     19 with open("studio/unsloth_studio/chat.py", "r") as chat_module: code = chat_module.read()
---> 20 exec(code)

<string> in <module>

10 frames
[/usr/local/lib/python3.10/dist-packages/unsloth/__init__.py](https://localhost:8080/#) in <module>
    162 pass
    163 
--> 164 from .models import *
    165 from .save import *
    166 from .chat_templates import *

....

[/usr/local/lib/python3.10/dist-packages/huggingface_hub/repocard.py](https://localhost:8080/#) in <module>
     21 
     22 from . import constants
---> 23 from .errors import EntryNotFoundError
     24 from .utils import SoftTemporaryDirectory, logging, validate_hf_hub_args
     25 

ImportError: cannot import name 'EntryNotFoundError' from 'huggingface_hub.errors' (/usr/local/lib/python3.10/dist-packages/huggingface_hub/errors.py)

But, there's new error of this which happened because studio still use the old way of unsloth installation which I already fix it :

image

Lastly, I need to specify the version of Gradio (4.44.1) for the exact, since there's a migration happening (specifically in retry_button which studio still uses)

You can try it immediately without merging the PR by using

!git clone https://github.com/Erland366/unsloth-studio.git --branch fix/studio > /dev/null 2>&1
with open("unsloth-studio/unsloth_studio/chat.py", "r") as chat_module: code = chat_module.read()
exec(code)

@danielhanchen danielhanchen merged commit e4665b7 into unslothai:main Nov 4, 2024
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

Successfully merging this pull request may close these issues.

2 participants