GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — fix: owned_by field in GET /v1/models returns list instead of string by nileshpatil6 · Pull Request #46006 · huggingface/transformers Conversation
Contributor
What does this fix?In # Before (bug): returns a list like ["mistralai", "Mistral-7B-v0.1"] author = repo.repo_id.split("/") if "/" in repo.repo_id else "" # After (fix): returns just the author string "mistralai" author = repo.repo_id.split("/")[0] if "/" in repo.repo_id else ""
Changes
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsrepo.repo_id.split("/") returns a list like ["author", "model_name"]
but owned_by expects a string. Add [0] index to extract just the author.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
SunMarc
approved these changes
|
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…uggingface#46006) fix: get_gen_models returns list instead of string for owned_by field repo.repo_id.split("/") returns a list like ["author", "model_name"] but owned_by expects a string. Add [0] index to extract just the author.
…uggingface#46006) fix: get_gen_models returns list instead of string for owned_by field repo.repo_id.split("/") returns a list like ["author", "model_name"] but owned_by expects a string. Add [0] index to extract just the author.
…uggingface#46006) fix: get_gen_models returns list instead of string for owned_by field repo.repo_id.split("/") returns a list like ["author", "model_name"] but owned_by expects a string. Add [0] index to extract just the author.
…uggingface#46006) fix: get_gen_models returns list instead of string for owned_by field repo.repo_id.split("/") returns a list like ["author", "model_name"] but owned_by expects a string. Add [0] index to extract just the author.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.