Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sentence_transformers/SentenceTransformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ def save_to_hub(self,

endpoint = "https://huggingface.co"
repo_url = HfApi(endpoint=endpoint).create_repo(
token,
repo_name,
token=token,
repo_id=repo_name,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The organization parameter is deprecated and will soon be removed in next release of huggingface_hub (a Warning message should already be printed since version 0.8).

Suggested change is to add organization to the repo id and remove it from the arguments passed to create_repo.

Suggested change
repo_id=repo_name,
repo_id=f"{organization}/{repo_name}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Organization might be None though and that would lead to an error I think.

Maybe we should go ahead with #1743 ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry, my bad. Checking this would be better :)

organization=organization,
private=private,
repo_type=None,
Expand Down