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

gated attribute of DatasetInfo is returned as string instead of bool #1843

Closed
ademait opened this issue Nov 20, 2023 · 4 comments
Closed

gated attribute of DatasetInfo is returned as string instead of bool #1843

ademait opened this issue Nov 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@ademait
Copy link
Contributor

ademait commented Nov 20, 2023

Describe the bug

Hi, this is something similar to Issue #1830 . Gated is a boolean attribute, as it is reported in the docs. However, I found some repos with 'manual' or 'auto' values. An example is dataset "libeanim/LAION-100B-Test":

{'id': 'libeanim/LAION-100B-Test',
 'author': 'libeanim',
 'sha': '4db63f1feae8028fdac3d38f5d3796a68f364166',
 'last_modified': datetime.datetime(2023, 11, 20, 8, 13, 35, tzinfo=datetime.timezone.utc),
 'private': False,
 'gated': 'manual',
 'disabled': False,
 'downloads': 0,
 'likes': 0,
 'paperswithcode_id': None,
 'tags': ['region:us'],
 'card_data': None,
 'siblings': None,
 'lastModified': datetime.datetime(2023, 11, 20, 8, 13, 35, tzinfo=datetime.timezone.utc),
 'cardData': None,
 '_id': '650ef91757343388e577173e',
 'createdAt': '2023-09-23T14:41:27.000Z',
 'key': ''}

What does these values mean?

Reproduction

No response

Logs

No response

System info

- huggingface_hub version: 0.19.2
- Platform: Linux-6.2.16-4-pve-x86_64-with-glibc2.28
- Python version: 3.9.12
- Running in iPython ?: Yes
- iPython shell: ZMQInteractiveShell
- Running in notebook ?: Yes
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers: 
- FastAI: N/A
- Tensorflow: N/A
- Torch: N/A
- Jinja2: 3.1.2
- Graphviz: N/A
- Pydot: N/A
- Pillow: N/A
- hf_transfer: N/A
- gradio: N/A
- tensorboard: N/A
- numpy: N/A
- pydantic: N/A
- aiohttp: N/A
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /root/.cache/huggingface/hub
- HF_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10
@ademait ademait added the bug Something isn't working label Nov 20, 2023
@Wauplin
Copy link
Contributor

Wauplin commented Nov 20, 2023

Looks like another corner case I was not aware of. Similarly to #1830, would you mind opening a PR to fix the docstrings + type annotation? 🙏 The data type should be Optional[Literal["auto", "manual", False]] instead of Optional[bool]. Applies to both ModelInfo and DatasetInfo.

@ademait
Copy link
Contributor Author

ademait commented Nov 20, 2023

Okay! I'll submit the PR. But, do you know what "auto" and "manual" values mean? Just out of curiosity. As far as I know, gated repos are just repositories that demand users their contact info in order to access it 🤔 .

@severo
Copy link
Collaborator

severo commented Nov 20, 2023

See https://huggingface.co/docs/hub/models-gated#manual-approval

You can accept all the users automatically (auto) or review them manually (manual)

@ademait
Copy link
Contributor Author

ademait commented Nov 21, 2023

Oh, I understand. Thank you @severo ! I already look that up, but I got a bit confused when sometimes is returned a boolean and other times a string.

(edit) Sorry, I see that the boolean can only be False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants