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

Issue while model sharing and uploading on huggingface #8512

Closed
saburbutt opened this issue Nov 13, 2020 · 5 comments
Closed

Issue while model sharing and uploading on huggingface #8512

saburbutt opened this issue Nov 13, 2020 · 5 comments

Comments

@saburbutt
Copy link

saburbutt commented Nov 13, 2020

The model I am using (Bert, XLNet ...): Roberta for questionanswering

I am trying to follow the tutorial given in https://huggingface.co/transformers/model_sharing.html and while I am able to load my model in the local repository, I am unable to save my model and tokenizer using "model.save_pretrained("https://huggingface.co/saburbutt/testing")
tokenizer.save_pretrained("https://huggingface.co/saburbutt/testing")"

If I try to open the link it says "Cannot GET /saburbutt/testing/tokenizer_config.json"

While I try to "echo "hello" >> README.md" or use git functions, It gives me the error "fatal: not a git repository (or any of the parent directories): .git" The task I am working on is SQuAD

I expect the model to be saved in the huggingface/saburbutt/testing repository

@julien-c
Copy link
Member

You cannot save directly remotely like this (though it could be nice to be able to do this in the future, cc @madlag).

You need to first create a repo with transformers-cli repo create, or directly on the website.

Then clone it locally and add your files, then push.

Hopefully #8520 makes it clearer?

@saburbutt
Copy link
Author

yes. Thankyou. :)

@serdarakyol
Copy link

Hello, I have the same issue with different outputs. I followed all steps in https://huggingface.co/transformers/model_sharing.html
in order, entered my account with transformers-cli login, created repo, installed lfs, cloned repo, added BERT model via "git add BERTMODEL", committed and pushed but always I got the same error.

remote:
remote: -------------------------------------------------------------------------
remote: Your push was rejected because it contains files larger than 10M.
remote: Please use https://git-lfs.github.com/ to store larger files.
remote: -------------------------------------------------------------------------
remote:
remote: Offending files:
remote: - BERTMODEL (ref: refs/heads/main)
To https://huggingface.co/Serdar/your-model-name
! [remote rejected] main -> main (pre-receive hook declined)

OS: Ubuntu 20.04

I already used "git lfs install" but I could not figure out this problem. I wish someone can help

@julien-c
Copy link
Member

julien-c commented Mar 1, 2021

@serdarakyol Please make sure you read the Getting started guide at https://git-lfs.github.com/ – in your case I think you didn't lfs-track your actual model file

@serdarakyol
Copy link

@julien-c Thank you so much. fixed the problem

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